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
This is very limiting when the custom functions has dependencies, for example it can't be created by a DI container.
The approach I have taken here is very simple: it allows to define a callback instead of the class name: the callback will be called and it should return the instance:
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of mnapoli:
Url: #991
Message:
Right now the only way to define custom DQL functions is by giving the class name, and Doctrine will create the class:
This is very limiting when the custom functions has dependencies, for example it can't be created by a DI container.
The approach I have taken here is very simple: it allows to define a callback instead of the class name: the callback will be called and it should return the instance:
On a side note, I think it would be great to generalize that approach because currently there are a lot of places where the same constraints apply.
The text was updated successfully, but these errors were encountered: