2020-07-18 18:57:24 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
2020-08-18 17:57:30 +02:00
|
|
|
use Rector\Renaming\Rector\Name\RenameClassRector;
|
2020-08-25 00:26:14 +02:00
|
|
|
use Rector\Renaming\ValueObject\MethodCallRename;
|
2020-07-18 18:57:24 +02:00
|
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
2020-11-26 17:44:27 +01:00
|
|
|
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
2020-07-18 18:57:24 +02:00
|
|
|
|
2020-07-18 19:00:36 +02:00
|
|
|
# https://github.com/symfony/symfony/blob/5.0/UPGRADE-5.0.md
|
|
|
|
|
2020-07-18 18:57:24 +02:00
|
|
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
|
|
|
$containerConfigurator->import(__DIR__ . '/symfony50-types.php');
|
|
|
|
|
|
|
|
$services = $containerConfigurator->services();
|
|
|
|
|
|
|
|
$services->set(RenameClassRector::class)
|
2020-07-30 00:43:06 +02:00
|
|
|
->call('configure', [[
|
2020-07-30 01:39:41 +02:00
|
|
|
RenameClassRector::OLD_TO_NEW_CLASSES => [
|
2020-07-30 00:43:06 +02:00
|
|
|
'Symfony\Component\Debug\Debug' => 'Symfony\Component\ErrorHandler\Debug',
|
|
|
|
],
|
|
|
|
]]);
|
2020-07-18 18:57:24 +02:00
|
|
|
|
|
|
|
$services->set(RenameMethodRector::class)
|
2020-07-30 00:43:06 +02:00
|
|
|
->call('configure', [[
|
2020-11-26 17:44:27 +01:00
|
|
|
RenameMethodRector::METHOD_CALL_RENAMES => ValueObjectInliner::inline([
|
2020-08-25 00:26:14 +02:00
|
|
|
new MethodCallRename('Symfony\Component\Console\Application', 'renderException', 'renderThrowable'),
|
|
|
|
new MethodCallRename(
|
|
|
|
'Symfony\Component\Console\Application',
|
|
|
|
'doRenderException',
|
|
|
|
'doRenderThrowable'
|
|
|
|
),
|
|
|
|
]),
|
2020-07-30 00:43:06 +02:00
|
|
|
]]);
|
2020-07-18 18:57:24 +02:00
|
|
|
};
|