Run Rector on your code to see what it can do for you:
<?php namespace App\Controller;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; -#[Route(path: '/electronics-signatures-orders')] -class ElectronicSignatureOrderController extends AbstractController -{ +class ElectronicSignatureOrderController extends AbstractController +{ #[Route(path: '/', name: 'index_electronic_signature_order')] public function __invoke(): string { return 'foo'; - } - - #[Route(path: '/add', name: 'electronic-signature-orders-add')] + } + #[Route(path: '/electronics-signatures-orders/add', name: 'electronic-signature-orders-add')] public function addElectronicSignatureCommand(): string { return 'bar'; - } + } }
Applied Rules:
Not a change you expect?
rector.php