Make sure the alias package gets added to conflict rules etc, and only add it if aliased package is actually added
parent
7b183956d8
commit
b7e1383083
|
@ -262,13 +262,14 @@ class RuleSetGenerator
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function addRulesForRootAliases()
|
protected function addRulesForRootAliases($ignorePlatformReqs)
|
||||||
{
|
{
|
||||||
foreach ($this->pool->getPackages() as $package) {
|
foreach ($this->pool->getPackages() as $package) {
|
||||||
// if it is a root alias, make sure that if the aliased version gets installed
|
// if it is a root alias, make sure that if the aliased version gets installed
|
||||||
// the alias must be installed too
|
// the alias must be installed too
|
||||||
if ($package instanceof AliasPackage && $package->isRootPackageAlias()) {
|
if ($package instanceof AliasPackage && $package->isRootPackageAlias() && isset($this->addedMap[$package->getAliasOf()->id])) {
|
||||||
$this->addRule(RuleSet::TYPE_PACKAGE, $this->createRequireRule($package->getAliasOf(), array($package), Rule::RULE_PACKAGE_REQUIRES, $package->getAliasOf()));
|
$this->addRule(RuleSet::TYPE_PACKAGE, $this->createRequireRule($package->getAliasOf(), array($package), Rule::RULE_PACKAGE_REQUIRES, $package->getAliasOf()));
|
||||||
|
$this->addRulesForPackage($package, $ignorePlatformReqs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -288,7 +289,7 @@ class RuleSetGenerator
|
||||||
|
|
||||||
$this->addRulesForRequest($request, $ignorePlatformReqs);
|
$this->addRulesForRequest($request, $ignorePlatformReqs);
|
||||||
|
|
||||||
$this->addRulesForRootAliases();
|
$this->addRulesForRootAliases($ignorePlatformReqs);
|
||||||
|
|
||||||
$this->addConflictRules($ignorePlatformReqs);
|
$this->addConflictRules($ignorePlatformReqs);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue