From 605cd3ddc3e821a018cd9a7677cec41ed37f2b8a Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 4 Apr 2013 15:44:18 +0200 Subject: [PATCH] Rename diag to diagnose, fix feedback --- doc/03-cli.md | 6 +++--- .../Command/{DiagCommand.php => DiagnoseCommand.php} | 10 +++++----- src/Composer/Console/Application.php | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) rename src/Composer/Command/{DiagCommand.php => DiagnoseCommand.php} (98%) diff --git a/doc/03-cli.md b/doc/03-cli.md index 69852fc1d..19d26939e 100644 --- a/doc/03-cli.md +++ b/doc/03-cli.md @@ -348,13 +348,13 @@ performance. autoloader. This is recommended especially for production, but can take a bit of time to run so it is currently not done by default. -## diag +## diagnose If you think you found a bug, or something is behaving strangely, you might -want to run the `diag` command to perform automated checks for many common +want to run the `diagnose` command to perform automated checks for many common problems. - $ php composer.phar diag + $ php composer.phar diagnose ## help diff --git a/src/Composer/Command/DiagCommand.php b/src/Composer/Command/DiagnoseCommand.php similarity index 98% rename from src/Composer/Command/DiagCommand.php rename to src/Composer/Command/DiagnoseCommand.php index c0e0ff364..351cb22b1 100644 --- a/src/Composer/Command/DiagCommand.php +++ b/src/Composer/Command/DiagnoseCommand.php @@ -24,7 +24,7 @@ use Symfony\Component\Console\Output\OutputInterface; /** * @author Jordi Boggiano */ -class DiagCommand extends Command +class DiagnoseCommand extends Command { protected $rfs; protected $failures = 0; @@ -32,10 +32,10 @@ class DiagCommand extends Command protected function configure() { $this - ->setName('diag') + ->setName('diagnose') ->setDescription('Diagnoses the system to identify common errors.') ->setHelp(<<diag command checks common errors to help debugging problems. +The diagnose command checks common errors to help debugging problems. EOT ) @@ -162,9 +162,9 @@ EOT if (Composer::VERSION !== $latest && Composer::VERSION !== '@package_version@') { return 'Your are not running the latest version'; - } else { - return true; } + + return true; } private function outputResult(OutputInterface $output, $result) diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index d90fdec6c..e2ba74a4c 100755 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -199,7 +199,7 @@ class Application extends BaseApplication $commands[] = new Command\DumpAutoloadCommand(); $commands[] = new Command\StatusCommand(); $commands[] = new Command\ArchiveCommand(); - $commands[] = new Command\DiagCommand(); + $commands[] = new Command\DiagnoseCommand(); if ('phar:' === substr(__FILE__, 0, 5)) { $commands[] = new Command\SelfUpdateCommand();