-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
rector.php
46 lines (39 loc) · 1.68 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
<?php
declare(strict_types=1);
use Rector\Core\Configuration\Option;
use Rector\PostRector\Rector\NameImportingPostRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Ssch\TYPO3Rector\Configuration\Typo3Option;
use Ssch\TYPO3Rector\Set\Typo3SetList;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$containerConfigurator->import(Typo3SetList::TYPO3_76);
$containerConfigurator->import(Typo3SetList::TYPO3_87);
$containerConfigurator->import(Typo3SetList::TYPO3_95);
// $containerConfigurator->import(Typo3SetList::TYPO3_104);
// $containerConfigurator->import(Typo3SetList::TYPO3_11);
$containerConfigurator->import(SetList::CODE_QUALITY);
$containerConfigurator->import(SetList::TYPE_DECLARATION);
$containerConfigurator->import(LevelSetList::UP_TO_PHP_73);
$parameters = $containerConfigurator->parameters();
$parameters->set(Option::PHPSTAN_FOR_RECTOR_PATH, Typo3Option::PHPSTAN_FOR_RECTOR_PATH);
$parameters->set(Option::AUTO_IMPORT_NAMES, true);
$parameters->set(Option::IMPORT_SHORT_CLASSES, false);
$parameters->set(Option::IMPORT_DOC_BLOCKS, false);
$parameters->set(Option::PATHS, [
'ext_emconf.php',
'composer.json',
__DIR__ . '/Classes/',
__DIR__ . '/Configuration/',
__DIR__ . '/Tests/',
]);
$parameters->set(Option::SKIP, [
__DIR__.'/Classes/DataProcessing/FileProcessor.php',
NameImportingPostRector::class => [
'ext_emconf.php',
'ext_localconf.php',
'ext_tables.php',
],
]);
};