Skip to content

Commit 5bfe888

Browse files
committed
Tweak
1 parent f086377 commit 5bfe888

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

service_container/expression_language.rst

Lines changed: 1 addition & 2 deletions
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()', var_export(MailerConfiguration::class, true)))]);
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)