Fix composer show -a usage, fixes #9304
parent
99a5469b5e
commit
14ec957e96
|
@ -584,7 +584,11 @@ EOT
|
|||
|
||||
$matchedPackage = null;
|
||||
$versions = array();
|
||||
$pool = $repositorySet->createPoolWithAllPackages();
|
||||
if (PlatformRepository::isPlatformPackage($name)) {
|
||||
$pool = $repositorySet->createPoolWithAllPackages();
|
||||
} else {
|
||||
$pool = $repositorySet->createPoolForPackage($name);
|
||||
}
|
||||
$matches = $pool->whatProvides($name, $constraint);
|
||||
foreach ($matches as $index => $package) {
|
||||
// select an exact match if it is in the installed repo and no specific version was required
|
||||
|
|
|
@ -280,6 +280,10 @@ class RepositorySet
|
|||
$request = new Request($lockedRepo);
|
||||
|
||||
foreach ($packageNames as $packageName) {
|
||||
if (PlatformRepository::isPlatformPackage($packageName)) {
|
||||
throw new \LogicException('createPoolForPackage(s) can not be used for platform packages, as they are never loaded by the PoolBuilder which expects them to be fixed. Use createPoolWithAllPackages or pass in a proper request with the platform packages you need fixed in it.');
|
||||
}
|
||||
|
||||
$request->requireName($packageName);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue