Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293751

Deprecate node_revision_load() and friends

$
0
0

Problem/Motivation

Spotted in a test over in #3319582: Fix calls to methods with too many parameters passed in, we deprecated and removed node_load() a long time ago but the following functions still exist in node.module:

function node_revision_load($vid = NULL) {
  return \Drupal::entityTypeManager()->getStorage('node')->loadRevision($vid);
}

function node_revision_delete($revision_id) {
  \Drupal::entityTypeManager()->getStorage('node')->deleteRevision($revision_id);
}

function node_type_update_nodes($old_id, $new_id) {
  return \Drupal::entityTypeManager()->getStorage('node')->updateType($old_id, $new_id);
}

Steps to reproduce

Proposed resolution

Deprecate these functions and use the entity storage methods in preference.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 293751

Trending Articles