rector/config/set/downgrade-php74.php
Leonardo Losoviz 9f8f5e9562
[Downgrade PHP 7.4] Remove self return type (#5146)
* Added tests

* Map "self" type

* Implemented Rector

* Use className as param

* Fixed PHPStan

* Added rector to set
2021-01-11 23:14:54 +01:00

32 lines
1.8 KiB
PHP

<?php
declare(strict_types=1);
use Rector\DowngradePhp74\Rector\Array_\DowngradeArraySpreadRector;
use Rector\DowngradePhp74\Rector\ArrowFunction\ArrowFunctionToAnonymousFunctionRector;
use Rector\DowngradePhp74\Rector\ClassMethod\DowngradeContravariantArgumentTypeRector;
use Rector\DowngradePhp74\Rector\ClassMethod\DowngradeCovariantReturnTypeRector;
use Rector\DowngradePhp74\Rector\ClassMethod\DowngradeReturnSelfTypeDeclarationRector;
use Rector\DowngradePhp74\Rector\Coalesce\DowngradeNullCoalescingOperatorRector;
use Rector\DowngradePhp74\Rector\FuncCall\DowngradeArrayMergeCallWithoutArgumentsRector;
use Rector\DowngradePhp74\Rector\FuncCall\DowngradeStripTagsCallWithArrayRector;
use Rector\DowngradePhp74\Rector\Identical\DowngradeFreadFwriteFalsyToNegationRector;
use Rector\DowngradePhp74\Rector\LNumber\DowngradeNumericLiteralSeparatorRector;
use Rector\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(DowngradeTypedPropertyRector::class);
$services->set(ArrowFunctionToAnonymousFunctionRector::class);
$services->set(DowngradeCovariantReturnTypeRector::class);
$services->set(DowngradeContravariantArgumentTypeRector::class);
$services->set(DowngradeNullCoalescingOperatorRector::class);
$services->set(DowngradeNumericLiteralSeparatorRector::class);
$services->set(DowngradeStripTagsCallWithArrayRector::class);
$services->set(DowngradeArraySpreadRector::class);
$services->set(DowngradeArrayMergeCallWithoutArgumentsRector::class);
$services->set(DowngradeFreadFwriteFalsyToNegationRector::class);
$services->set(DowngradeReturnSelfTypeDeclarationRector::class);
};