@@ -27,9 +27,7 @@ with ``console.command``:
2727
2828 # app/config/config.yml
2929 services :
30- app.command.my_command :
31- class : AppBundle\Command\MyCommand
32- tags : [console.command]
30+ AppBundle\Command\MyCommand : [console.command]
3331
3432 .. code-block :: xml
3533
@@ -41,8 +39,7 @@ with ``console.command``:
4139 http://symfony.com/schema/dic/services/services-1.0.xsd" >
4240
4341 <services >
44- <service id =" app.command.my_command"
45- class =" AppBundle\Command\MyCommand" >
42+ <service id =" AppBundle\Command\MyCommand" >
4643 <tag name =" console.command" />
4744 </service >
4845 </services >
@@ -53,8 +50,7 @@ with ``console.command``:
5350 // app/config/config.php
5451 use AppBundle\Command\MyCommand;
5552
56- $container
57- ->register('app.command.my_command', MyCommand::class)
53+ $container->register(MyCommand::class)
5854 ->addTag('console.command')
5955 ;
6056
@@ -131,8 +127,7 @@ inject the ``command.default_name`` parameter:
131127 command.default_name : Javier
132128
133129 services :
134- app.command.my_command :
135- class : AppBundle\Command\MyCommand
130+ AppBundle\Command\MyCommand :
136131 arguments : ["%command.default_name%"]
137132 tags : [console.command]
138133
@@ -150,8 +145,7 @@ inject the ``command.default_name`` parameter:
150145 </parameters >
151146
152147 <services >
153- <service id =" app.command.my_command"
154- class =" AppBundle\Command\MyCommand" >
148+ <service class =" AppBundle\Command\MyCommand" >
155149 <argument >%command.default_name%</argument >
156150 <tag name =" console.command" />
157151 </service >
@@ -166,7 +160,7 @@ inject the ``command.default_name`` parameter:
166160 $container->setParameter('command.default_name', 'Javier');
167161
168162 $container
169- ->register('app.command.my_command', MyCommand::class)
163+ ->register(MyCommand::class)
170164 ->setArguments(array('%command.default_name%'))
171165 ->addTag('console.command')
172166 ;
0 commit comments