Configurable

RenameMethodRector

Turns method names to new ones.

 $someObject = new SomeExampleClass;
-$someObject->oldMethod();
+$someObject->newMethod();

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
use Rector\Renaming\ValueObject\MethodCallRename;

return RectorConfig::configure()
    ->withConfiguredRule(RenameMethodRector::class, [
        new MethodCallRename('SomeExampleClass', 'oldMethod', 'newMethod'),
    ]);