Skip to content

Commit c0334ad

Browse files
Adds proper escaping for php service config format
php configs need `\\\\`, `\\` are not enough. `"service('App\\Mailer')"` compiles into `AppMailer` , `"service('App\\\\Mailer')"` compiles correctly into `App\Mailer`
1 parent 5e7f3e4 commit c0334ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service_container/expression_language.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ to another service: ``App\Mailer``. One way to do this is with an expression:
6767
$services->set(MailerConfiguration::class);
6868
6969
$services->set(Mailer::class)
70-
->args([expr("service('App\\Mail\\MailerConfiguration').getMailerMethod()")]);
70+
->args([expr("service('App\\\\Mail\\\\MailerConfiguration').getMailerMethod()")]);
7171
};
7272
7373
To learn more about the expression language syntax, see :doc:`/components/expression_language/syntax`.

0 commit comments

Comments
 (0)