Skip to content

Commit

Permalink
Merge pull request #134 from lemberg/issue/126-remove-step-is-not-called
Browse files Browse the repository at this point in the history
Fix remove Configurer scripts step is never called
  • Loading branch information
T2L committed Jan 16, 2020
2 parents 79be063 + b92219e commit 872c2b2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Config/Manager/UpdateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Lemberg\Draft\Environment\Config\Manager;

use Lemberg\Draft\Environment\App;
use Lemberg\Draft\Environment\Config\AbstractStepInterface;
use Lemberg\Draft\Environment\Config\Config;
use Lemberg\Draft\Environment\Config\Update\UpdateStepInterface;

Expand Down Expand Up @@ -48,9 +49,9 @@ public function update(): void {
private function filterSteps(): void {
$lastAppliedUpdateWeight = $this->getLastAppliedUpdateWeight();

$this->steps = array_filter($this->steps, function (int $weight) use ($lastAppliedUpdateWeight): bool {
return $weight > $lastAppliedUpdateWeight;
}, ARRAY_FILTER_USE_KEY);
$this->steps = array_filter($this->steps, function (AbstractStepInterface $step) use ($lastAppliedUpdateWeight): bool {
return $step->getWeight() > $lastAppliedUpdateWeight;
});
}

/**
Expand Down

0 comments on commit 872c2b2

Please sign in to comment.