Skip to content

Commit

Permalink
Merge pull request #132 from lemberg/feature/125-fix--last-update-weight
Browse files Browse the repository at this point in the history
Fix setting the last applied update weight
  • Loading branch information
T2L committed Jan 16, 2020
2 parents bf1c476 + cfda454 commit 79be063
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Config/Manager/UpdateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public function update(): void {

$configObject->writeConfigToTheFile($targetConfigFilepath, $targetConfigFilepath, $config);

end($this->steps);
/** @var int $lastAppliedUpdateWeight */
$lastAppliedUpdateWeight = key($this->steps);
/** @var \Lemberg\Draft\Environment\Config\Update\UpdateStepInterface $lastStep */
$lastStep = end($this->steps);
$lastAppliedUpdateWeight = $lastStep->getWeight();
$this->setLastAppliedUpdateWeight($lastAppliedUpdateWeight);
}
}
Expand Down

0 comments on commit 79be063

Please sign in to comment.