use Symfony\Component\Console\ConsoleEvents;
use Symfony\Component\Console\Event\ConsoleCommandEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Call hooks
];
$commandEventHooks = $this->getHooks($hooks);
foreach ($commandEventHooks as $commandEvent) {
+ if ($commandEvent instanceof EventDispatcherInterface) {
+ $commandEvent->dispatch(ConsoleEvents::COMMAND, $event);
+ }
if (is_callable($commandEvent)) {
$commandEvent($event);
}