X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fconsolidation%2Fannotated-command%2Fsrc%2FHooks%2FDispatchers%2FCommandEventHookDispatcher.php;fp=vendor%2Fconsolidation%2Fannotated-command%2Fsrc%2FHooks%2FDispatchers%2FCommandEventHookDispatcher.php;h=0baead89e4790f01f0f8598a3cbce519caa81e35;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=c89fd5c45aa911e03b6a361a48da964b13397332;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/CommandEventHookDispatcher.php b/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/CommandEventHookDispatcher.php index c89fd5c45..0baead89e 100644 --- a/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/CommandEventHookDispatcher.php +++ b/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/CommandEventHookDispatcher.php @@ -7,6 +7,7 @@ use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\ConsoleEvents; use Symfony\Component\Console\Event\ConsoleCommandEvent; use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** * Call hooks @@ -25,6 +26,9 @@ class CommandEventHookDispatcher extends HookDispatcher ]; $commandEventHooks = $this->getHooks($hooks); foreach ($commandEventHooks as $commandEvent) { + if ($commandEvent instanceof EventDispatcherInterface) { + $commandEvent->dispatch(ConsoleEvents::COMMAND, $event); + } if (is_callable($commandEvent)) { $commandEvent($event); }