DDC-998: Code example for custom AST functions incorrect #1245

Open
opened 2026-01-22 13:07:04 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Jan 23, 2011).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user felicitus:

On http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html#adding-your-own-functions-to-the-dql-language the code example is slightly incorrect.

Mistakes:

  • Lexer::T_ABS doesn't exist anymore, I assume Lexer::T_IDENTIFIER is what one wants to use
  • Missing use for \Doctrine\ORM\Query\Lexer

Additionally, the section should tell the user that he best has a look at lib/Doctrine/ORM/Query/AST/Functions/* to learn how to write custom functions. It also could be noted that stored procedures can be called with custom functions.

Originally created by @doctrinebot on GitHub (Jan 23, 2011). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user felicitus: On http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html#adding-your-own-functions-to-the-dql-language the code example is slightly incorrect. Mistakes: - Lexer::T_ABS doesn't exist anymore, I assume Lexer::T_IDENTIFIER is what one wants to use - Missing use for \Doctrine\ORM\Query\Lexer Additionally, the section should tell the user that he best has a look at lib/Doctrine/ORM/Query/AST/Functions/\* to learn how to write custom functions. It also could be noted that stored procedures can be called with custom functions.
admin added the Documentation label 2026-01-22 13:07:04 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1245