Fix show --all showing only the installed version if the package is installed, fixes #10095
parent
a7963b7fed
commit
532c6e7933
|
@ -27,6 +27,7 @@ use Composer\Plugin\PluginEvents;
|
|||
use Composer\Repository\InstalledArrayRepository;
|
||||
use Composer\Repository\ComposerRepository;
|
||||
use Composer\Repository\CompositeRepository;
|
||||
use Composer\Repository\FilterRepository;
|
||||
use Composer\Repository\PlatformRepository;
|
||||
use Composer\Repository\RepositoryFactory;
|
||||
use Composer\Repository\InstalledRepository;
|
||||
|
@ -184,7 +185,7 @@ EOT
|
|||
} else {
|
||||
$installedRepo = new InstalledRepository(array($localRepo, $platformRepo));
|
||||
}
|
||||
$repos = new CompositeRepository(array_merge(array($installedRepo), $composer->getRepositoryManager()->getRepositories()));
|
||||
$repos = new CompositeRepository(array_merge(array(new FilterRepository($installedRepo, array('canonical' => false))), $composer->getRepositoryManager()->getRepositories()));
|
||||
} elseif ($input->getOption('all')) {
|
||||
$defaultRepos = RepositoryFactory::defaultRepos($io);
|
||||
$io->writeError('No composer.json found in the current directory, showing available packages from ' . implode(', ', array_keys($defaultRepos)));
|
||||
|
|
Loading…
Reference in New Issue