Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Issue fork drupal-3323260
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3323260-deprecate-noderevisionload-and changes, plain diff MR !3014
Comments
Comment #2
longwaveComment #3
SpokjeComment #5
SpokjeComment #6
longwaveThanks, added some feedback - in a number of cases the entity storage object is already available.
Comment #7
SpokjeThanks @longwave for correcting my sloppiness there. :)
Comment #8
mondrakeIt looks all correct to me.
Comment #9
alexpottCommitted d9059c0 and pushed to 10.1.x. Thanks!
I backported all the non deprecation changes to 10.0.x to keeps tests and phpstan aligned.
Committed ef4dc87 and pushed to 10.0.x. Thanks!
Comment #13
SpokjePublished CR.