[Console] Added Application::reset() #32418
Symfony leaks a lot in CLI when using the EventDispatcher. I'm working on it.
But instead of fixing the root cause, it can be legit to go quick and to reset all services.
referenced this pull request
Jul 7, 2019
I totally agree but there is two things here:
Both points are really wanted. We can already wire everything in Messenger to clear everything (If not done, I did not check). I already open an issue in swarrot about that too.
But I'm also writing 100% custom worker that does many things. I need to do that by hand too :)
I hesitate between Two approaches. This PR and adding
Hmm, I updated the PR and I have a strange feeling. This means injecting the kernel. I think I never injected the kernel. It's a bit like injecting the Container to me. I'm not sure it's cleaner.
Actually this is possible:
So we have Many choices here:
WDYT? I would go for 1 or 3, not 2