RemoveAnnotatedClassesToCompileRector
Remove deprecated annotated classes to compile from Kernel and Extension classes
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
final class SomeExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container): void
{
- $this->addAnnotatedClassesToCompile(['App\\Controller\\']);
}
}
Configure your rector.php:
<?php
use Rector\Config\RectorConfig;
use Rector\Symfony\Symfony80\Rector\Class_\RemoveAnnotatedClassesToCompileRector;
return RectorConfig::configure()
->withRules([
RemoveAnnotatedClassesToCompileRector::class,
]);
PACKAGE:
symfony/http-kernel >=7.1