8000 [FrameworkBundle] Move lint commands to lint namespace. · symfony/symfony@a19e190 · GitHub
[go: up one dir, main page]

Skip to content

Commit a19e190

Browse files
committed
[FrameworkBundle] Move lint commands to lint namespace.
1 parent 007386c commit a19e190

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

src/Symfony/Bridge/Twig/Command/LintCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class LintCommand extends Command
3535
/**
3636
* {@inheritdoc}
3737
*/
38-
public function __construct($name = 'twig:lint')
38+
public function __construct($name = 'lint:twig')
3939
{
4040
parent::__construct($name);
4141
}
@@ -61,6 +61,7 @@ protected function getTwigEnvironment()
6161
protected function configure()
6262
{
6363
$this
64+
->setAliases(array('twig:lint'))
6465
->setDescription('Lints a template and outputs encountered errors')
6566
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt')
6667
->addArgument('filename', InputArgument::IS_ARRAY)

src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private function createCommandTester()
8080

8181
$application = new Application();
8282
$application->add($command);
83-
$command = $application->find('twig:lint');
83+
$command = $application->find('lint:twig');
8484

8585
return new CommandTester($command);
8686
}

src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ class YamlLintCommand extends Command
3333
protected function configure()
3434
{
3535
$this
36-
->setName('yaml:lint')
36+
->setName('lint:yaml')
37+
->setAliases(array('yaml:lint'))
3738
->setDescription('Lints a file and outputs encountered errors')
3839
->addArgument('filename', null, 'A file or a directory or STDIN')
3940
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt')

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"symfony/finder": "For using the translation loader and cache warmer",
5454
"symfony/form": "For using forms",
5555
"symfony/validator": "For using validation",
56-
"symfony/yaml": "For using the debug:config and yaml:lint commands",
56+
"symfony/yaml": "For using the debug:config and lint:yaml commands",
5757
"doctrine/cache": "For using alternative cache drivers"
5858
},
5959
"autoload": {

src/Symfony/Bundle/TwigBundle/Command/LintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected function configure()
5959
Or all template files in a bundle:
6060
6161
<info>php %command.full_name% @AcmeDemoBundle</info>
62-
62+
6363
EOF
6464
)
6565
;

0 commit comments

Comments
 (0)
0