Configurable

FunctionCallRemovalRector

Removes deprecated function call statements that have no replacement

-deprecated_function();
 do_something_else();

Configure your rector.php:

<?php

use DrupalRector\Rector\Deprecation\FunctionCallRemovalRector;
use DrupalRector\Rector\ValueObject\FunctionCallRemovalConfiguration;
use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withConfiguredRule(FunctionCallRemovalRector::class, [
        new FunctionCallRemovalConfiguration('deprecated_function'),
    ]);