Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bd8b262

Browse filesBrowse 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
Copy full SHA for bd8b262

File tree

Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed

‎service_container/service_subscribers_locators.rst

Copy file name to clipboardExpand all lines: service_container/service_subscribers_locators.rst
+4-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.