Make sure root aliases are marked as such also when loaded from lock file
parent
e1ead6027f
commit
6ace5bb651
|
@ -431,7 +431,7 @@ class AliasPackage extends BasePackage implements CompletePackageInterface
|
||||||
|
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return parent::__toString().' (alias of '.$this->aliasOf->getVersion().')';
|
return parent::__toString().' ('.($this->rootPackageAlias ? 'root ':''). 'alias of '.$this->aliasOf->getVersion().')';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setDistUrl($url)
|
public function setDistUrl($url)
|
||||||
|
|
|
@ -187,7 +187,9 @@ class Locker
|
||||||
if (isset($lockData['aliases'])) {
|
if (isset($lockData['aliases'])) {
|
||||||
foreach ($lockData['aliases'] as $alias) {
|
foreach ($lockData['aliases'] as $alias) {
|
||||||
if (isset($packageByName[$alias['package']])) {
|
if (isset($packageByName[$alias['package']])) {
|
||||||
$packages->addPackage(new AliasPackage($packageByName[$alias['package']], $alias['alias_normalized'], $alias['alias']));
|
$aliasPkg = new AliasPackage($packageByName[$alias['package']], $alias['alias_normalized'], $alias['alias']);
|
||||||
|
$aliasPkg->setRootPackageAlias(true);
|
||||||
|
$packages->addPackage($aliasPkg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue