File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -2254,11 +2254,8 @@ the :class:`Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface` class
22542254
22552255 class SomeService
22562256 {
2257- private $router;
2258-
2259- public function __construct(UrlGeneratorInterface $router)
2257+ public function __construct(private UrlGeneratorInterface $router)
22602258 {
2261- $this->router = $router;
22622259 }
22632260
22642261 public function someMethod()
@@ -2373,13 +2370,9 @@ Now you'll get the expected results when generating URLs in your commands::
23732370
23742371 class SomeCommand extends Command
23752372 {
2376- private $router;
2377-
2378- public function __construct(RouterInterface $router)
2373+ public function __construct(private RouterInterface $router)
23792374 {
23802375 parent::__construct();
2381-
2382- $this->router = $router;
23832376 }
23842377
23852378 protected function execute(InputInterface $input, OutputInterface $output): int
You can’t perform that action at this time.
0 commit comments