Skip to content


DDC-1091: Parser::FunctionsReturningStrings() doesn't check for custom DQL functions. #1686

doctrinebot opened this Issue · 3 comments

2 participants


Jira issue originally created by user iksela:

I defined a custom DQL FunctionNode that wasn't detected by the Parser.
Problem was in the Parser::FunctionsReturningStrings(), but I suspect the problem is more general.

Here's my (ugly) fix:

public function FunctionsReturningStrings()
$funcNameLower = strtolower($this->_lexer->lookahead['value']);
if (isset(self::$STRINGFUNCTIONS[$funcNameLower])) {
$funcClass = self::$STRINGFUNCTIONS[$funcNameLower];
$function = new $funcClass($funcNameLower);
else $function = $this->CustomFunctionsReturningStrings();

    return $function;

I include the custom DQL FunctionNode created.


Comment created by @beberlei:



Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0.5 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.