2020-07-18 18:57:24 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2020-08-18 17:57:30 +02:00
|
|
|
use Rector\Generic\Rector\ClassMethod\ArgumentDefaultValueReplacerRector;
|
2020-09-12 23:19:08 +02:00
|
|
|
use Rector\Generic\ValueObject\ArgumentDefaultValueReplacer;
|
2020-08-12 11:08:59 +02:00
|
|
|
use Rector\Symfony\Rector\StaticCall\ParseFileRector;
|
2020-08-26 00:21:41 +02:00
|
|
|
use function Rector\SymfonyPhpConfig\inline_value_objects;
|
2020-07-18 18:57:24 +02:00
|
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
|
|
|
|
|
|
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
|
|
|
$services = $containerConfigurator->services();
|
|
|
|
|
|
|
|
$services->set(ParseFileRector::class);
|
|
|
|
|
|
|
|
$services->set(ArgumentDefaultValueReplacerRector::class)
|
2020-07-30 00:43:06 +02:00
|
|
|
->call('configure', [[
|
2020-08-26 00:21:41 +02:00
|
|
|
ArgumentDefaultValueReplacerRector::REPLACED_ARGUMENTS => inline_value_objects([
|
|
|
|
// https://github.com/symfony/symfony/commit/912fc4de8fd6de1e5397be4a94d39091423e5188
|
2020-09-12 23:19:08 +02:00
|
|
|
new ArgumentDefaultValueReplacer(
|
2020-08-26 00:21:41 +02:00
|
|
|
'Symfony\Component\Routing\Generator\UrlGeneratorInterface',
|
|
|
|
'generate',
|
|
|
|
2,
|
|
|
|
true,
|
|
|
|
'Symfony\Component\Routing\Generator\UrlGeneratorInterface::ABSOLUTE_URL'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new ArgumentDefaultValueReplacer(
|
2020-08-26 00:21:41 +02:00
|
|
|
'Symfony\Component\Routing\Generator\UrlGeneratorInterface',
|
|
|
|
'generate',
|
|
|
|
2,
|
|
|
|
false,
|
|
|
|
'Symfony\Component\Routing\Generator\UrlGeneratorInterface::ABSOLUTE_PATH'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new ArgumentDefaultValueReplacer(
|
2020-08-26 00:21:41 +02:00
|
|
|
'Symfony\Component\Routing\Generator\UrlGeneratorInterface',
|
|
|
|
'generate',
|
|
|
|
2,
|
|
|
|
'relative',
|
|
|
|
'Symfony\Component\Routing\Generator\UrlGeneratorInterface::RELATIVE_PATH'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new ArgumentDefaultValueReplacer(
|
2020-08-26 00:21:41 +02:00
|
|
|
'Symfony\Component\Routing\Generator\UrlGeneratorInterface',
|
|
|
|
'generate',
|
|
|
|
2,
|
|
|
|
'network',
|
|
|
|
'Symfony\Component\Routing\Generator\UrlGeneratorInterface::NETWORK_PATH'
|
|
|
|
),
|
|
|
|
]),
|
2020-07-30 00:43:06 +02:00
|
|
|
]]);
|
2020-07-18 18:57:24 +02:00
|
|
|
};
|