File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,9 @@ Register Commands in the Service Container
71
71
Support for registering commands in the service container was added in
72
72
version 2.4.
73
73
74
- You can register commands in the service container using the ``console.command ``
75
- tag:
74
+ Instead of putting your command in the ``Command `` directory and having Symfony
75
+ auto-discover it for you, you can register commands in the service container
76
+ using the ``console.command `` tag:
76
77
77
78
.. configuration-block ::
78
79
@@ -108,6 +109,12 @@ tag:
108
109
->addTag('console.command')
109
110
;
110
111
112
+ .. tip ::
113
+
114
+ Registering your command as a service gives you more control over its
115
+ location and the services that are injected into it. But, there are no
116
+ functional advantages, so you don't need register your command as a service.
117
+
111
118
Getting Services from the Service Container
112
119
-------------------------------------------
113
120
You can’t perform that action at this time.
0 commit comments