Merge pull request #9960 from noniagriconomie/feature-about-version
Add Composer version in about commandpull/9975/head
commit
3afa0a2df6
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
namespace Composer\Command;
|
namespace Composer\Command;
|
||||||
|
|
||||||
|
use Composer\Composer;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
|
@ -24,7 +25,7 @@ class AboutCommand extends BaseCommand
|
||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
->setName('about')
|
->setName('about')
|
||||||
->setDescription('Shows the short information about Composer.')
|
->setDescription('Shows a short information about Composer.')
|
||||||
->setHelp(
|
->setHelp(
|
||||||
<<<EOT
|
<<<EOT
|
||||||
<info>php composer.phar about</info>
|
<info>php composer.phar about</info>
|
||||||
|
@ -35,9 +36,11 @@ EOT
|
||||||
|
|
||||||
protected function execute(InputInterface $input, OutputInterface $output)
|
protected function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
|
$composerVersion = Composer::getVersion();
|
||||||
|
|
||||||
$this->getIO()->write(
|
$this->getIO()->write(
|
||||||
<<<EOT
|
<<<EOT
|
||||||
<info>Composer - Dependency Manager for PHP</info>
|
<info>Composer - Dependency Manager for PHP - version $composerVersion</info>
|
||||||
<comment>Composer is a dependency manager tracking local dependencies of your projects and libraries.
|
<comment>Composer is a dependency manager tracking local dependencies of your projects and libraries.
|
||||||
See https://getcomposer.org/ for more information.</comment>
|
See https://getcomposer.org/ for more information.</comment>
|
||||||
EOT
|
EOT
|
||||||
|
|
Loading…
Reference in New Issue