1
0
Fork 0

Only list tree of packages required by root and not every installed package individually, refs #2600

pull/4647/head
Jordi Boggiano 2015-11-27 10:28:57 +00:00
parent e6e636802f
commit 9b8a14179b
1 changed files with 9 additions and 1 deletions

View File

@ -152,9 +152,17 @@ EOT
return 1;
}
$rootPackage = $this->getComposer()->getPackage();
$rootRequires = array_map(
'strtolower',
array_keys(array_merge($rootPackage->getRequires(), $rootPackage->getDevRequires()))
);
foreach ($installedRepo->getPackages() as $package) {
if (in_array($package->getName(), $rootRequires, true)) {
$this->displayPackageTree($package, $installedRepo, $repos, $output);
}
}
return 0;
}