You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's what I thought since it is an aggregate function. It feels surprising that such functions are not considered to be valid tokens in this context.
After encountering similar problem, and looking at code i've noticed that StringPrimary no longer processes aggregate functions, this change happened somwhere betwean 2.5.14 - 2.6.1
Old function looked like:
case Lexer::T_CASE:
case Lexer::T_COALESCE:
case Lexer::T_NULLIF:
return $this->CaseExpression();
default:
if ($this->isAggregateFunction($lookaheadType)) {
return $this->AggregateExpression();
}
}
$this->syntaxError(
'StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression'
);
while new one missing part responsible for accepting aggregate expressions:
case Lexer::T_CASE:
case Lexer::T_COALESCE:
case Lexer::T_NULLIF:
return $this->CaseExpression();
}
$this->syntaxError(
'StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression'
);
I did not find any mentions of this in documentation (but I could have missed it), so i think this is regression.
I recently migrated our project from doctrine v2.5.6 to v2.6.1. and ran into an error saying:
… with the query being:
After looking at
Doctrine\ORM\Query\Parser::StringPrimary()
, I ended up nestingMAX(…)
call within aIF
to fix the error:Is such a call rejection normal/intended or should this problem be addressed ?
The text was updated successfully, but these errors were encountered: