mirror of
https://github.com/composer/composer
synced 2025-05-10 17:12:51 +00:00
Only list tree of packages required by root and not every installed package individually, refs #2600
This commit is contained in:
parent
e6e636802f
commit
9b8a14179b
1 changed files with 9 additions and 1 deletions
|
@ -152,9 +152,17 @@ EOT
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$rootPackage = $this->getComposer()->getPackage();
|
||||||
|
$rootRequires = array_map(
|
||||||
|
'strtolower',
|
||||||
|
array_keys(array_merge($rootPackage->getRequires(), $rootPackage->getDevRequires()))
|
||||||
|
);
|
||||||
|
|
||||||
foreach ($installedRepo->getPackages() as $package) {
|
foreach ($installedRepo->getPackages() as $package) {
|
||||||
|
if (in_array($package->getName(), $rootRequires, true)) {
|
||||||
$this->displayPackageTree($package, $installedRepo, $repos, $output);
|
$this->displayPackageTree($package, $installedRepo, $repos, $output);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue