Skip to content

Commit

Permalink
DeployRunner: Fix task variable being overridden by other var type
Browse files Browse the repository at this point in the history
$task is of type ConfigurableTaskInterface, while $deployerTask is of type Task (from Deployer). Next taskConfig iteration would run `supports` on Deployer Task type, which obviously does not exist.
  • Loading branch information
tdgroot committed Jul 4, 2024
1 parent f34dc9e commit b3387fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DeployRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ private function initializeConfigurableTask(ConfigurableTaskInterface $task, Con

foreach ($configurations as $taskConfig) {
if ($task->supports($taskConfig)) {
$task = $task->configureWithTaskConfig($taskConfig);
$deployerTask = $task->configureWithTaskConfig($taskConfig);

if ($task && $taskConfig instanceof StageConfigurableInterface) {
$this->configureTaskOnStage($task, $taskConfig);
if ($deployerTask && $taskConfig instanceof StageConfigurableInterface) {
$this->configureTaskOnStage($deployerTask, $taskConfig);
}
}
}
Expand Down

0 comments on commit b3387fc

Please sign in to comment.