1
0
Fork 0

Compact constraints to avoid ending up with very long multi constraints

pull/8850/head
Jordi Boggiano 2020-06-15 13:00:39 +02:00
parent 22367a68f9
commit 071350286f
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 2 additions and 2 deletions

View File

@ -268,7 +268,7 @@ class PoolBuilder
} }
// extend the constraint to be loaded // extend the constraint to be loaded
$constraint = MultiConstraint::create(array($this->packagesToLoad[$name], $constraint), false); $constraint = Intervals::compactConstraint(MultiConstraint::create(array($this->packagesToLoad[$name], $constraint), false));
} }
// Not yet loaded or already marked for a reload, override the existing constraint // Not yet loaded or already marked for a reload, override the existing constraint
@ -287,7 +287,7 @@ class PoolBuilder
// We have already loaded that package but not in the constraint that's // We have already loaded that package but not in the constraint that's
// required. We extend the constraint and mark that package as not being loaded // required. We extend the constraint and mark that package as not being loaded
// yet so we get the required package versions // yet so we get the required package versions
$this->packagesToLoad[$name] = MultiConstraint::create(array($this->loadedPackages[$name], $constraint), false); $this->packagesToLoad[$name] = Intervals::compactConstraint(MultiConstraint::create(array($this->loadedPackages[$name], $constraint), false));
unset($this->loadedPackages[$name]); unset($this->loadedPackages[$name]);
} }