1
0
Fork 0

Merge pull request #3482 from naderman/reduce-conflict-rules

Avoid generating duplicate conflict rules
pull/3484/head
Jordi Boggiano 2014-12-01 19:13:09 +00:00
commit 7464ea8b89
1 changed files with 1 additions and 1 deletions

View File

@ -241,7 +241,7 @@ class RuleSetGenerator
if (($package instanceof AliasPackage) && $package->getAliasOf() === $provider) {
$this->addRule(RuleSet::TYPE_PACKAGE, $rule = $this->createRequireRule($package, array($provider), Rule::RULE_PACKAGE_ALIAS, $package));
} elseif (!$this->obsoleteImpossibleForAlias($package, $provider)) {
} elseif (!$this->obsoleteImpossibleForAlias($package, $provider) && $package->id <= $provider->id) {
$reason = ($package->getName() == $provider->getName()) ? Rule::RULE_PACKAGE_SAME_NAME : Rule::RULE_PACKAGE_IMPLICIT_OBSOLETES;
$this->addRule(RuleSet::TYPE_PACKAGE, $rule = $this->createConflictRule($package, $provider, $reason, $package));
}