From bd8b2624bb66518eb950f726debb38b12eb61f7b Mon Sep 17 00:00:00 2001 From: Justas Bieliauskas Date: Sun, 30 Jan 2022 14:54:39 +0200 Subject: [PATCH] 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. --- service_container/service_subscribers_locators.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/service_container/service_subscribers_locators.rst b/service_container/service_subscribers_locators.rst index a0316738d8e..72971213618 100644 --- a/service_container/service_subscribers_locators.rst +++ b/service_container/service_subscribers_locators.rst @@ -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