feature #14317 [3.0][FrameworkBundle][lint commands ] remove deprecated alias. (vincentaubert)
This PR was squashed before being merged into the 3.0-dev branch (closes #14317).
Discussion
----------
[3.0][FrameworkBundle][lint commands ] remove deprecated alias.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? |no
| BC breaks? | yes
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
94f55ce
[3.0][FrameworkBundle][lint commands ] remove deprecated alias.
This commit is contained in:
commit
73853c493b
@ -57,7 +57,6 @@ class LintCommand extends Command
|
|||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
->setAliases(array('twig:lint'))
|
|
||||||
->setDescription('Lints a template and outputs encountered errors')
|
->setDescription('Lints a template and outputs encountered errors')
|
||||||
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt')
|
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt')
|
||||||
->addArgument('filename', InputArgument::IS_ARRAY)
|
->addArgument('filename', InputArgument::IS_ARRAY)
|
||||||
@ -84,10 +83,6 @@ EOF
|
|||||||
|
|
||||||
protected function execute(InputInterface $input, OutputInterface $output)
|
protected function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if (false !== strpos($input->getFirstArgument(), ':l')) {
|
|
||||||
$output->writeln('<comment>The use of "twig:lint" command is deprecated since version 2.7 and will be removed in 3.0. Use the "lint:twig" instead.</comment>');
|
|
||||||
}
|
|
||||||
|
|
||||||
$twig = $this->getTwigEnvironment();
|
$twig = $this->getTwigEnvironment();
|
||||||
|
|
||||||
if (null === $twig) {
|
if (null === $twig) {
|
||||||
|
@ -30,7 +30,6 @@ class YamlLintCommand extends Command
|
|||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
->setName('lint:yaml')
|
->setName('lint:yaml')
|
||||||
->setAliases(array('yaml:lint'))
|
|
||||||
->setDescription('Lints a file and outputs encountered errors')
|
->setDescription('Lints a file and outputs encountered errors')
|
||||||
->addArgument('filename', null, 'A file or a directory or STDIN')
|
->addArgument('filename', null, 'A file or a directory or STDIN')
|
||||||
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt')
|
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt')
|
||||||
@ -62,10 +61,6 @@ EOF
|
|||||||
|
|
||||||
protected function execute(InputInterface $input, OutputInterface $output)
|
protected function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
if (false !== strpos($input->getFirstArgument(), ':l')) {
|
|
||||||
$output->writeln('<comment>The use of "yaml:lint" command is deprecated since version 2.7 and will be removed in 3.0. Use the "lint:yaml" instead.</comment>');
|
|
||||||
}
|
|
||||||
|
|
||||||
$filename = $input->getArgument('filename');
|
$filename = $input->getArgument('filename');
|
||||||
|
|
||||||
if (!$filename) {
|
if (!$filename) {
|
||||||
|
Reference in New Issue
Block a user