Problem/Motivation

The module uses EntityStorageInterface::loadRevision() which is deprecated in Drupal 10.1.0 and removed in Drupal 11.0.0.

Per https://www.drupal.org/node/2926958, code should use \Drupal\Core\Entity\RevisionableStorageInterface::loadRevision() instead.

Steps to reproduce

Enable deprecation warnings in PHP or run static analysis (PHPStan/Psalm)
Observe deprecation notices for loadRevision() calls on EntityStorageInterface

Proposed resolution

Add @var \Drupal\Core\Entity\RevisionableStorageInterface type hints to the storage variables before calling loadRevision(). This explicitly indicates the storage implements RevisionableStorageInterface, which is the non-deprecated interface that provides the loadRevision() method.

The entity storages for nodes and media already implement RevisionableStorageInterface, so this is a documentation/type annotation change only.

Remaining tasks

Review and commit patch

User interface changes

None.

API changes

None.

Data model changes

None.

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

murat_halici created an issue. See original summary.

murat_halici changed the visibility of the branch 3574635-fix-deprecated-loadrevision to hidden.

joseph.olstad’s picture

There's no change with this logic, it's the same currently and BTW, I have been using Drupal 11.2.10 with this module with no issues.

joseph.olstad’s picture

Status: Active » Closed (won't fix)

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.

joseph.olstad’s picture

Priority: Normal » Minor
Status: Closed (won't fix) » Needs review

Ok , should be harmless enough.

  • 27a251c8 committed on 2.0.x
    Issue #3574635: Fix deprecated EntityStorageInterface::loadRevision()...
joseph.olstad’s picture

Status: Needs review » Fixed

Ok, this is a no change change, whatever, if it makes your type hinting happy, ok.

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.