-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathrector.php
71 lines (56 loc) · 1.81 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Symfony\Set\SymfonySetList;
use Rector\Symfony\Set\TwigSetList;
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\PHPUnit\Set\PHPUnitSetList;
return RectorConfig::configure()
->withIndent(indentChar: ' ', indentSize: 2)
->withSymfonyContainerXml(__DIR__ . '/var/cache/dev/App_KernelDevDebugContainer.xml')
->withImportNames(true, true, true, true)
//--- PHP
->withPhpSets(php74: true)
->withPhpSets(php80: true)
->withPhpSets(php81: true)
->withPhpSets(php82: true)
//--- Attributes
->withAttributesSets(doctrine: true)
->withAttributesSets(sensiolabs: true)
->withAttributesSets(symfony: true)
->withAttributesSets(phpunit: true)
// --- Symphony
->withSets([
SymfonySetList::SYMFONY_54,
SymfonySetList::SYMFONY_60,
SymfonySetList::SYMFONY_61,
SymfonySetList::SYMFONY_62,
SymfonySetList::SYMFONY_63,
SymfonySetList::SYMFONY_64,
SymfonySetList::SYMFONY_CODE_QUALITY,
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION])
->withPreparedSets(symfonyCodeQuality: true, symfonyConfigs: true)
// --- Doctrine
->withSets([
DoctrineSetList::DOCTRINE_DBAL_30,
DoctrineSetList::DOCTRINE_ORM_25,
DoctrineSetList::DOCTRINE_ORM_29,
DoctrineSetList::DOCTRINE_BUNDLE_210,
DoctrineSetList::DOCTRINE_COLLECTION_22,
DoctrineSetList::TYPED_COLLECTIONS,
DoctrineSetList::DOCTRINE_CODE_QUALITY,
])
->withPreparedSets(doctrineCodeQuality: true)
// --- PHPUnit
// ->withSets([
// PHPUnitSetList::PHPUNIT_100,
// PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
// PHPUnitSetList::PHPUNIT_CODE_QUALITY,
// ])
// ->withPreparedSets(phpunit: true, phpunitCodeQuality: true)
// --- Twig
->withSets([
TwigSetList::TWIG_240,
])
->withPreparedSets(twig: true)
;