mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Error: Expected Doctrine\ORM\Query\Lexer::T_FROM, got EntityName since upgrade to 2.6.0 #5820
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?
Originally created by @allan-simon on GitHub (Dec 21, 2017).
I have the following builder request
it used to work fine, but since upgrade to 2.6.0 I got the error
It seems to work if I add
FROMlike this :is it a known issue ? (or something wrong in my original code ?)
@Ocramius commented on GitHub (Dec 21, 2017):
What's the generated DQL string for that query builder?
@allan-simon commented on GitHub (Dec 21, 2017):
how do i get it ?
@Ocramius commented on GitHub (Dec 21, 2017):
Instead of
->getQuery()do a->getDQL()@Majkl578 commented on GitHub (Dec 21, 2017):
On master, QB generates following DQL:
So there is obviously missing alias for MIN() function.
@Ocramius commented on GitHub (Dec 21, 2017):
"HIDDEN" is a reserved DQL keyword
On 21 Dec 2017 17:35, "Michael Moravec" notifications@github.com wrote:
@Majkl578 commented on GitHub (Dec 21, 2017):
Yes, but the query is valid according to 2.5 EBNF:
"AS HIDDEN" is fine and the alias should be optional as well (which sounds a bit strange though).
This is not a QueryBuilder bug which generates same DQL as on 2.5, but a parser bug.
LanguageRecognitionTest test case:
Works with 2.5, fails with 2.6.
Bisected to
b7bd42638dso it's related to #6928.@stof commented on GitHub (Mar 7, 2018):
Not, the EBNF has
[["AS"] ["HIDDEN"] AliasResultVariable]. soAS HIDDENis not valid, as you miss theAliasResultVariable@beberlei commented on GitHub (Dec 7, 2020):
Fixed by https://github.com/doctrine/orm/pull/7077