Skip to content

Commit bd8b262

Browse files
authored
Fix YAML example in "Defining a Service Locator" section
Service locator is a first constructor argument but is passed as an array of constructor arguments.
1 parent 300cf43 commit bd8b262

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

service_container/service_subscribers_locators.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,10 @@ argument of type ``service_locator``:
256256
# config/services.yaml
257257
services:
258258
App\CommandBus:
259-
arguments: !service_locator
260-
App\FooCommand: '@app.command_handler.foo'
261-
App\BarCommand: '@app.command_handler.bar'
259+
arguments:
260+
- !service_locator
261+
App\FooCommand: '@app.command_handler.foo'
262+
App\BarCommand: '@app.command_handler.bar'
262263
263264
.. code-block:: xml
264265

0 commit comments

Comments
 (0)