diff --git a/doc/03-cli.md b/doc/03-cli.md index 951406efb..dbf71bb1a 100644 --- a/doc/03-cli.md +++ b/doc/03-cli.md @@ -326,8 +326,9 @@ php composer.phar show monolog/monolog 1.0.2 ## outdated -The `outdated` command shows a list of installed packages including their -current and latest versions. This is basically an alias for `composer show -l`. +The `outdated` command shows a list of installed packages that have updates available, +including their current and latest versions. This is basically an alias for +`composer show -lo`. The color coding is as such: @@ -338,7 +339,7 @@ The color coding is as such: ### Options -* **--outdated (-o):** Lists *only* packages that have a newer version available. +* **--all (-a):** Show all packages, not just outdated (alias for `composer show -l`). * **--direct (-D):** Restricts the list of packages to your direct dependencies. ## browse / home diff --git a/src/Composer/Command/OutdatedCommand.php b/src/Composer/Command/OutdatedCommand.php index 74f3caf33..d89434951 100644 --- a/src/Composer/Command/OutdatedCommand.php +++ b/src/Composer/Command/OutdatedCommand.php @@ -27,10 +27,11 @@ class OutdatedCommand extends ShowCommand { $this ->setName('outdated') - ->setDescription('Shows a list of installed packages including their latest version.') + ->setDescription('Shows a list of installed packages that have updates available, including their latest version.') ->setDefinition(array( new InputArgument('package', InputArgument::OPTIONAL, 'Package to inspect. Or a name including a wildcard (*) to filter lists of packages instead.'), - new InputOption('outdated', 'o', InputOption::VALUE_NONE, 'Show only packages that are outdated'), + new InputOption('outdated', 'o', InputOption::VALUE_NONE, 'Show only packages that are outdated (this is the default, but present here for compat with `show`'), + new InputOption('all', 'a', InputOption::VALUE_NONE, 'Show all installed packages with their latest versions'), new InputOption('direct', 'D', InputOption::VALUE_NONE, 'Shows only packages that are directly required by the root package'), )) ->setHelp(<< true, ); - if ($input->getOption('outdated')) { + if (!$input->getOption('all')) { $args['--outdated'] = true; } if ($input->getOption('direct')) {