diff --git a/src/Runner/Hook.php b/src/Runner/Hook.php index 4429e506..6a6bdfd2 100644 --- a/src/Runner/Hook.php +++ b/src/Runner/Hook.php @@ -125,13 +125,15 @@ public function run(): void $actions = $this->getActionsToExecute($hookConfigs); + $this->beforeHook(); + // if no actions are configured do nothing if (count($actions) === 0) { $this->io->write(['', 'No actions to execute'], true, IO::VERBOSE); - return; + } else { + $this->executeActions($actions); } - $this->beforeHook(); - $this->executeActions($actions); + $this->afterHook(); } @@ -448,7 +450,7 @@ private function executeRunnerPluginsFor(string $method, ?Config\Action $action $this->io->write(['', 'Executing plugins for: ' . $method . ''], true, IO::DEBUG); foreach ($plugins as $plugin) { - $this->io->write(get_class($plugin), true, IO::DEBUG); + $this->io->write('- Running ' . get_class($plugin) . '::' . $method . '', true, IO::DEBUG); $plugin->{$method}(...$params); } }