diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index a88d16777..70040dd96 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -1362,11 +1362,11 @@ class Installer $requirePackages = $pool->whatProvides($require->getTarget()); foreach ($requirePackages as $requirePackage) { - if (!$this->whitelistAllDependencies && isset($this->updateWhitelist[$requirePackage->getName()])) { + if (isset($this->updateWhitelist[$requirePackage->getName()])) { continue; } - if (isset($skipPackages[$requirePackage->getName()])) { + if (!$this->whitelistAllDependencies && isset($skipPackages[$requirePackage->getName()])) { $this->io->writeError('Dependency "' . $requirePackage->getName() . '" is also a root requirement, but is not explicitly whitelisted. Ignoring.'); continue; }