-
Notifications
You must be signed in to change notification settings - Fork 1
/
rector.php
37 lines (33 loc) · 1.24 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
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Symfony\Set\SymfonySetList;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withRootFiles()
->withPHPStanConfigs([
__DIR__ . '/phpstan.dist.neon',
// rector does not load phpstan extension automatically so require them manually here:
__DIR__ . '/vendor/phpstan/phpstan-doctrine/extension.neon',
__DIR__ . '/vendor/phpstan/phpstan-symfony/extension.neon',
])
->withImportNames(importShortClasses: false)
->withPreparedSets(codeQuality: true, doctrineCodeQuality: true)
->withPhpSets()
// symfony rules
->withSymfonyContainerPhp(__DIR__ . '/var/cache/website/dev/App_KernelDevDebugContainer.xml')
->withSets([
SymfonySetList::SYMFONY_CODE_QUALITY,
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
// activate when doing updates:
// SymfonyLevelSetList::UP_TO_SYMFONY_63,
// activate when doing updates:
// PHPUnitLevelSetList::UP_TO_PHPUNIT_90,
// PHPUnitSetList::PHPUNIT_91,
// sulu rules
// activate for updates when doing updates:
// SuluLevelSetList::UP_TO_SULU_25,
]);