1
0
Fork 0

Use local repo for platform checks when possible to avoid surprises, refs #7605

pull/7623/merge
Jordi Boggiano 2018-09-10 13:58:13 +02:00
parent b99ac8505b
commit a25d6f6c35
1 changed files with 5 additions and 4 deletions

View File

@ -45,16 +45,17 @@ EOT
$composer = $this->getComposer(); $composer = $this->getComposer();
$requires = $composer->getPackage()->getRequires(); $requires = $composer->getPackage()->getRequires();
if (!$input->getOption('no-dev')) { if ($input->getOption('no-dev')) {
$dependencies = $composer->getLocker()->getLockedRepository(!$input->getOption('no-dev'))->getPackages();
} else {
$dependencies = $composer->getRepositoryManager()->getLocalRepository()->getPackages();
$requires += $composer->getPackage()->getDevRequires(); $requires += $composer->getPackage()->getDevRequires();
} }
foreach ($requires as $require => $link) { foreach ($requires as $require => $link) {
$requires[$require] = array($link); $requires[$require] = array($link);
} }
$locker = $composer->getLocker() foreach ($dependencies as $package) {
->getLockedRepository(!$input->getOption('no-dev'));
foreach ($locker->getPackages() as $package) {
foreach ($package->getRequires() as $require => $link) { foreach ($package->getRequires() as $require => $link) {
$requires[$require][] = $link; $requires[$require][] = $link;
} }