From 247f237f93d36b3120b3ac77c15c906034c6bd28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Bj=C3=B8rnskov?= Date: Mon, 7 Nov 2011 14:19:15 +0100 Subject: [PATCH 1/2] HelpCommand Simple HelpCommand that displays the same information about Composer that is availible in the README.md file. --- src/Composer/Command/HelpCommand.php | 45 ++++++++++++++++++++++++++++ src/Composer/Console/Application.php | 1 + 2 files changed, 46 insertions(+) create mode 100644 src/Composer/Command/HelpCommand.php diff --git a/src/Composer/Command/HelpCommand.php b/src/Composer/Command/HelpCommand.php new file mode 100644 index 000000000..0f8d7a4d3 --- /dev/null +++ b/src/Composer/Command/HelpCommand.php @@ -0,0 +1,45 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Command; + +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * @author Jordi Boggiano + */ +class HelpCommand extends Command +{ + protected function configure() + { + $this + ->setName('help') + ->setDescription('') + ->setHelp(<<php composer.phar help +EOT + ) + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $output->writeln(<<Composer - Package Management for PHP +Composer is a package manager tracking local dependencies of your projects and libraries. +See the "about page" on packagist.org for more information. +EOT + ); + + } +} diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index b34607eee..034845b91 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -63,6 +63,7 @@ class Application extends BaseApplication */ protected function registerCommands() { + $this->add(new Command\HelpCommand()); $this->add(new Command\InstallCommand()); $this->add(new Command\UpdateCommand()); $this->add(new Command\DebugPackagesCommand()); From f85a31e2b0dea445cef79f2860bee3f85cac795f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Bj=C3=B8rnskov?= Date: Mon, 7 Nov 2011 14:30:01 +0100 Subject: [PATCH 2/2] Change the wording and link directly to packagist.org. --- src/Composer/Command/HelpCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Command/HelpCommand.php b/src/Composer/Command/HelpCommand.php index 0f8d7a4d3..1b2546f9e 100644 --- a/src/Composer/Command/HelpCommand.php +++ b/src/Composer/Command/HelpCommand.php @@ -37,7 +37,7 @@ EOT $output->writeln(<<Composer - Package Management for PHP Composer is a package manager tracking local dependencies of your projects and libraries. -See the "about page" on packagist.org for more information. +See http://packagist.org/about for more information. EOT );