diff --git a/doc/03-cli.md b/doc/03-cli.md index 7334c0516..fb41879d4 100644 --- a/doc/03-cli.md +++ b/doc/03-cli.md @@ -445,6 +445,7 @@ The color coding is as such: * **--minor-only (-m):** Only shows packages that have minor SemVer-compatible updates. * **--format (-f):** Lets you pick between text (default) or json output format. * **--no-dev:** Do not show outdated dev dependencies. +* **--locked:** Shows updates for packages from the lock file, regardless of what is currently in vendor dir. ## browse / home diff --git a/src/Composer/Command/OutdatedCommand.php b/src/Composer/Command/OutdatedCommand.php index b08c3cb46..ace1631d8 100644 --- a/src/Composer/Command/OutdatedCommand.php +++ b/src/Composer/Command/OutdatedCommand.php @@ -32,6 +32,7 @@ class OutdatedCommand extends ShowCommand 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 (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('locked', null, InputOption::VALUE_NONE, 'Shows updates for packages from the lock file, regardless of what is currently in vendor dir'), 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('minor-only', 'm', InputOption::VALUE_NONE, 'Show only packages that have minor SemVer-compatible updates. Use with the --outdated option.'), @@ -78,6 +79,9 @@ EOT if ($input->getOption('minor-only')) { $args['--minor-only'] = true; } + if ($input->getOption('locked')) { + $args['--locked'] = true; + } if ($input->getOption('no-dev')) { $args['--no-dev'] = true; }