Skip to content

Commit 5cb0c1e

Browse files
committed
minor #9420 Fix FQCN in PHP example for expression language (hacfi)
This PR was submitted for the 4.0 branch but it was merged into the 3.4 branch instead (closes #9420). Discussion ---------- Fix FQCN in PHP example for expression language <!-- 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). --> I was following the example and got an error `You have requested a non-existent service \"AppMailMailerConfiguration\"`. I debugged it and I think it’s not an code issue but just the documentation. The YAML version also uses 4 `\`. Maybe we need to fix the XML version as well but I wasn’t sure and didn’t have time to test it. Commits ------- a268135 Fix FQCN in PHP example for expression language
2 parents 03337ef + a268135 commit 5cb0c1e

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
@@ -60,7 +60,7 @@ to another service: ``AppBundle\Mailer``. One way to do this is with an expressi
6060
$container->autowire(MailerConfiguration::class);
6161
6262
$container->autowire(Mailer::class)
63-
->addArgument(new Expression('service("AppBundle\Mail\MailerConfiguration").getMailerMethod()'));
63+
->addArgument(new Expression('service("AppBundle\\\\Mail\\\\MailerConfiguration").getMailerMethod()'));
6464
6565
To learn more about the expression language syntax, see :doc:`/components/expression_language/syntax`.
6666

0 commit comments

Comments
 (0)