rector/config/set/php72.php
Tomas Votruba 37b3cecda3
Upgrade to php-parser 4.10.4 and PHPStan 0.12.63 (#4926)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-20 22:05:48 +01:00

56 lines
2.0 KiB
PHP

<?php
declare(strict_types=1);
use Rector\Php72\Rector\Assign\ListEachRector;
use Rector\Php72\Rector\Assign\ReplaceEachAssignmentWithKeyCurrentRector;
use Rector\Php72\Rector\FuncCall\CreateFunctionToAnonymousFunctionRector;
use Rector\Php72\Rector\FuncCall\GetClassOnNullRector;
use Rector\Php72\Rector\FuncCall\IsObjectOnIncompleteClassRector;
use Rector\Php72\Rector\FuncCall\ParseStrWithResultArgumentRector;
use Rector\Php72\Rector\FuncCall\StringifyDefineRector;
use Rector\Php72\Rector\FuncCall\StringsAssertNakedRector;
use Rector\Php72\Rector\Unset_\UnsetCastRector;
use Rector\Php72\Rector\While_\WhileEachToForeachRector;
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(WhileEachToForeachRector::class);
$services->set(ListEachRector::class);
$services->set(ReplaceEachAssignmentWithKeyCurrentRector::class);
$services->set(UnsetCastRector::class);
$services->set(RenameFunctionRector::class)
->call('configure', [[
RenameFunctionRector::OLD_FUNCTION_TO_NEW_FUNCTION => [
# and imagewbmp
'jpeg2wbmp' => 'imagecreatefromjpeg',
# or imagewbmp
'png2wbmp' => 'imagecreatefrompng',
#migration72.deprecated.gmp_random-function
# http://php.net/manual/en/migration72.deprecated.php
# or gmp_random_range
'gmp_random' => 'gmp_random_bits',
'read_exif_data' => 'exif_read_data',
],
]]);
$services->set(GetClassOnNullRector::class);
$services->set(IsObjectOnIncompleteClassRector::class);
$services->set(ParseStrWithResultArgumentRector::class);
$services->set(StringsAssertNakedRector::class);
$services->set(CreateFunctionToAnonymousFunctionRector::class);
$services->set(StringifyDefineRector::class);
};