Repository navigation
Expand file tree
/
Copy pathrector.php
More file actions
60 lines (52 loc) · 1.91 KB
/
Copy pathrector.php
File metadata and controls
60 lines (52 loc) · 1.91 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
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
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\CodingStyle\Rector\ClassLike\NewlineBetweenClassLikeStmtsRector;
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector;
use Rector\Config\RectorConfig;
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Symfony\Set\SymfonySetList;
use Rector\ValueObject\PhpVersion;
// vendor/bin/rector process src --dry-run --xdebug
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__.'/src',
__DIR__.'/tests',
]);
$rectorConfig->phpVersion(PhpVersion::PHP_85);
$rectorConfig->phpstanConfig(__DIR__.'/phpstan.dist.neon');
$rectorConfig->parallel();
$rectorConfig->configure()->withComposerBased(
twig: true,
doctrine: true,
phpunit: true,
symfony: true,
);
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_85,
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
SymfonySetList::SYMFONY_CODE_QUALITY,
DoctrineSetList::TYPED_COLLECTIONS,
DoctrineSetList::DOCTRINE_CODE_QUALITY,
DoctrineSetList::GEDMO_ANNOTATIONS_TO_ATTRIBUTES,
]);
$rectorConfig->skip([
__DIR__.'/src/EventListener/ORM/LoggableListener.php',
NewlineAfterStatementRector::class,
NewlineBetweenClassLikeStmtsRector::class,
FlipTypeControlToUseExclusiveTypeRector::class,
ClosureToArrowFunctionRector::class,
]);
$rectorConfig->ruleWithConfiguration(
ClassPropertyAssignToConstructorPromotionRector::class,
[
'inline_public' => false,
'rename_property' => true,
]
);
};