Skip to content

Commit

Permalink
Add a couple missing --format completions
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed May 13, 2022
1 parent 72f4e9b commit 779f3ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Composer/Command/LicensesCommand.php
Expand Up @@ -12,6 +12,7 @@

namespace Composer\Command;

use Composer\Console\Input\InputOption;
use Composer\Json\JsonFile;
use Composer\Package\CompletePackageInterface;
use Composer\Plugin\CommandEvent;
Expand All @@ -22,7 +23,6 @@
use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;

Expand All @@ -40,7 +40,7 @@ protected function configure(): void
->setName('licenses')
->setDescription('Shows information about licenses of dependencies.')
->setDefinition(array(
new InputOption('format', 'f', InputOption::VALUE_REQUIRED, 'Format of the output: text, json or summary', 'text'),
new InputOption('format', 'f', InputOption::VALUE_REQUIRED, 'Format of the output: text, json or summary', 'text', ['text', 'json', 'summary']),
new InputOption('no-dev', null, InputOption::VALUE_NONE, 'Disables search in require-dev packages.'),
))
->setHelp(
Expand Down
2 changes: 1 addition & 1 deletion src/Composer/Command/OutdatedCommand.php
Expand Up @@ -42,7 +42,7 @@ protected function configure(): void
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('format', 'f', InputOption::VALUE_REQUIRED, 'Format of the output: text or json', 'text', ['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.', null, $this->suggestInstalledPackage()),
new InputOption('no-dev', null, InputOption::VALUE_NONE, 'Disables search in require-dev packages.'),
new InputOption('ignore-platform-req', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Ignore a specific platform requirement (php & ext- packages). Use with the --outdated option'),
Expand Down
2 changes: 1 addition & 1 deletion tests/Composer/Test/CompletionFunctionalTest.php
Expand Up @@ -50,7 +50,7 @@ public function getCommandSuggestions(): iterable
yield ['init --require-dev foo/bar --require-dev ', [$randomVendor]];

yield ['install --prefer-install ', $preferInstall];
yield ['install ', $installedPackages];
yield ['install ', null];

yield ['outdated ', $installedPackages];

Expand Down

0 comments on commit 779f3ab

Please sign in to comment.