1
0
Fork 0

Early return when a package was already marked to be kept

pull/10571/head
Yanick Witschi 2022-02-18 17:39:19 +01:00 committed by Jordi Boggiano
parent 7ee44e6461
commit 8179d1ea33
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 5 additions and 0 deletions

View File

@ -340,6 +340,11 @@ class PoolOptimizer
*/ */
private function keepPackage(BasePackage $package, $identicalDefinitionsPerPackage, $packageIdenticalDefinitionLookup) private function keepPackage(BasePackage $package, $identicalDefinitionsPerPackage, $packageIdenticalDefinitionLookup)
{ {
// Already marked to keep
if (!isset($this->packagesToRemove[$package->id])) {
return;
}
unset($this->packagesToRemove[$package->id]); unset($this->packagesToRemove[$package->id]);
if ($package instanceof AliasPackage) { if ($package instanceof AliasPackage) {