8000 Adding caution box on dependecy injection · symfony/symfony-docs@806310a · GitHub
[go: up one dir, main page]

Skip to content

Commit 806310a

Browse files
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.
1 parent afd3d87 commit 806310a

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)
0