mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-14 15:12:23 +00:00
b055a88927
* add note about deprecated configure() method * bump rector config to ruleWithConfiguration() * remove ParameterProvider from StaticEasyPrefixer, as requires complete alias cleanup messed with scoped * add RectorConfigProvider
25 lines
817 B
PHP
25 lines
817 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Rector\Config\RectorConfig;
|
|
use Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector;
|
|
use Rector\DowngradePhp80\Rector\Class_\DowngradeAttributeToAnnotationRector;
|
|
use Rector\DowngradePhp80\ValueObject\DowngradeAttributeToAnnotation;
|
|
use Rector\Renaming\Rector\Name\RenameClassRector;
|
|
|
|
return static function (RectorConfig $rectorConfig): void {
|
|
$rectorConfig->paths([
|
|
__DIR__ . '/src',
|
|
]);
|
|
|
|
$rectorConfig->ruleWithConfiguration(RenameClassRector::class, [
|
|
'DateTime' => 'DateTimeInterface'
|
|
]);
|
|
$rectorConfig->ruleWithConfiguration(DowngradeAttributeToAnnotationRector::class, [
|
|
new DowngradeAttributeToAnnotation('Symfony\Component\Routing\Annotation\Route')
|
|
]);
|
|
|
|
$rectorConfig->rule(RemoveUselessVarTagRector::class);
|
|
};
|