mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 11:44:14 +01:00
03ce06db76
[Php74] Handle Multiple types with NullType on TypedPropertyRector when PHP 8.0 Feature enabled (#1803)
26 lines
1.7 KiB
PHP
26 lines
1.7 KiB
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace RectorPrefix20220211;
|
|
|
|
use Rector\Core\Configuration\Option;
|
|
use Rector\Core\ValueObject\PhpVersion;
|
|
use Rector\DowngradePhp72\Rector\ClassMethod\DowngradeParameterTypeWideningRector;
|
|
use Rector\DowngradePhp72\Rector\ConstFetch\DowngradePhp72JsonConstRector;
|
|
use Rector\DowngradePhp72\Rector\FuncCall\DowngradeJsonDecodeNullAssociativeArgRector;
|
|
use Rector\DowngradePhp72\Rector\FuncCall\DowngradePregUnmatchedAsNullConstantRector;
|
|
use Rector\DowngradePhp72\Rector\FuncCall\DowngradeStreamIsattyRector;
|
|
use Rector\DowngradePhp72\Rector\FunctionLike\DowngradeObjectTypeDeclarationRector;
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
|
return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
|
$parameters = $containerConfigurator->parameters();
|
|
$parameters->set(\Rector\Core\Configuration\Option::PHP_VERSION_FEATURES, \Rector\Core\ValueObject\PhpVersion::PHP_71);
|
|
$services = $containerConfigurator->services();
|
|
$services->set(\Rector\DowngradePhp72\Rector\FunctionLike\DowngradeObjectTypeDeclarationRector::class);
|
|
$services->set(\Rector\DowngradePhp72\Rector\ClassMethod\DowngradeParameterTypeWideningRector::class);
|
|
$services->set(\Rector\DowngradePhp72\Rector\FuncCall\DowngradePregUnmatchedAsNullConstantRector::class);
|
|
$services->set(\Rector\DowngradePhp72\Rector\FuncCall\DowngradeStreamIsattyRector::class);
|
|
$services->set(\Rector\DowngradePhp72\Rector\FuncCall\DowngradeJsonDecodeNullAssociativeArgRector::class);
|
|
$services->set(\Rector\DowngradePhp72\Rector\ConstFetch\DowngradePhp72JsonConstRector::class);
|
|
};
|