minor #11627 [FrameworkBundle] [TwigBundle] Move debug commands to debug namespace (matthieuauger)

This PR was merged into the 2.6-dev branch.

Discussion
----------

[FrameworkBundle] [TwigBundle] Move debug commands to debug namespace

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT

Instead of having several namespaces with only one debug command (container:debug, event-dispatcher:debug), move all these debug commands to a new **debug** namespace.

Related to https://github.com/symfony/symfony/pull/10388#issuecomment-49007419

I don't how to tag these aliases as deprecated as there are only here for backward compatibility.
The renaming should also be done in the Swiftmailer Bundle.

Commits
-------

fd0e229 Move debug commands to debug namespace
This commit is contained in:
Nicolas Grekas 2014-08-13 20:41:09 +02:00
commit 9680c35e9e
5 changed files with 20 additions and 5 deletions

View File

@ -30,7 +30,10 @@ class ConfigDebugCommand extends AbstractConfigCommand
protected function configure() protected function configure()
{ {
$this $this
->setName('config:debug') ->setName('debug:config')
->setAliases(array(
'config:debug',
))
->setDefinition(array( ->setDefinition(array(
new InputArgument('name', InputArgument::OPTIONAL, 'The Bundle name or the extension alias'), new InputArgument('name', InputArgument::OPTIONAL, 'The Bundle name or the extension alias'),
)) ))

View File

@ -38,7 +38,10 @@ class ContainerDebugCommand extends ContainerAwareCommand
protected function configure() protected function configure()
{ {
$this $this
->setName('container:debug') ->setName('debug:container')
->setAliases(array(
'container:debug',
))
->setDefinition(array( ->setDefinition(array(
new InputArgument('name', InputArgument::OPTIONAL, 'A service name (foo)'), new InputArgument('name', InputArgument::OPTIONAL, 'A service name (foo)'),
new InputOption('show-private', null, InputOption::VALUE_NONE, 'Used to show public *and* private services'), new InputOption('show-private', null, InputOption::VALUE_NONE, 'Used to show public *and* private services'),

View File

@ -49,7 +49,10 @@ class RouterDebugCommand extends ContainerAwareCommand
protected function configure() protected function configure()
{ {
$this $this
->setName('router:debug') ->setName('debug:router')
->setAliases(array(
'router:debug',
))
->setDefinition(array( ->setDefinition(array(
new InputArgument('name', InputArgument::OPTIONAL, 'A route name'), new InputArgument('name', InputArgument::OPTIONAL, 'A route name'),
new InputOption('show-controllers', null, InputOption::VALUE_NONE, 'Show assigned controllers in overview'), new InputOption('show-controllers', null, InputOption::VALUE_NONE, 'Show assigned controllers in overview'),

View File

@ -38,7 +38,10 @@ class TranslationDebugCommand extends ContainerAwareCommand
protected function configure() protected function configure()
{ {
$this $this
->setName('translation:debug') ->setName('debug:translation')
->setAliases(array(
'translation:debug',
))
->setDefinition(array( ->setDefinition(array(
new InputArgument('locale', InputArgument::REQUIRED, 'The locale'), new InputArgument('locale', InputArgument::REQUIRED, 'The locale'),
new InputArgument('bundle', InputArgument::REQUIRED, 'The bundle name'), new InputArgument('bundle', InputArgument::REQUIRED, 'The bundle name'),

View File

@ -27,7 +27,10 @@ class DebugCommand extends ContainerAwareCommand
protected function configure() protected function configure()
{ {
$this $this
->setName('twig:debug') ->setName('debug:twig')
->setAliases(array(
'twig:debug',
))
->setDefinition(array( ->setDefinition(array(
new InputArgument('filter', InputArgument::OPTIONAL, 'Show details for all entries matching this filter'), new InputArgument('filter', InputArgument::OPTIONAL, 'Show details for all entries matching this filter'),
new InputOption('format', null, InputOption::VALUE_REQUIRED, 'Output format: text or json', 'text'), new InputOption('format', null, InputOption::VALUE_REQUIRED, 'Output format: text or json', 'text'),