-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathdowngrade-php74.php
More file actions
39 lines (35 loc) · 1.95 KB
/
downgrade-php74.php
File metadata and controls
39 lines (35 loc) · 1.95 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
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\ValueObject\PhpVersion;
use Rector\DowngradePhp74\Rector\ArrowFunction\ArrowFunctionToAnonymousFunctionRector;
use Rector\DowngradePhp74\Rector\ClassMethod\DowngradeContravariantArgumentTypeRector;
use Rector\DowngradePhp74\Rector\ClassMethod\DowngradeCovariantReturnTypeRector;
use Rector\DowngradePhp74\Rector\Coalesce\DowngradeNullCoalescingOperatorRector;
use Rector\DowngradePhp74\Rector\FuncCall\DowngradeArrayMergeCallWithoutArgumentsRector;
use Rector\DowngradePhp74\Rector\FuncCall\DowngradeProcOpenArrayCommandArgRector;
use Rector\DowngradePhp74\Rector\FuncCall\DowngradeStripTagsCallWithArrayRector;
use Rector\DowngradePhp74\Rector\Identical\DowngradeFreadFwriteFalsyToNegationRector;
use Rector\DowngradePhp74\Rector\Interface_\DowngradePreviouslyImplementedInterfaceRector;
use Rector\DowngradePhp74\Rector\LNumber\DowngradeNumericLiteralSeparatorRector;
use Rector\DowngradePhp74\Rector\MethodCall\DowngradeReflectionGetTypeRector;
use Rector\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->phpVersion(PhpVersion::PHP_73);
$rectorConfig->rules([
DowngradeTypedPropertyRector::class,
ArrowFunctionToAnonymousFunctionRector::class,
DowngradeCovariantReturnTypeRector::class,
DowngradeContravariantArgumentTypeRector::class,
DowngradeNullCoalescingOperatorRector::class,
DowngradeNumericLiteralSeparatorRector::class,
DowngradeStripTagsCallWithArrayRector::class,
// DowngradeArraySpreadRector::class,
// already handled in PHP 8.1 set
DowngradeArrayMergeCallWithoutArgumentsRector::class,
DowngradeFreadFwriteFalsyToNegationRector::class,
DowngradePreviouslyImplementedInterfaceRector::class,
DowngradeReflectionGetTypeRector::class,
DowngradeProcOpenArrayCommandArgRector::class,
]);
};