I have a service that needs to be closed when I try to configure it using calls: in the Symfony DI YAML file.
Illuminate\Queue\QueueManager: arguments: app: "@app" calls: - [ addConnector, [ "@Illuminate\\Queue\Connector\NullConnector" ]]
I am wondering if I can enable the service in closure, as the library code will not allow me to insert anything else.
public function addConnector($driver, Closure $resolver) { $this->connectors[$driver] = $resolver; }
Is there a way to create a Closure (or anonymous function) in the Symfony DI container's YAML definition file? I suppose this can be done with some compiler pass, but I wonder if an existing solution to this problem is possible.
source share