rector/config/set/symfony31.php

50 lines
2.0 KiB
PHP
Raw Normal View History

2020-07-18 18:57:24 +02:00
<?php
declare(strict_types=1);
use Rector\Generic\Rector\ClassMethod\ArgumentDefaultValueReplacerRector;
use Rector\Generic\ValueObject\ArgumentDefaultValueReplacer;
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(ArgumentDefaultValueReplacerRector::class)
->call('configure', [[
2020-08-26 00:21:41 +02:00
ArgumentDefaultValueReplacerRector::REPLACED_ARGUMENTS => inline_value_objects([
new ArgumentDefaultValueReplacer('Symfony\Component\Yaml\Yaml', 'parse', 1, [
2020-08-26 00:21:41 +02:00
false,
false,
true,
], 'Symfony\Component\Yaml\Yaml::PARSE_OBJECT_FOR_MAP'),
new ArgumentDefaultValueReplacer('Symfony\Component\Yaml\Yaml', 'parse', 1, [
2020-08-26 00:21:41 +02:00
false,
true,
], 'Symfony\Component\Yaml\Yaml::PARSE_OBJECT'),
new ArgumentDefaultValueReplacer(
2020-08-26 00:21:41 +02:00
'Symfony\Component\Yaml\Yaml',
'parse',
1,
true,
'Symfony\Component\Yaml\Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE'
),
new ArgumentDefaultValueReplacer('Symfony\Component\Yaml\Yaml', 'parse', 1, false, 0),
new ArgumentDefaultValueReplacer(
2020-08-26 00:21:41 +02:00
'Symfony\Component\Yaml\Yaml',
'dump',
3,
[false, true],
'Symfony\Component\Yaml\Yaml::DUMP_OBJECT'
),
new ArgumentDefaultValueReplacer(
2020-08-26 00:21:41 +02:00
'Symfony\Component\Yaml\Yaml',
'dump',
3,
true,
'Symfony\Component\Yaml\Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE'
),
]),
]]);
2020-07-18 18:57:24 +02:00
};