Skip to content

Commit f086377

Browse files
committed
minor #13598 Fix PHP example on ExpressionLanguage Injection (jderusse)
This PR was submitted for the 5.0 branch but it was merged into the 4.4 branch instead. Discussion ---------- Fix PHP example on ExpressionLanguage Injection Current example does not work. generate `service(App\Service)` instead of `service('App\\Service')` Missing quotes and `\` escape Commits ------- 394385d Fix PHP example on ExpressionLanguage Injection
2 parents 40f1a98 + 394385d commit f086377

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(sprintf('service(%s).getMailerMethod()', MailerConfiguration::class))]);
70+
->args([expr(sprintf('service(%s).getMailerMethod()', var_export(MailerConfiguration::class, true)))]);
7171
};
7272
7373

0 commit comments

Comments
 (0)