console-parallelization
console-parallelization copied to clipboard
Remove dependency on container in trait
As Symfony 4+ kinda deprecate injecting the whole container, wouldn't it make sense for the trait, rather than asking a getContainer method, ask for whatever it needs (a few parameters and the logger IIRC) ? So that these can be injected and used from a command as a service.
Right now resetting the container every now and then is kinda necessary hence this dependency. That said I don't like it either and it might be worth exploring another way to do without it
Looks like it's only resetted when an error happens and if the container implements the resettable interface. So yeah, there should be a better way...
I agree that this would be great. Maybe we can add the reset to a separate trait. Ideas?