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
2250
2250
2251
2251
class SomeService
2252
2252
{
2253
- private $router;
2254
-
2255
- public function __construct(UrlGeneratorInterface $router)
2253
+ public function __construct(private UrlGeneratorInterface $router)
2256
2254
{
2257
- $this->router = $router;
2258
2255
}
2259
2256
2260
2257
public function someMethod()
@@ -2369,13 +2366,9 @@ Now you'll get the expected results when generating URLs in your commands::
2369
2366
2370
2367
class SomeCommand extends Command
2371
2368
{
2372
- private $router;
2373
-
2374
- public function __construct(RouterInterface $router)
2369
+ public function __construct(private RouterInterface $router)
2375
2370
{
2376
2371
parent::__construct();
2377
-
2378
- $this->router = $router;
2379
2372
}
2380
2373
2381
2374
protected function execute(InputInterface $input, OutputInterface $output): int
You can’t perform that action at this time.
0 commit comments