Skip to content

Commit ff892d3

Browse files
committed
Fix command option mode (InputOption::VALUE_REQUIRED)
1 parent 9a3effe commit ff892d3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Command/TranslationDebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ protected function configure(): void
7979
->setDefinition([
8080
new InputArgument('locale', InputArgument::REQUIRED, 'The locale'),
8181
new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages'),
82-
new InputOption('domain', null, InputOption::VALUE_OPTIONAL, 'The messages domain'),
82+
new InputOption('domain', null, InputOption::VALUE_REQUIRED, 'The messages domain'),
8383
new InputOption('only-missing', null, InputOption::VALUE_NONE, 'Display only missing messages'),
8484
new InputOption('only-unused', null, InputOption::VALUE_NONE, 'Display only unused messages'),
8585
new InputOption('all', null, InputOption::VALUE_NONE, 'Load messages from all registered bundles'),

Command/TranslationUpdateCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ protected function configure(): void
8484
->setDefinition([
8585
new InputArgument('locale', InputArgument::REQUIRED, 'The locale'),
8686
new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages'),
87-
new InputOption('prefix', null, InputOption::VALUE_OPTIONAL, 'Override the default prefix', '__'),
88-
new InputOption('format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format', 'xlf12'),
87+
new InputOption('prefix', null, InputOption::VALUE_REQUIRED, 'Override the default prefix', '__'),
88+
new InputOption('format', null, InputOption::VALUE_REQUIRED, 'Override the default output format', 'xlf12'),
8989
new InputOption('dump-messages', null, InputOption::VALUE_NONE, 'Should the messages be dumped in the console'),
9090
new InputOption('force', null, InputOption::VALUE_NONE, 'Should the extract be done'),
9191
new InputOption('clean', null, InputOption::VALUE_NONE, 'Should clean not found messages'),
92-
new InputOption('domain', null, InputOption::VALUE_OPTIONAL, 'Specify the domain to extract'),
92+
new InputOption('domain', null, InputOption::VALUE_REQUIRED, 'Specify the domain to extract'),
9393
new InputOption('sort', null, InputOption::VALUE_OPTIONAL, 'Return list of messages sorted alphabetically (only works with --dump-messages)', 'asc'),
94-
new InputOption('as-tree', null, InputOption::VALUE_OPTIONAL, 'Dump the messages as a tree-like structure: The given value defines the level where to switch to inline YAML'),
94+
new InputOption('as-tree', null, InputOption::VALUE_REQUIRED, 'Dump the messages as a tree-like structure: The given value defines the level where to switch to inline YAML'),
9595
])
9696
->setHelp(<<<'EOF'
9797
The <info>%command.name%</info> command extracts translation strings from templates

0 commit comments

Comments
 (0)