-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
rector.php
31 lines (23 loc) · 1.16 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
<?php
declare(strict_types=1);
use Rector\Core\Configuration\Option;
use Rector\Set\ValueObject\LevelSetList;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
// get parameters
$parameters = $containerConfigurator->parameters();
$parameters->set(Option::PATHS, [
__DIR__ . '/Bundle/*/src'
]);
$containerConfigurator->import(LevelSetList::UP_TO_PHP_80);
$services = $containerConfigurator->services();
// risky rule
$services->remove(\Rector\Php80\Rector\FunctionLike\UnionTypesRector::class);
// uncomprehensive spaceship operator
$services->remove(\Rector\Php70\Rector\If_\IfToSpaceshipRector::class);
// avoid auto promotion
$services->remove(\Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector::class);
$containerConfigurator->import(\Rector\Symfony\Set\SymfonySetList::SYMFONY_60);
$containerConfigurator->import(\Rector\Symfony\Set\SymfonySetList::SYMFONY_CODE_QUALITY);
$containerConfigurator->import(\Rector\Symfony\Set\SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION);
};