Make sure alias packages installed with create-project end up with the correct branch checked out, fixes #6082
parent
e4840ee413
commit
9a26a9e8f8
|
@ -23,6 +23,7 @@ use Composer\Package\BasePackage;
|
||||||
use Composer\DependencyResolver\Pool;
|
use Composer\DependencyResolver\Pool;
|
||||||
use Composer\DependencyResolver\Operation\InstallOperation;
|
use Composer\DependencyResolver\Operation\InstallOperation;
|
||||||
use Composer\Package\Version\VersionSelector;
|
use Composer\Package\Version\VersionSelector;
|
||||||
|
use Composer\Package\AliasPackage;
|
||||||
use Composer\Repository\RepositoryFactory;
|
use Composer\Repository\RepositoryFactory;
|
||||||
use Composer\Repository\CompositeRepository;
|
use Composer\Repository\CompositeRepository;
|
||||||
use Composer\Repository\PlatformRepository;
|
use Composer\Repository\PlatformRepository;
|
||||||
|
@ -330,6 +331,10 @@ EOT
|
||||||
$io->writeError('<info>Plugins have been disabled.</info>');
|
$io->writeError('<info>Plugins have been disabled.</info>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($package instanceof AliasPackage) {
|
||||||
|
$package = $package->getAliasOf();
|
||||||
|
}
|
||||||
|
|
||||||
if (0 === strpos($package->getPrettyVersion(), 'dev-') && in_array($package->getSourceType(), array('git', 'hg'))) {
|
if (0 === strpos($package->getPrettyVersion(), 'dev-') && in_array($package->getSourceType(), array('git', 'hg'))) {
|
||||||
$package->setSourceReference(substr($package->getPrettyVersion(), 4));
|
$package->setSourceReference(substr($package->getPrettyVersion(), 4));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue