Changed the ShowCommand to use the new method
parent
fc17e26bc3
commit
1fdb7aef56
|
@ -85,14 +85,12 @@ EOT
|
|||
$composer->getRepositoryManager()->getRepositories()
|
||||
);
|
||||
foreach ($repos as $repository) {
|
||||
foreach ($repository->getPackages() as $package) {
|
||||
if ($package->getName() === $input->getArgument('package')) {
|
||||
foreach ($repository->findPackagesByName($input->getArgument('package')) as $package) {
|
||||
if (null === $highestVersion || version_compare($package->getVersion(), $highestVersion->getVersion(), '>=')) {
|
||||
$highestVersion = $package;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $highestVersion;
|
||||
}
|
||||
|
@ -135,12 +133,10 @@ EOT
|
|||
$versions = array();
|
||||
|
||||
foreach ($composer->getRepositoryManager()->getRepositories() as $repository) {
|
||||
foreach ($repository->getPackages() as $version) {
|
||||
if ($version->getName() === $package->getName()) {
|
||||
foreach ($repository->findPackagesByName($package->getName()) as $version) {
|
||||
$versions[] = $version->getPrettyVersion();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$versions = join(', ', $versions);
|
||||
|
||||
|
|
Loading…
Reference in New Issue