EntityManagerRector

Fixes deprecated \Drupal::entityManager() calls

-$entity_manager = \Drupal::entityManager();
+$entity_manager = \Drupal::entityTypeManager();

Configure your rector.php:

<?php

use DrupalRector\Drupal8\Rector\Deprecation\EntityManagerRector;
use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withRules([
        EntityManagerRector::class,
    ]);