Skip to content

Commit a055140

Browse files
author
Loïc Chardonnet
committed
Took @wouterj's advices into account
1 parent 947ad92 commit a055140

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

cookbook/console/console_command.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ By default, Symfony will take a look in the ``Command`` directory of you
7575
bundles and automatically register your commands. For the ones implementing
7676
the ``ContainerAwareCommand`` interface, Symfony will even inject the container.
7777

78-
If you wan to, you can instead register them as services in the container using
78+
If you want to, you can instead register them as services in the container using
7979
the ``console.command`` tag:
8080

8181
.. configuration-block::
@@ -115,11 +115,12 @@ the ``console.command`` tag:
115115
.. tip::
116116

117117
Command as a service can be usefull in few situations:
118-
* if you need your commands to be defined somewhere else than ``Command``
119-
* if you need to access services or configuration parameters in the
120-
``configure`` method
121118

122-
For example, Imagine you want to provide a default value for the ``name``
119+
* If you need your commands to be defined somewhere else than ``Command``;
120+
* if you need to access services or configuration parameters in the
121+
``configure`` method.
122+
123+
For example, imagine you want to provide a default value for the ``name``
123124
option. You could hard code a string and pass it as the 4th argument of
124125
``addArgument``, or you could allow the user to set the default value in the
125126
configuration.

0 commit comments

Comments
 (0)