From 2e4afaa941ca8348c2b2104e2f0fbe2bed8381bb Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Mon, 11 Sep 2017 12:30:48 -0400 Subject: [PATCH] Not skipping root packages. --- src/Composer/Installer.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index 70040dd96..168429ade 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -1284,7 +1284,7 @@ class Installer * * Packages which are listed as requirements in the root package will be * skipped including their dependencies, unless they are listed in the - * update whitelist themselves. + * update whitelist themselves or `with-all-dependencies` is used. * * @param RepositoryInterface $localOrLockRepo Use the locked repo if available, otherwise installed repo will do * As we want the most accurate package list to work with, and installed @@ -1306,8 +1306,10 @@ class Installer } $skipPackages = array(); - foreach ($rootRequires as $require) { - $skipPackages[$require->getTarget()] = true; + if (!$this->whitelistAllDependencies) { + foreach ($rootRequires as $require) { + $skipPackages[$require->getTarget()] = TRUE; + } } $pool = new Pool('dev'); @@ -1366,7 +1368,7 @@ class Installer continue; } - if (!$this->whitelistAllDependencies && isset($skipPackages[$requirePackage->getName()])) { + if (isset($skipPackages[$requirePackage->getName()])) { $this->io->writeError('Dependency "' . $requirePackage->getName() . '" is also a root requirement, but is not explicitly whitelisted. Ignoring.'); continue; }