Use type-hinting on deprecation warnings for loadRevision()

Created on 8 December 2023, 6 months ago
Updated 20 May 2024, 27 days ago

Problem/Motivation

During phpstan check deprecation warnings like:

Call to deprecated method loadRevision() of class Drupal\Core\Entity\EntityStorageInterface:
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use
         \Drupal\Core\Entity\RevisionableStorageInterface::loadRevision instead.

This issue is here to remove all of them by type-hinting. Same approach used in 📌 Use type-hinting on deprecation warnings for loadRevision() introduced by mglaman/phpstan-drupal:1.2.0 Fixed

Steps to reproduce

Proposed resolution

Use type-hinting on the likes of $this->entityTypeManager()->getStorage('node'); to clarify (to PHPStan) we intend to use the more specific RevisionableStorageInterface instead of EntityStorageInterface.

This issue should leave none of the above mentioned deprecation.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

🇷🇺Russia zniki.ru

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024