2020-07-18 18:57:24 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2020-11-28 00:16:19 +01:00
|
|
|
use Rector\Downgrade\Rector\LNumber\ChangePhpVersionInPlatformCheckRector;
|
2020-12-03 14:27:24 +01:00
|
|
|
use Rector\DowngradePhp80\Rector\Class_\DowngradePropertyPromotionToConstructorPropertyAssignRector;
|
2020-09-08 23:18:49 +08:00
|
|
|
use Rector\DowngradePhp80\Rector\FunctionLike\DowngradeParamMixedTypeDeclarationRector;
|
|
|
|
use Rector\DowngradePhp80\Rector\FunctionLike\DowngradeReturnMixedTypeDeclarationRector;
|
|
|
|
use Rector\DowngradePhp80\Rector\FunctionLike\DowngradeReturnStaticTypeDeclarationRector;
|
2020-09-08 21:25:38 +08:00
|
|
|
use Rector\DowngradePhp80\Rector\FunctionLike\DowngradeUnionTypeParamDeclarationRector;
|
|
|
|
use Rector\DowngradePhp80\Rector\FunctionLike\DowngradeUnionTypeReturnDeclarationRector;
|
|
|
|
use Rector\DowngradePhp80\Rector\Property\DowngradeUnionTypeTypedPropertyRector;
|
2020-07-18 18:57:24 +02:00
|
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
|
|
|
|
|
|
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
|
|
|
$services = $containerConfigurator->services();
|
2020-09-08 21:25:38 +08:00
|
|
|
$services->set(DowngradeUnionTypeTypedPropertyRector::class);
|
|
|
|
$services->set(DowngradeUnionTypeReturnDeclarationRector::class);
|
|
|
|
$services->set(DowngradeUnionTypeParamDeclarationRector::class);
|
2020-09-08 23:18:49 +08:00
|
|
|
$services->set(DowngradeParamMixedTypeDeclarationRector::class);
|
|
|
|
$services->set(DowngradeReturnMixedTypeDeclarationRector::class);
|
|
|
|
$services->set(DowngradeReturnStaticTypeDeclarationRector::class);
|
2020-12-03 14:27:24 +01:00
|
|
|
$services->set(ChangePhpVersionInPlatformCheckRector::class)->call('configure', [[
|
|
|
|
ChangePhpVersionInPlatformCheckRector::TARGET_PHP_VERSION => 80000,
|
|
|
|
]]);
|
|
|
|
$services->set(DowngradePropertyPromotionToConstructorPropertyAssignRector::class);
|
2020-07-18 18:57:24 +02:00
|
|
|
};
|