-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrector.php
More file actions
49 lines (42 loc) · 1.28 KB
/
rector.php
File metadata and controls
49 lines (42 loc) · 1.28 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
43
44
45
46
47
48
49
<?php
declare(strict_types=1);
use Contao\Rector\Set\ContaoLevelSetList;
use Contao\Rector\Set\ContaoSetList;
use Rector\Config\RectorConfig;
use Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector;
use Rector\Php84\Rector\Param\ExplicitNullableParamTypeRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;
use Rector\ValueObject\PhpVersion;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/src',
])
->withPhpVersion(PhpVersion::PHP_84)
->withRules([
AddVoidReturnTypeWhereNoReturnRector::class,
# In Vorbereitung für PHP 8.4:
ExplicitNullableParamTypeRector::class
])
->withImportNames(
importShortClasses: false,
removeUnusedImports: true,
)
->withComposerBased(
twig: true,
doctrine: true,
phpunit: true,
symfony: true,
)
->withSets([
LevelSetList::UP_TO_PHP_81,
# Erst mit Symfony 6 (Contao 5) nutzen:
// SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES,
ContaoLevelSetList::UP_TO_CONTAO_413,
ContaoSetList::FQCN,
ContaoSetList::ANNOTATIONS_TO_ATTRIBUTES,
])
->withSkip([
ArrayToFirstClassCallableRector::class,
])
;