Skip to content

Commit e7bb900

Browse files
committed
minor #16699 [Doctrine] Adding caution box on dependecy injection (ThomasLandauer)
This PR was merged into the 4.4 branch. Discussion ---------- [Doctrine] Adding caution box on dependecy injection I guessed this (based on trial and error), so please double-check! Maybe add a second sentence like: The reason is that the class is instantiated by Doctrine and not wired through Symfony's DI container. Commits ------- 806310a Adding caution box on dependecy injection
2 parents 68e48b0 + 806310a commit e7bb900

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doctrine/custom_dql_functions.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,8 @@ In Symfony, you can register your custom DQL functions as follows:
146146
],
147147
]);
148148
149+
.. caution::
150+
151+
It is not possible to inject Symfony services or parameters into a custom DQL function.
152+
149153
.. _`DQL User Defined Functions`: https://www.doctrine-project.org/projects/doctrine-orm/en/current/cookbook/dql-user-defined-functions.html

0 commit comments

Comments
 (0)