Skip to content

Commit

Permalink
Early return when a package was already marked to be kept
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar authored and Seldaek committed Feb 25, 2022
1 parent 7ee44e6 commit 8179d1e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Composer/DependencyResolver/PoolOptimizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,11 @@ private function markPackageForRemoval($id)
*/
private function keepPackage(BasePackage $package, $identicalDefinitionsPerPackage, $packageIdenticalDefinitionLookup)
{
// Already marked to keep
if (!isset($this->packagesToRemove[$package->id])) {
return;
}

unset($this->packagesToRemove[$package->id]);

if ($package instanceof AliasPackage) {
Expand Down

0 comments on commit 8179d1e

Please sign in to comment.