Show reference as well in show command overview
parent
35afd0a78e
commit
9b2e3766c0
|
@ -31,6 +31,8 @@ use Composer\Repository\RepositoryInterface;
|
||||||
*/
|
*/
|
||||||
class ShowCommand extends Command
|
class ShowCommand extends Command
|
||||||
{
|
{
|
||||||
|
protected $versionParser;
|
||||||
|
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
|
@ -55,6 +57,8 @@ EOT
|
||||||
|
|
||||||
protected function execute(InputInterface $input, OutputInterface $output)
|
protected function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
|
$this->versionParser = new VersionParser;
|
||||||
|
|
||||||
// init repos
|
// init repos
|
||||||
$platformRepo = new PlatformRepository;
|
$platformRepo = new PlatformRepository;
|
||||||
$getRepositories = function (Composer $composer, $dev) {
|
$getRepositories = function (Composer $composer, $dev) {
|
||||||
|
@ -136,7 +140,7 @@ EOT
|
||||||
$output->writeln($type);
|
$output->writeln($type);
|
||||||
ksort($packages[$type]);
|
ksort($packages[$type]);
|
||||||
foreach ($packages[$type] as $package) {
|
foreach ($packages[$type] as $package) {
|
||||||
$output->writeln(' '.$package->getPrettyName() .' '.($showVersion ? '['.$package->getPrettyVersion().']' : '').' <comment>:</comment> '. strtok($package->getDescription(), "\r\n"));
|
$output->writeln(' '.$package->getPrettyName() .' '.($showVersion ? '['.$this->versionParser->formatVersion($package).']' : '').' <comment>:</comment> '. strtok($package->getDescription(), "\r\n"));
|
||||||
}
|
}
|
||||||
$output->writeln('');
|
$output->writeln('');
|
||||||
}
|
}
|
||||||
|
@ -157,8 +161,7 @@ EOT
|
||||||
{
|
{
|
||||||
$name = strtolower($name);
|
$name = strtolower($name);
|
||||||
if ($version) {
|
if ($version) {
|
||||||
$parser = new VersionParser();
|
$version = $this->versionParser->normalize($version);
|
||||||
$version = $parser->normalize($version);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$match = null;
|
$match = null;
|
||||||
|
|
Loading…
Reference in New Issue