rector/config/set/twig127.php

24 lines
1.0 KiB
PHP
Raw Normal View History

2020-07-18 18:57:24 +02:00
<?php
declare(strict_types=1);
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
use Rector\Renaming\ValueObject\MethodCallRename;
2020-07-18 18:57:24 +02:00
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
2020-07-18 18:57:24 +02:00
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(RenameMethodRector::class)
->call('configure', [[
RenameMethodRector::METHOD_CALL_RENAMES => ValueObjectInliner::inline([
new MethodCallRename('Twig_Node', 'getLine', 'getTemplateLine'),
new MethodCallRename('Twig_Node', 'getFilename', 'getTemplateName'),
new MethodCallRename('Twig_Template', 'getSource', 'getSourceContext'),
new MethodCallRename('Twig_Error', 'getTemplateFile', 'getTemplateName'),
new MethodCallRename('Twig_Error', 'getTemplateName', 'setTemplateName'),
]),
]]);
2020-07-18 18:57:24 +02:00
};