forked from CuyZ/Valinor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrector.php
48 lines (41 loc) · 1.8 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
<?php
declare(strict_types=1);
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\Config\RectorConfig;
use Rector\Core\Configuration\Option;
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector;
use Rector\Php74\Rector\Property\RestoreDefaultNullToNullableTypePropertyRector;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Php80\Rector\FunctionLike\MixedTypeRector;
use Rector\Php80\Rector\FunctionLike\UnionTypesRector;
use Rector\Set\ValueObject\LevelSetList;
return static function (RectorConfig $config): void {
$config->paths([
__FILE__,
__DIR__ . '/src',
__DIR__ . '/tests',
]);
$config->parameters()->set(Option::CACHE_DIR, './var/cache/rector');
// @see https://github.com/rectorphp/rector/issues/7341
$config->parameters()->set(Option::CACHE_CLASS, FileCacheStorage::class);
$config->sets([
LevelSetList::UP_TO_PHP_80,
]);
$config->parallel();
$config->skip([
AddLiteralSeparatorToNumberRector::class,
ClassPropertyAssignToConstructorPromotionRector::class,
UnionTypesRector::class => [
__DIR__ . '/tests/Unit/Definition/Repository/Reflection/ReflectionClassDefinitionRepositoryTest',
],
MixedTypeRector::class => [
__DIR__ . '/tests/Integration/Mapping/Object/UnionValuesMappingTest.php',
__DIR__ . '/tests/Unit/Definition/Repository/Reflection/ReflectionClassDefinitionRepositoryTest',
],
RestoreDefaultNullToNullableTypePropertyRector::class => [
__DIR__ . '/tests/Integration/Mapping/Other/FlexibleCastingMappingTest.php',
__DIR__ . '/tests/Integration/Mapping/SingleNodeMappingTest',
],
]);
};