File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -2193,12 +2193,8 @@ the :class:`Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface` class
21932193
21942194 class SomeService
21952195 {
2196- private $router;
2197-
2198- public function __construct(UrlGeneratorInterface $router)
2199- {
2200- $this->router = $router;
2201- }
2196+ public function __construct(private UrlGeneratorInterface $router)
2197+ {}
22022198
22032199 public function someMethod()
22042200 {
@@ -2312,13 +2308,9 @@ Now you'll get the expected results when generating URLs in your commands::
23122308
23132309 class SomeCommand extends Command
23142310 {
2315- private $router;
2316-
2317- public function __construct(RouterInterface $router)
2311+ public function __construct(private RouterInterface $router)
23182312 {
23192313 parent::__construct();
2320-
2321- $this->router = $router;
23222314 }
23232315
23242316 protected function execute(InputInterface $input, OutputInterface $output): int
You can’t perform that action at this time.
0 commit comments