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 6c60285

Browse filesBrowse files
jbdelhommeauJean-Baptiste Delhommeau
authored and
Jean-Baptiste Delhommeau
committed
User double \ instead of four \ in expression service
1 parent 134a7f0 commit 6c60285
Copy full SHA for 6c60285

File tree

1 file changed

+3
-1
lines changed
Filter options

1 file changed

+3
-1
lines changed

‎service_container/expression_language.rst

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