mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #717] [MERGED] Allow query parameters starting with an underscore #8601
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/717
Author: @hackedd
Created: 7/4/2013
Status: ✅ Merged
Merged: 7/29/2013
Merged by: @guilhermeblanco
Base:
master← Head:patch-1📝 Commits (2)
6aa58d9Allow query parameters starting with an underscoreb5394fcAdd test for query paremeters starting with underscore📊 Changes
2 files changed (+10 additions, -1 deletions)
View changed files
📝
lib/Doctrine/ORM/Query/Lexer.php(+1 -1)📝
tests/Doctrine/Tests/ORM/Query/LexerTest.php(+9 -0)📄 Description
Using a query parameter of which the name starts with an underscore results in a QueryException. For example:
Results in:
This happens because of a bug in the Lexer, which recognizes
:_nameas two tokens (the:as the start of a input parameter,_nameas an identifier). The attached patch changes the regular expression for input parameters to allow identifiers starting with a letter or underscore.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.