Skip to content

Commit c7cdae0

Browse files
committed
Minor tweak
1 parent de28f4c commit c7cdae0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

service_container/service_subscribers_locators.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,17 @@ service definition to pass a collection of services to the service locator:
258258
-
259259
App\FooCommand: '@app.command_handler.foo'
260260
App\BarCommand: '@app.command_handler.bar'
261-
# if the element has no key, the ID of the original service is used
262-
'@app.command_handler.baz'
263-
264261
# if you are not using the default service autoconfiguration,
265262
# add the following tag to the service definition:
266263
# tags: ['container.service_locator']
267264
265+
# if the element has no key, the ID of the original service is used
266+
app.another_command_handler_locator:
267+
class: Symfony\Component\DependencyInjection\ServiceLocator
268+
arguments:
269+
-
270+
- '@app.command_handler.baz'
271+
268272
.. code-block:: xml
269273
270274
<!-- config/services.xml -->

0 commit comments

Comments
 (0)