Skip to content

Commit bfa0d12

Browse files
committed
feature #23887 [Console] Allow commands to provide a default name for compile time registration (chalasr, nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [Console] Allow commands to provide a default name for compile time registration | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #23796 | License | MIT | Doc PR | symfony/symfony-docs#8147 Commits ------- eda7d42955 [Console] Add protected static $defaultName to set the default name of a Command 5d9ae6b56f [Console] Allow commands to provide a default name for compile time registration
2 parents d40001c + 1ebaca8 commit bfa0d12

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Command/XliffLintCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
*/
2727
class XliffLintCommand extends Command
2828
{
29+
protected static $defaultName = 'lint:xliff';
30+
2931
private $format;
3032
private $displayCorrectFiles;
3133
private $directoryIteratorProvider;
@@ -45,7 +47,6 @@ public function __construct($name = null, $directoryIteratorProvider = null, $is
4547
protected function configure()
4648
{
4749
$this
48-
->setName('lint:xliff')
4950
->setDescription('Lints a XLIFF file and outputs encountered errors')
5051
->addArgument('filename', null, 'A file or a directory or STDIN')
5152
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt')

0 commit comments

Comments
 (0)