From 25d575db33f2d2cf031f90556c782098d7a187d3 Mon Sep 17 00:00:00 2001 From: "Nitsche, Alexander" Date: Sun, 1 Feb 2026 22:44:48 +0100 Subject: [PATCH] Invoke hooks on invoke() This streamlines the processing of tasks that are called in group tasks or via invoke(). --- src/functions.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/functions.php b/src/functions.php index 0fb0c6ce2..7b9931cf9 100644 --- a/src/functions.php +++ b/src/functions.php @@ -595,10 +595,12 @@ function on($hosts, callable $callback): void */ function invoke(string $taskName): void { - $task = Deployer::get()->tasks->get($taskName); - Deployer::get()->messenger->startTask($task); - $task->run(Context::get()); - Deployer::get()->messenger->endTask($task); + $tasks = Deployer::get()->scriptManager->getTasks($taskName); + foreach ($tasks as $task) { + Deployer::get()->messenger->startTask($task); + $task->run(Context::get()); + Deployer::get()->messenger->endTask($task); + } } /**