Skip to content

Commit

Permalink
Fix YAML example in "Defining a Service Locator" section
Browse files Browse the repository at this point in the history
Service locator is a first constructor argument but is passed as an array of constructor arguments.
  • Loading branch information
jbieliauskas authored Jan 30, 2022
1 parent 300cf43 commit bd8b262
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions service_container/service_subscribers_locators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,10 @@ argument of type ``service_locator``:
# config/services.yaml
services:
App\CommandBus:
arguments: !service_locator
App\FooCommand: '@app.command_handler.foo'
App\BarCommand: '@app.command_handler.bar'
arguments:
- !service_locator
App\FooCommand: '@app.command_handler.foo'
App\BarCommand: '@app.command_handler.bar'
.. code-block:: xml
Expand Down

0 comments on commit bd8b262

Please sign in to comment.