Problem/Motivation

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

\Drupal\Core\Entity\EntityStorageInterface::loadRevision is deprecated, and the recommended replacement for Drupal 11 is to use \Drupal\Core\Entity\RevisionableStorageInterface::loadRevision. However, RevisionableStorageInterface extends EntityStorageInterface, so even when using the correct one, I still get the error from phpstan.

Steps to reproduce

https://phpstan.org/r/72537fef-72a6-4cf5-89ba-920c2eab75ff

Proposed resolution

The method \Drupal\Core\Entity\RevisionableStorageInterface::loadRevision should be marked @not-deprecated as outlined in the docs: https://phpstan.org/writing-php-code/phpdocs-basics#deprecations

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3571148

Command icon 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:

Comments

solideogloria created an issue. See original summary.

solideogloria’s picture

Issue summary: View changes
garvitasakhrani’s picture

Assigned: Unassigned » garvitasakhrani

I am working on it.

garvitasakhrani’s picture

Assigned: garvitasakhrani » Unassigned
Status: Active » Needs review

I’ve updated RevisionableStorageInterface::loadRevision() to be explicitly marked as @not-deprecated.
Changes have been pushed to the issue fork branch 3571148-mark-revisionablestorageinterfaceloadrevision-as.
Kindly review. Thanks!

solideogloria’s picture

Status: Needs review » Reviewed & tested by the community

Thanks. That fixes the phpstan error.

  • catch committed 0db44986 on 11.x
    task: #3571148 Mark RevisionableStorageInterface::loadRevision as @not-...

  • catch committed 84228bad on main
    task: #3571148 Mark RevisionableStorageInterface::loadRevision as @not-...
catch’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to main and 11.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.