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 @@ -2250,11 +2250,8 @@ the :class:`Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface` class
22502250
22512251 class SomeService
22522252 {
2253- private $router;
2254-
2255- public function __construct(UrlGeneratorInterface $router)
2253+ public function __construct(private UrlGeneratorInterface $router)
22562254 {
2257- $this->router = $router;
22582255 }
22592256
22602257 public function someMethod()
@@ -2369,13 +2366,9 @@ Now you'll get the expected results when generating URLs in your commands::
23692366
23702367 class SomeCommand extends Command
23712368 {
2372- private $router;
2373-
2374- public function __construct(RouterInterface $router)
2369+ public function __construct(private RouterInterface $router)
23752370 {
23762371 parent::__construct();
2377-
2378- $this->router = $router;
23792372 }
23802373
23812374 protected function execute(InputInterface $input, OutputInterface $output): int
You can’t perform that action at this time.
0 commit comments