-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathrector.php
33 lines (29 loc) · 1.12 KB
/
rector.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Symfony\CodeQuality\Rector\ClassMethod\ActionSuffixRemoverRector;
use Rector\Symfony\Set\SymfonySetList;
use Rector\Config\RectorConfig;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);
$rectorConfig->symfonyContainerXml(__DIR__ . '/var/cache/dev/App_KernelDevDebugContainer.xml');
$rectorConfig->importNames();
$rectorConfig->phpVersion(\Rector\ValueObject\PhpVersion::PHP_81);
$rectorConfig->skip([
// SonataAdminBundle CRUDController needs the suffix for actions
ActionSuffixRemoverRector::class => [
__DIR__ . '/src/Controller/AliasCRUDController.php',
__DIR__ . '/src/Controller/UserCRUDController.php',
],
]);
$rectorConfig->sets([
SetList::PHP_81,
SymfonySetList::SYMFONY_CODE_QUALITY,
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES,
DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
]);
};