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