forked from rectorphp/rector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
monolog20.php
31 lines (27 loc) · 1.62 KB
/
monolog20.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
declare(strict_types=1);
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
use Rector\Renaming\ValueObject\MethodCallRename;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
# https://github.com/Seldaek/monolog/commit/39f8a20e6dadc0194e846b254c5f23d1c732290b#diff-dce565f403e044caa5e6a0d988339430
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(RenameMethodRector::class)
->call('configure', [[
RenameMethodRector::METHOD_CALL_RENAMES => ValueObjectInliner::inline([
new MethodCallRename('Monolog\Logger', 'addDebug', 'debug'),
new MethodCallRename('Monolog\Logger', 'addInfo', 'info'),
new MethodCallRename('Monolog\Logger', 'addNotice', 'notice'),
new MethodCallRename('Monolog\Logger', 'addWarning', 'warning'),
new MethodCallRename('Monolog\Logger', 'addError', 'error'),
new MethodCallRename('Monolog\Logger', 'addCritical', 'critical'),
new MethodCallRename('Monolog\Logger', 'addAlert', 'alert'),
new MethodCallRename('Monolog\Logger', 'addEmergency', 'emergency'),
new MethodCallRename('Monolog\Logger', 'warn', 'warning'),
new MethodCallRename('Monolog\Logger', 'err', 'error'),
new MethodCallRename('Monolog\Logger', 'crit', 'critical'),
new MethodCallRename('Monolog\Logger', 'emerg', 'emergency'),
]),
]]);
};