1
0
Fork 0

Updated to latest semver intervals

pull/8850/head
Yanick Witschi 2020-05-07 22:38:24 +02:00 committed by Jordi Boggiano
parent 6ef47baca1
commit b6c436598b
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 3 additions and 2 deletions

View File

@ -27,6 +27,7 @@ use Composer\Semver\Constraint\MultiConstraint;
use Composer\EventDispatcher\EventDispatcher;
use Composer\Plugin\PrePoolCreateEvent;
use Composer\Plugin\PluginEvents;
use Composer\Semver\Intervals;
/**
* @author Nils Adermann <naderman@naderman.de>
@ -235,7 +236,7 @@ class PoolBuilder
// Maybe it was already marked before but not loaded yet. In that case
// we have to extend the constraint (we don't check if they match because
// MultiConstraint::create() will optimize anyway
if (isset($this->packagesToLoad[$name]) && !$constraint->isSubsetOf($this->packagesToLoad[$name])) {
if (isset($this->packagesToLoad[$name]) && !Intervals::isSubsetOf($constraint, $this->packagesToLoad[$name])) {
$constraint = MultiConstraint::create(array($this->packagesToLoad[$name], $constraint), false);
}
@ -246,7 +247,7 @@ class PoolBuilder
// No need to load this package with this constraint because it is
// a subset of the constraint with which we have already loaded packages
if ($constraint->isSubsetOf($this->loadedPackages[$name])) {
if (Intervals::isSubsetOf($constraint, $this->loadedPackages[$name])) {
return;
}