Avoid creating unnecessary conflict rules for provide/replace of aliases
parent
3764b3007d
commit
780e6fc027
|
@ -211,10 +211,15 @@ class RuleSetGenerator
|
|||
$conflicts = $this->pool->whatProvides($link->getTarget(), $link->getConstraint());
|
||||
|
||||
foreach ($conflicts as $conflict) {
|
||||
// define the conflict rule for regular packages, for alias packages it's only needed if the name
|
||||
// matches the conflict exactly, otherwise the name match is by provide/replace which means the
|
||||
// package which this is an alias of will conflict anyway, so no need to create additional rules
|
||||
if (!$conflict instanceof AliasPackage || $conflict->getName() === $link->getTarget()) {
|
||||
$this->addRule(RuleSet::TYPE_PACKAGE, $this->createRule2Literals($package, $conflict, Rule::RULE_PACKAGE_CONFLICT, $link));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->addedPackagesByNames as $name => $packages) {
|
||||
if (\count($packages) > 1) {
|
||||
|
|
Loading…
Reference in New Issue