mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Expected Doctrine\ORM\Query\Lexer::T_END, got 'AS' since 2.6.0 #5841
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 @soullivaneuh on GitHub (Jan 9, 2018).
With the following query builder:
I have this error on
execute():Here is the produced DQL:
Rolling back to 2.5 solve the issue, so it looks like a BC break.
@Majkl578 commented on GitHub (Jan 9, 2018):
This is actually bug in your code:
CASE WHEN ... THEN ... ELSE ...requires to be ended withEND. For reference see DQL EBNF for GeneralCaseExpression in 2.5: https://github.com/doctrine/doctrine2/blob/v2.5.14/docs/en/reference/dql-doctrine-query-language.rst#case-expressionsThe code for this hasn't been touched for years though so any breakage in this regard is suspicious.
@soullivaneuh commented on GitHub (Jan 10, 2018):
@Majkl578 I'll take a look, but this change nothing.
This was perfectly working with the same code for v2.5, not after upgrading to 2.6.
Rolling back to v2.5 was the only thing I did to make it working again.
@soullivaneuh commented on GitHub (Jan 10, 2018):
I confirm that changing to since:
solved the issue, thanks.
But I maintain this is working on 2.5. Event if it should not work, a deprecation message should be thrown instead IMHO.
@Seb33300 commented on GitHub (Jan 25, 2018):
This looks like to be a bug in 2.5 syntax parser, 2.6 fixed it.
@wuestkamp commented on GitHub (Oct 26, 2018):
ran into the same issue when upgrading 2.5 -> 2.6. Solution described above (using the
endkeyword) worked.