Add docs about new --format, refs #6228
parent
f5e026c6c5
commit
a286c39f20
|
@ -339,6 +339,7 @@ php composer.phar show monolog/monolog 1.0.2
|
||||||
* **--outdated (-o):** Implies --latest, but this lists *only* packages that have a newer version available.
|
* **--outdated (-o):** Implies --latest, but this lists *only* packages that have a newer version available.
|
||||||
* **--minor-only (-m):** Use with --latest. Only shows packages that have minor SemVer-compatible updates.
|
* **--minor-only (-m):** Use with --latest. Only shows packages that have minor SemVer-compatible updates.
|
||||||
* **--direct (-D):** Restricts the list of packages to your direct dependencies.
|
* **--direct (-D):** Restricts the list of packages to your direct dependencies.
|
||||||
|
* **--format (-f):** Lets you pick between text (default) or json output format.
|
||||||
|
|
||||||
## outdated
|
## outdated
|
||||||
|
|
||||||
|
@ -348,16 +349,18 @@ including their current and latest versions. This is basically an alias for
|
||||||
|
|
||||||
The color coding is as such:
|
The color coding is as such:
|
||||||
|
|
||||||
- **green**: Dependency is in the latest version and is up to date.
|
- **green (=)**: Dependency is in the latest version and is up to date.
|
||||||
- **yellow**: Dependency has a new version available that includes backwards compatibility breaks according to semver, so upgrade when
|
- **yellow (~)**: Dependency has a new version available that includes backwards compatibility breaks according to semver, so upgrade when
|
||||||
you can but it may involve work.
|
you can but it may involve work.
|
||||||
- **red**: Dependency has a new version that is semver-compatible and you should upgrade it.
|
- **red (!)**: Dependency has a new version that is semver-compatible and you should upgrade it.
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
* **--all (-a):** Show all packages, not just outdated (alias for `composer show -l`).
|
* **--all (-a):** Show all packages, not just outdated (alias for `composer show -l`).
|
||||||
* **--direct (-D):** Restricts the list of packages to your direct dependencies.
|
* **--direct (-D):** Restricts the list of packages to your direct dependencies.
|
||||||
* **--minor-only (-m):** Only shows packages that have minor SemVer-compatible updates.
|
* **--minor-only (-m):** Only shows packages that have minor SemVer-compatible updates.
|
||||||
|
* **--strict:** Returns non-zero exit code if any package is outdated.
|
||||||
|
* **--format (-f):** Lets you pick between text (default) or json output format.
|
||||||
|
|
||||||
## browse / home
|
## browse / home
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ class OutdatedCommand extends ShowCommand
|
||||||
new InputOption('direct', 'D', InputOption::VALUE_NONE, 'Shows only packages that are directly required by the root package'),
|
new InputOption('direct', 'D', InputOption::VALUE_NONE, 'Shows only packages that are directly required by the root package'),
|
||||||
new InputOption('strict', null, InputOption::VALUE_NONE, 'Return a non-zero exit code when there are outdated packages'),
|
new InputOption('strict', null, InputOption::VALUE_NONE, 'Return a non-zero exit code when there are outdated packages'),
|
||||||
new InputOption('minor-only', 'm', InputOption::VALUE_NONE, 'Show only packages that have minor SemVer-compatible updates. Use with the --outdated option.'),
|
new InputOption('minor-only', 'm', InputOption::VALUE_NONE, 'Show only packages that have minor SemVer-compatible updates. Use with the --outdated option.'),
|
||||||
|
new InputOption('format', 'f', InputOption::VALUE_REQUIRED, 'Format of the output: text or json', 'text'),
|
||||||
))
|
))
|
||||||
->setHelp(<<<EOT
|
->setHelp(<<<EOT
|
||||||
The outdated command is just a proxy for `composer show -l`
|
The outdated command is just a proxy for `composer show -l`
|
||||||
|
@ -74,6 +75,7 @@ EOT
|
||||||
if ($input->getOption('minor-only')) {
|
if ($input->getOption('minor-only')) {
|
||||||
$args['--minor-only'] = true;
|
$args['--minor-only'] = true;
|
||||||
}
|
}
|
||||||
|
$args['--format'] = $input->getOption('format');
|
||||||
|
|
||||||
$input = new ArrayInput($args);
|
$input = new ArrayInput($args);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue