Closed paul-m closed 7 years ago
The workaround looks like this:
$app['dispatcher']->addListener(ConsoleEvents::INIT, function (ConsoleEvent $event) use ($app) {
$console = $event->getApplication();
$console->setDispatcher($app['dispatcher']);
});
It's a bit of a pain to keep the distinction between Knp's ConsoleEvents and Symfony's ConsoleEvents, but it works.
This looks like a good idea, thumbs up from me
The recently merged #31 does just that, so I'm closing your PR.
Thank you @paul-m
We can close the circle here and allow the console application to dispatch events.