Skip to content

Commit e6ee3aa

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: User double \ instead of four \ in expression service
2 parents 7213ac3 + 3a54bc3 commit e6ee3aa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

service_container/expression_language.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ to another service: ``App\Mailer``. One way to do this is with an expression:
2828
App\Mail\MailerConfiguration: ~
2929
3030
App\Mailer:
31-
arguments: ["@=service('App\\\\Mail\\\\MailerConfiguration').getMailerMethod()"]
31+
arguments: ['@=service("App\\Mail\\MailerConfiguration").getMailerMethod()']
32+
# when using double-quoted strings, the backslash needs to be escaped twice (see https://yaml.org/spec/1.2/spec.html#id2787109)
33+
# arguments: ["@=service('App\\\\Mail\\\\MailerConfiguration').getMailerMethod()"]
3234
3335
.. code-block:: xml
3436

0 commit comments

Comments
 (0)