Replace deprecated get('entity.manager') with get('entity_type.manager') - Drupal 10 Readiness

Created on 9 October 2023, about 1 year ago
Updated 22 April 2024, 8 months ago

Problem/Motivation

Drupal::entityManager has been removed in Drupal 9.x

Steps to reproduce

Install module on Drupal 9 or above. Error occurs on site:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "entity.manager". in Drupal\Component\DependencyInjection\Container->get() (line 157 of core/lib/Drupal/Component/DependencyInjection/Container.php).

Proposed resolution

Apply the provided patch which changes the "entity.manager" to "entity_type.manager".

Remaining tasks

Review

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇭🇺Hungary tamaspresing

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024