Run Rector on your code to see what it can do for you:
<?php use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
final class HelloController extends AbstractController { - #[Route('/path/{uuid}', name: 'name')] - public function someAction( - UuidV4 $uuid, - ) { - return $this->render('template.html.twig'); + public function __construct(private readonly \Symfony\Component\Uid\UuidV4 $uuid) + { + } + #[Route('/path/{uuid}', name: 'name')] + public function someAction() + { + return $this->render('template.html.twig'); } }
Applied Rules:
Not a change you expect?
rector.php