File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -64,10 +64,16 @@ method. Then you can optionally define a help message and the
64
64
Registering the Command
65
65
-----------------------
66
66
67
- Symfony commands must be registered as services and :doc: `tagged </service_container/tags >`
68
- with the ``console.command `` tag. If the PHP class of your command extends from
69
- :class: `Symfony\\ Component\\ Console\\ Command\\ Command `, Symfony does this for
70
- you automatically.
67
+ Symfony commands must be registered before using them. In order to be registered
68
+ automatically, a command must be:
69
+
70
+ #. Stored in a directory called ``Command/ ``;
71
+ #. Defined in a class whose name ends with ``Command ``;
72
+ #. Defined in a class that extends from
73
+ :class: `Symfony\\ Component\\ Console\\ Command\\ Command `.
74
+
75
+ If you can't meet these conditions for some command, the alternative is to
76
+ manually :doc`register the command as a service </console/commands_as_services>`.
71
77
72
78
Executing the Command
73
79
---------------------
You can’t perform that action at this time.
0 commit comments