No need to alias platform packages before the repository set as the pool builder already does it
parent
79c59805ad
commit
8bb472a608
|
@ -170,7 +170,6 @@ class PoolBuilder
|
|||
$aliasPackage = new AliasPackage($basePackage, $alias['alias_normalized'], $alias['alias']);
|
||||
$aliasPackage->setRootPackageAlias(true);
|
||||
|
||||
$package->getRepository()->addPackage($aliasPackage); // TODO do we need this?
|
||||
$this->packages[] = $aliasPackage;
|
||||
$this->aliasMap[spl_object_hash($aliasPackage->getAliasOf())][$index+1] = $aliasPackage;
|
||||
}
|
||||
|
|
|
@ -697,8 +697,6 @@ class Installer
|
|||
*/
|
||||
private function createRepositorySet(PlatformRepository $platformRepo, array $rootAliases = array(), $lockedRepository = null)
|
||||
{
|
||||
$this->aliasPlatformPackages($platformRepo, $rootAliases);
|
||||
|
||||
// TODO what's the point of rootConstraints at all, we generate the package pool taking them into account anyway?
|
||||
// TODO maybe we can drop the lockedRepository here
|
||||
// TODO if this gets called in doInstall, this->update is still true?!
|
||||
|
@ -830,25 +828,6 @@ class Installer
|
|||
return $normalizedAliases;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param PlatformRepository $platformRepo
|
||||
* @param array $aliases
|
||||
*/
|
||||
private function aliasPlatformPackages(PlatformRepository $platformRepo, $aliases)
|
||||
{
|
||||
// TODO should the repository set do this?
|
||||
foreach ($aliases as $packageName => $versions) {
|
||||
foreach ($versions as $version => $alias) {
|
||||
$packages = $platformRepo->findPackages($packageName, $version);
|
||||
foreach ($packages as $package) {
|
||||
$aliasPackage = new AliasPackage($package, $alias['alias_normalized'], $alias['alias']);
|
||||
$aliasPackage->setRootPackageAlias(true);
|
||||
$platformRepo->addPackage($aliasPackage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param PackageInterface $package
|
||||
* @return bool
|
||||
|
|
Loading…
Reference in New Issue