-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rector.php
62 lines (55 loc) · 2.01 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
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Core\ValueObject\PhpVersion;
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector;
use Rector\Set\ValueObject\SetList;
use Rector\Symfony\Set\SymfonySetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->phpVersion(phpVersion: PhpVersion::PHP_81);
$rectorConfig->importNames();
$rectorConfig->importShortClasses();
$rectorConfig->parallel();
$rectorConfig->symfonyContainerPhp(filePath: __DIR__.'var/cache/dev/App_KernelDevDebugContainer.php');
$rectorConfig->autoloadPaths(autoloadPaths: [
__DIR__.'/vendor/autoload.php',
]);
$rectorConfig->paths(paths: [
__DIR__.'/src',
__DIR__.'/tests',
]);
$rectorConfig->skip(criteria: [
__DIR__.'/vendor',
FinalizeClassesWithoutChildrenRector::class => [
__DIR__.'/src/Platform/Entity/Author.php',
__DIR__.'/src/Platform/Entity/Page.php',
__DIR__.'/src/Platform/Entity/User.php',
],
]);
$rectorConfig->sets(sets: [
// SetList::CODE_QUALITY,
// SetList::CODING_STYLE,
SetList::DEAD_CODE,
SetList::EARLY_RETURN,
SetList::PHP_81,
SetList::PSR_4,
SetList::PRIVATIZATION,
SetList::TYPE_DECLARATION,
// SetList::TYPE_DECLARATION_STRICT,
// SymfonySetList::SYMFONY_STRICT,
SymfonySetList::SYMFONY_44,
SymfonySetList::SYMFONY_50,
SymfonySetList::SYMFONY_50_TYPES,
SymfonySetList::SYMFONY_51,
SymfonySetList::SYMFONY_52,
SymfonySetList::SYMFONY_52_VALIDATOR_ATTRIBUTES,
SymfonySetList::SYMFONY_53,
SymfonySetList::SYMFONY_54,
SymfonySetList::SYMFONY_60,
SymfonySetList::SYMFONY_61,
SymfonySetList::SYMFONY_62,
SymfonySetList::SYMFONY_CODE_QUALITY,
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
// SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES,
]);
};