From 6c60285d419190060f62a8a28b9bc2ccae62c0dc Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Delhommeau Date: Fri, 18 Oct 2019 17:35:16 +0200 Subject: [PATCH] User double \ instead of four \ in expression service --- service_container/expression_language.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/service_container/expression_language.rst b/service_container/expression_language.rst index 947946f7805..2f3f7ae2138 100644 --- a/service_container/expression_language.rst +++ b/service_container/expression_language.rst @@ -28,7 +28,9 @@ to another service: ``App\Mailer``. One way to do this is with an expression: App\Mail\MailerConfiguration: ~ App\Mailer: - arguments: ["@=service('App\\\\Mail\\\\MailerConfiguration').getMailerMethod()"] + arguments: ['@=service("App\\Mail\\MailerConfiguration").getMailerMethod()'] + # when using double-quoted strings, the backslash needs to be escaped twice (see https://yaml.org/spec/1.2/spec.html#id2787109) + # arguments: ["@=service('App\\\\Mail\\\\MailerConfiguration').getMailerMethod()"] .. code-block:: xml