Configurable

DowngradeAttributeToAnnotationRector

Refactor PHP attribute markers to annotations notation

 use Symfony\Component\Routing\Annotation\Route;

 class SymfonyRoute
 {
-    #[Route(path: '/path', name: 'action')]
+    /**
+     * @Route("/path", name="action")
+     */
     public function action()
     {
     }
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\DowngradePhp80\Rector\Class_\DowngradeAttributeToAnnotationRector;
use Rector\DowngradePhp80\ValueObject\DowngradeAttributeToAnnotation;

return RectorConfig::configure()
    ->withConfiguredRule(DowngradeAttributeToAnnotationRector::class, [
        new DowngradeAttributeToAnnotation('Symfony\Component\Routing\Annotation\Route'),
    ]);