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