-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
42 lines (32 loc) · 1.15 KB
/
rector.php
File metadata and controls
42 lines (32 loc) · 1.15 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
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Set\ValueObject\LevelSetList;
use Ssch\TYPO3Rector\Set\Typo3LevelSetList;
use Ssch\TYPO3Rector\Set\Typo3SetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/Classes',
__DIR__ . '/Configuration',
__DIR__ . '/Tests',
]);
$rectorConfig->importNames();
$rectorConfig->importShortClasses(false);
$rectorConfig->removeUnusedImports();
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_81,
// Lowest supported TYPO3 — keeps Rector from introducing v13/v14-only APIs.
Typo3LevelSetList::UP_TO_TYPO3_12,
Typo3SetList::CODE_QUALITY,
Typo3SetList::GENERAL,
]);
$rectorConfig->skip([
__DIR__ . '/ext_emconf.php',
__DIR__ . '/.Build',
__DIR__ . '/vendor',
ClassPropertyAssignToConstructorPromotionRector::class,
RemoveParentCallWithoutParentRector::class,
]);
};