Make sure aliased packages created by the locker are available in the pool
parent
aff7745231
commit
cc3d91f75c
|
@ -186,6 +186,11 @@ class Installer
|
|||
|
||||
protected function doInstall($localRepo, $installedRepo, $aliases, $devMode = false)
|
||||
{
|
||||
// initialize locker to create aliased packages
|
||||
if (!$this->update && $this->locker->isLocked($devMode)) {
|
||||
$lockedPackages = $this->locker->getLockedPackages($devMode);
|
||||
}
|
||||
|
||||
// creating repository pool
|
||||
$pool = new Pool;
|
||||
$pool->addRepository($installedRepo);
|
||||
|
@ -214,7 +219,7 @@ class Installer
|
|||
$this->io->write('<warning>Your lock file is out of sync with your composer.json, run "composer.phar update" to update dependencies</warning>');
|
||||
}
|
||||
|
||||
foreach ($this->locker->getLockedPackages($devMode) as $package) {
|
||||
foreach ($lockedPackages as $package) {
|
||||
$version = $package->getVersion();
|
||||
foreach ($aliases as $alias) {
|
||||
if ($alias['package'] === $package->getName() && $alias['version'] === $package->getVersion()) {
|
||||
|
|
|
@ -95,7 +95,9 @@ class Locker
|
|||
if (!$package) {
|
||||
$package = $this->repositoryManager->findPackage($info['package'], $info['version']);
|
||||
if ($package && !empty($info['alias'])) {
|
||||
$package = new AliasPackage($package, $info['alias'], $info['alias']);
|
||||
$alias = new AliasPackage($package, $info['alias'], $info['alias']);
|
||||
$package->getRepository()->addPackage($alias);
|
||||
$package = $alias;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue