8000 minor #12513 Use double \ instead of four \ in expression service (jb… · symfony/symfony-docs@3a54bc3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3a54bc3

Browse files
committed
minor #12513 Use double \ instead of four \ in expression service (jbdelhommeau)
This PR was merged into the 4.3 branch. Discussion ---------- Use double \ instead of four \ in expression service <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- 6c60285 User double \ instead of four \ in expression service
2 parents 72540b2 + 6c60285 commit 3a5
8000
4bc3

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)
0