By spokje on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.1.x
Introduced in version:
10.1.0
Issue links:
Description:
node_revision_load, node_revision_delete and node_type_update_nodesare deprecated in Drupal 10.1.0 and are removed before Drupal 11.0.0.
Use the entity storage methods:
For node_revision_load use \Drupal\Core\Entity\EntityStorageInterface::loadRevision
For node_revision_delete use \Drupal\Core\Entity\EntityStorageInterface::deleteRevision
For node_type_update_nodes use \Drupal\Core\Entity\EntityStorageInterface::updateType
Impacts:
Module developers
Comments
Actually use RevisionableStorageInterface
Note the actual class you'd be using in your code is:
\Drupal\Core\Entity\RevisionableStorageInterfaceThe relevant methods in that class are the same those listed above.
See https://api.drupal.org/api/drupal/core%21modules%21node%21node.module/fu...
and see the class definition here:
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...
This can be accessed via
\Drupal::entityTypeManager()->getStorage($entity_type);For example:
Also:
Also:
For
node_type_update_nodesuse \Drupal\Core\Entity\EntityStorageInterface::updateTypeshould be onNodeStorageInterface.