1
0
Fork 0

Ignore platform reqs now handle conflict rules

pull/8221/head
Baptiste Lafontaine 2019-07-11 16:48:57 +02:00
parent e022c07370
commit a4611d511f
1 changed files with 6 additions and 2 deletions

View File

@ -233,7 +233,7 @@ class RuleSetGenerator
}
}
protected function addConflictRules()
protected function addConflictRules($ignorePlatformReqs = false)
{
/** @var PackageInterface $package */
foreach ($this->addedPackages as $package) {
@ -242,6 +242,10 @@ class RuleSetGenerator
continue;
}
if ($ignorePlatformReqs && preg_match(PlatformRepository::PLATFORM_PACKAGE_REGEX, $link->getTarget())) {
continue;
}
/** @var PackageInterface $possibleConflict */
foreach ($this->addedPackagesByNames[$link->getTarget()] as $possibleConflict) {
$conflictMatch = $this->pool->match($possibleConflict, $link->getTarget(), $link->getConstraint(), true);
@ -362,7 +366,7 @@ class RuleSetGenerator
$this->addRulesForJobs($ignorePlatformReqs);
$this->addConflictRules();
$this->addConflictRules($ignorePlatformReqs);
// Remove references to packages
$this->addedPackages = $this->addedPackagesByNames = null;