1
0
Fork 0

Avoid useless warnings when updating/removing stuff that is not installed

pull/6341/merge
Jordi Boggiano 2017-05-16 21:59:19 +02:00
parent 05fcc4adfb
commit 954300032b
1 changed files with 6 additions and 4 deletions

View File

@ -359,7 +359,7 @@ class Installer
} }
$this->whitelistUpdateDependencies( $this->whitelistUpdateDependencies(
$localRepo, $lockedRepository ?: $localRepo,
$this->package->getRequires(), $this->package->getRequires(),
$this->package->getDevRequires() $this->package->getDevRequires()
); );
@ -1268,11 +1268,13 @@ class Installer
* skipped including their dependencies, unless they are listed in the * skipped including their dependencies, unless they are listed in the
* update whitelist themselves. * update whitelist themselves.
* *
* @param RepositoryInterface $localRepo * @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
* repo might be empty but locked repo will always be current.
* @param array $rootRequires An array of links to packages in require of the root package * @param array $rootRequires An array of links to packages in require of the root package
* @param array $rootDevRequires An array of links to packages in require-dev of the root package * @param array $rootDevRequires An array of links to packages in require-dev of the root package
*/ */
private function whitelistUpdateDependencies($localRepo, array $rootRequires, array $rootDevRequires) private function whitelistUpdateDependencies($localOrLockRepo, array $rootRequires, array $rootDevRequires)
{ {
if (!$this->updateWhitelist) { if (!$this->updateWhitelist) {
return; return;
@ -1291,7 +1293,7 @@ class Installer
} }
$pool = new Pool; $pool = new Pool;
$pool->addRepository($localRepo); $pool->addRepository($localOrLockRepo);
$seen = array(); $seen = array();