Skip to content

Commit 7e53bf8

Browse files
committed
Fix
1 parent e20a9f0 commit 7e53bf8

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

docs/en/reference/dql-doctrine-query-language.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,7 +1723,13 @@ Conditional Expressions
17231723
ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}*
17241724
ConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor}*
17251725
ConditionalFactor ::= ["NOT"] ConditionalPrimary
1726-
ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")"
1726+
ConditionalPrimary ::= SimpleConditionalExpression
1727+
| "(" ConditionalExpression ")"
1728+
| CaseExpression
1729+
| CoalesceExpression
1730+
| NullifExpression
1731+
| ArithmeticExpression
1732+
17271733
SimpleConditionalExpression ::= ComparisonExpression | BetweenExpression | LikeExpression |
17281734
InExpression | NullComparisonExpression | ExistsExpression |
17291735
EmptyCollectionComparisonExpression | CollectionMemberExpression |
@@ -1819,7 +1825,7 @@ QUANTIFIED/BETWEEN/COMPARISON/LIKE/NULL/EXISTS
18191825
QuantifiedExpression ::= ("ALL" | "ANY" | "SOME") "(" Subselect ")"
18201826
BetweenExpression ::= ArithmeticExpression ["NOT"] "BETWEEN" ArithmeticExpression "AND" ArithmeticExpression
18211827
ComparisonExpression ::= ArithmeticExpression ComparisonOperator ( QuantifiedExpression | ArithmeticExpression )
1822-
InExpression ::= ArithmeticExpression ["NOT"] "IN" "(" (InParameter {"," InParameter}* | Subselect) ")"
1828+
InExpression ::= (ArithmeticExpression | CaseExpression | CoalesceExpression | NullifExpression) ["NOT"] "IN" "(" (InParameter {"," InParameter}* | Subselect) ")"
18231829
InstanceOfExpression ::= IdentificationVariable ["NOT"] "INSTANCE" ["OF"] (InstanceOfParameter | "(" InstanceOfParameter {"," InstanceOfParameter}* ")")
18241830
InstanceOfParameter ::= AbstractSchemaName | InputParameter
18251831
LikeExpression ::= StringExpression ["NOT"] "LIKE" StringPrimary ["ESCAPE" char]

src/Query/Parser.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2496,7 +2496,6 @@ public function SimpleConditionalExpression(): AST\ExistsExpression|AST\BetweenE
24962496
// Handle conditional and null-handling expressions (CASE, COALESCE, NULLIF) by peeking ahead in the token stream
24972497
if ($token->type === TokenType::T_CASE || $token->type === TokenType::T_COALESCE || $token->type === TokenType::T_NULLIF) {
24982498
if ($token->type === TokenType::T_CASE) {
2499-
25002499
// For CASE expressions, peek beyond the matching END keyword
25012500
$nestingDepth = 1;
25022501

0 commit comments

Comments
 (0)