-
Notifications
You must be signed in to change notification settings - Fork 5
/
rector.php
39 lines (36 loc) · 1.89 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
34
35
36
37
38
39
<?php
declare(strict_types=1);
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\Config\RectorConfig;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Php80\ValueObject\AnnotationToAttribute;
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
return RectorConfig::configure()
->withCache('./var/cache/rector', FileCacheStorage::class)
->withPaths([__DIR__ . '/src'])
->withImportNames()
->withParallel(timeoutSeconds: 180, jobSize: 10)
->withPhpSets()
->withSets([
\Rector\Symfony\Set\SymfonySetList::SYMFONY_54,
\Rector\Symfony\Set\SymfonySetList::SYMFONY_60,
\Rector\Symfony\Set\SymfonySetList::SYMFONY_61,
\Rector\Symfony\Set\SymfonySetList::SYMFONY_62,
\Rector\Symfony\Set\SymfonySetList::SYMFONY_63,
\Rector\Symfony\Set\SymfonySetList::SYMFONY_64,
])
->withAttributesSets(symfony: true, doctrine: true, gedmo: true, jms: true)
->withConfiguredRule(\Rector\Php80\Rector\Class_\AnnotationToAttributeRector::class, [
new AnnotationToAttribute(\App\Attribute\DenyOnFrozenStudyArea::class),
new AnnotationToAttribute(\App\Validator\Constraint\Color::class),
new AnnotationToAttribute(\App\Validator\Constraint\ConceptRelation::class),
new AnnotationToAttribute(\App\Validator\Constraint\StudyAreaAccessType::class),
new AnnotationToAttribute(\App\Validator\Constraint\Data\WordCount::class),
])
->withSymfonyContainerXml(__DIR__ . '/var/cache/dev/App_KernelDevDebugContainer.xml')
->withSymfonyContainerPhp(__DIR__ . '/tests/rector/symfony-container.php')
->withSkip([
__DIR__ . '/src/Database/Traits/IdTrait.php', // @todo: Remove this when moving to attributes for Doctrine
ReadOnlyPropertyRector::class, // Cannot be used with proxies yet (https://github.com/Ocramius/ProxyManager/issues/737)
ClassPropertyAssignToConstructorPromotionRector::class, // Messes up the annotations
]);