-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
29 lines (27 loc) · 1.12 KB
/
rector.php
File metadata and controls
29 lines (27 loc) · 1.12 KB
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
<?php
use Rector\Config\RectorConfig;
use Rector\Symfony\Set\SymfonySetList;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector;
return RectorConfig::configure()
->withPaths([__DIR__.'/src', __DIR__.'/tests'])
// https://getrector.com/documentation/composer-based-sets
->withComposerBased(twig: true, doctrine: true, phpunit: true, symfony: true)
// https://github.com/rectorphp/rector-symfony
->withSymfonyContainerXml(__DIR__.'/var/cache/dev/App_KernelDevDebugContainer.xml')
->withSets([
SymfonySetList::SYMFONY_72,
SymfonySetList::SYMFONY_CODE_QUALITY,
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
])
// register single rule
->withRules([
// TypedPropertyFromStrictConstructorRector::class, I dont know what this does
])
// here we can define, what prepared sets of rules will be applied
->withPreparedSets(
deadCode: true, // What does this?
codeQuality: true // What does this?
)
->withAttributesSets(symfony: true)
// https://getrector.com/documentation/import-names
->withImportNames(true);