From a741c9ce46f60e4d57e4d648d11525164956da31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20SURACI?= Date: Wed, 9 Dec 2020 15:15:47 +0100 Subject: [PATCH] [Service Container] Fix Service parameters typo in services.yml --- service_container.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/service_container.rst b/service_container.rst index ff80ac27a14..a33dbdfb786 100644 --- a/service_container.rst +++ b/service_container.rst @@ -340,7 +340,7 @@ you can type-hint the new ``SiteUpdateManager`` class and use it:: // src/Controller/SiteController.php namespace App\Controller; - + // ... use App\Service\SiteUpdateManager; @@ -500,13 +500,14 @@ parameter and in PHP config use the ``ref`` function: # config/services.yaml services: App\Service\MessageGenerator: - # this is not a string, but a reference to a service called 'logger' - arguments: ['@logger'] + arguments: + # this is not a string, but a reference to a service called 'logger' + - '@logger' - # if the value of a string parameter starts with '@', you need to escape - # it by adding another '@' so Symfony doesn't consider it a service - # (this will be parsed as the string '@securepassword') - mailer_password: '@@securepassword' + # if the value of a string argument starts with '@', you need to escape + # it by adding another '@' so Symfony doesn't consider it a service + # the following example would be parsed as the string '@securepassword' + # - '@@securepassword' .. code-block:: xml