Add --all to oudated command and switch it to show only outdated by default, fixes #5253

main
Jordi Boggiano 8 years ago
parent 135783299a
commit fd5f90989f

@ -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

@ -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(<<<EOT
@ -56,7 +57,7 @@ EOT
'show',
'--latest' => true,
);
if ($input->getOption('outdated')) {
if (!$input->getOption('all')) {
$args['--outdated'] = true;
}
if ($input->getOption('direct')) {

Loading…
Cancel
Save