-
Notifications
You must be signed in to change notification settings - Fork 36
/
rector.php
108 lines (94 loc) · 3.65 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
declare(strict_types=1);
/*
* This file is part of the package t3o/get.typo3.org.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
use Rector\CodingStyle\Rector\Class_\AddArrayDefaultToArrayPropertyRector;
use Rector\Config\RectorConfig;
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\PHPUnit\Set\PHPUnitLevelSetList;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Symfony\Set\JMSSetList;
use Rector\Symfony\Set\SensiolabsSetList;
use Rector\Symfony\Set\SymfonyLevelSetList;
use Rector\Symfony\Set\SymfonySetList;
use Rector\Symfony\Set\TwigSetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/migrations',
__DIR__ . '/src',
__DIR__ . '/tests',
__DIR__ . '/.php-cs-fixer.dist.php',
__FILE__,
]);
$rectorConfig->bootstrapFiles([
__DIR__ . '/vendor/autoload.php',
__DIR__ . '/tools/phpunit/vendor/autoload.php',
]);
$rectorConfig->sets([
//LevelSetList::UP_TO_PHP_82,
LevelSetList::UP_TO_PHP_81,
SetList::ACTION_INJECTION_TO_CONSTRUCTOR_INJECTION,
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
SetList::DEAD_CODE,
SetList::MONOLOG_20,
//SetList::NAMING,
//SetList::PRIVATIZATION,
SetList::PSR_4,
SetList::TYPE_DECLARATION,
SetList::TYPE_DECLARATION_STRICT,
SetList::EARLY_RETURN,
SetList::RECTOR_CONFIG,
// Symfony specific rule sets
SymfonyLevelSetList::UP_TO_SYMFONY_54,
SymfonySetList::SYMFONY_STRICT,
SymfonySetList::SYMFONY_CODE_QUALITY,
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
SensiolabsSetList::FRAMEWORK_EXTRA_50,
// Twig specific rule sets
TwigSetList::TWIG_UNDERSCORE_TO_NAMESPACE,
// JMS specific rule sets
JMSSetList::REMOVE_JMS_INJECT,
JMSSetList::ANNOTATIONS_TO_ATTRIBUTES,
// Doctrine specific rule sets
DoctrineSetList::DOCTRINE_25,
DoctrineSetList::DOCTRINE_BEHAVIORS_20,
DoctrineSetList::DOCTRINE_CODE_QUALITY,
DoctrineSetList::DOCTRINE_COMMON_20,
//DoctrineSetList::DOCTRINE_DBAL_211,
DoctrineSetList::DOCTRINE_DBAL_30,
//DoctrineSetList::DOCTRINE_GEDMO_TO_KNPLABS,
//DoctrineSetList::DOCTRINE_REPOSITORY_AS_SERVICE,
DoctrineSetList::DOCTRINE_ORM_29,
DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
// PHPUnit specific rule sets
PHPUnitLevelSetList::UP_TO_PHPUNIT_90,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
PHPUnitSetList::PHPUNIT_EXCEPTION,
PHPUnitSetList::REMOVE_MOCKS,
PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD,
PHPUnitSetList::PHPUNIT_YIELD_DATA_PROVIDER,
]);
$rectorConfig->skip([
AddArrayDefaultToArrayPropertyRector::class => [__DIR__ . '/src/Model/SatisJson.php'],
]);
$rectorConfig->symfonyContainerXml(__DIR__ . '/var/cache/dev/App_KernelDevDebugContainer.xml');
};