Skip to content

Commit

Permalink
--patch-only option for show and outdated commands (composer#10589
Browse files Browse the repository at this point in the history
)

Fixes composer#10503

Co-authored-by: Svyatoslav <tregubov.s@asteq.ru>
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
  • Loading branch information
3 people authored and emahorvat52 committed Jan 18, 2023
1 parent e8e98d6 commit aa0cfba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Composer/Command/OutdatedCommand.php
Expand Up @@ -39,6 +39,7 @@ protected function configure(): void
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.'),
new InputOption('patch-only', 'p', InputOption::VALUE_NONE, 'Show only packages that have patch SemVer-compatible updates. Use with the --outdated option.'),
new InputOption('format', 'f', InputOption::VALUE_REQUIRED, 'Format of the output: text or json', 'text'),
new InputOption('ignore', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Ignore specified package(s). Use it with the --outdated option if you don\'t want to be informed about new versions of some packages.'),
new InputOption('no-dev', null, InputOption::VALUE_NONE, 'Disables search in require-dev packages.'),
Expand Down Expand Up @@ -84,6 +85,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
if ($input->getOption('minor-only')) {
$args['--minor-only'] = true;
}
if ($input->getOption('patch-only')) {
$args['--patch-only'] = true;
}
if ($input->getOption('locked')) {
$args['--locked'] = true;
}
Expand Down

0 comments on commit aa0cfba

Please sign in to comment.