File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -448,8 +448,8 @@ Turn static into non static No
448448
449449 .. [9 ] Allowed for the ``void `` return type.
450450
451- .. [10 ] Parameter names are not part of the compatibility promise. Using
452- PHP 8's named arguments feature might break your code when upgrading to
453- newer Symfony versions.
451+ .. [10 ] Parameter names are only covered by the compatibility promise for
452+ constructors of Attribute classes. Using PHP named arguments might
453+ break your code when upgrading to newer Symfony versions.
454454
455455 .. _`Semantic Versioning` : https://semver.org/
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ service's class or interface name. Want to :doc:`log </logging>` something? No p
3333
3434 use Psr\Log\LoggerInterface;
3535 use Symfony\Component\HttpFoundation\Response;
36+ use Symfony\Component\Routing\Annotation\Route;
3637
3738 class ProductController
3839 {
@@ -119,6 +120,7 @@ inside your controller::
119120 // src/Controller/ProductController.php
120121 use App\Service\MessageGenerator;
121122 use Symfony\Component\HttpFoundation\Response;
123+ use Symfony\Component\Routing\Annotation\Route;
122124
123125 /**
124126 * @Route("/products/new")
Original file line number Diff line number Diff line change @@ -67,7 +67,8 @@ 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+ // because of the escaping applied by PHP, you must add 4 backslashes for each original backslash
71+ ->args([expr("service('App\\\\Mail\\\\MailerConfiguration').getMailerMethod()")]);
7172 };
7273
7374 To learn more about the expression language syntax, see :doc: `/components/expression_language/syntax `.
You can’t perform that action at this time.
0 commit comments