Skip to content

Commit a4a9b3f

Browse files
committed
Merge branch '5.0'
* 5.0: Fix PHP example on ExpressionLanguage Injection
2 parents d1b3020 + dddfd39 commit a4a9b3f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

service_container/expression_language.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,9 @@ 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("service('App\\Mail\\MailerConfiguration').getMailerMethod()")]);
7171
};
7272
73-
7473
To learn more about the expression language syntax, see :doc:`/components/expression_language/syntax`.
7574

7675
In this context, you have access to 2 functions:

0 commit comments

Comments
 (0)