Change record status: 
Project: 
Introduced in branch: 
11.2.x
Introduced in version: 
11.2.0
Description: 

Before

$editor = editor_load($format_id);

After (procedural/static)

$editor = \Drupal\editor\Entity\Editor::load($format_id);

After (with dependency injection)

public function __construct(
  protected readonly EntityTypeManagerInterface $entityTypeManager,
) {}
...

    $editor = $this->entityTypeManager->getStorage('editor')->load($format_id);
...

EditorManager constructor change

Additionally, not passing the $entityTypeManager service to the Drupal\editor\Plugin\EditorManager constructor is deprecated. This parameter will be mandatory in Drupal 12.0.0.

Impacts: 
Module developers