Change record status: 
Introduced in branch: 
master
Introduced in version: 
master
Description: 

For the decoupled and easier to upgrade code in Drupal 8+ Dependency Injection code must be used everywhere instead of calling methods from services statically.

See https://api.drupal.org/api/drupal/core%21core.api.php/group/container/9.3.x

The issue has been caught here

Before

...
$node = Drupal::entityTypeManager()->getStorage('node')->load($result->getField('nid')->getValues()[0]);
...

After

...

$node = $this->entityTypeManager->getStorage('node')->load($result->getField('nid')->getValues()[0]);
...
Impacts: 
Module developers

Comments

podarok’s picture

podarok’s picture