Problem/Motivation

The Entity Reference Revisions module uses deprecated methods from EntityStorageInterface that were deprecated in Drupal 10.1.0 and will be removed in Drupal 11.0.0. This causes deprecation warnings when running Upgrade Status or preparing for Drupal 11 compatibility.

loadRevision()
Call to deprecated method loadRevision() of interface Drupal\Core\Entity\EntityStorageInterface. 
Deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. 
Use Drupal\Core\Entity\RevisionableStorageInterface::loadRevision instead.
Affected files
  • src/EntityReferenceRevisionsFieldItemList.php
  • src/Plugin/migrate/destination/EntityReferenceRevisions.php
deleteRevision()
Call to deprecated method deleteRevision() of interface Drupal\Core\Entity\EntityStorageInterface. 
Deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. 
Use Drupal\Core\Entity\RevisionableStorageInterface::deleteRevision instead.
Affected files
  • src/EntityReferenceRevisionsOrphanPurger.php
  • src/Plugin/Field/FieldType/EntityReferenceRevisionsItem.php
  • src/Plugin/migrate/destination/EntityReferenceRevisions.php

Steps to reproduce

  1. Install Entity Reference Revisions module
  2. Run Upgrade Status module scan
  3. Review deprecation warnings for Entity Reference Revisions

Proposed resolution

Update all calls to use the RevisionableStorageInterface methods instead:
Replace EntityStorageInterface::loadRevision() with RevisionableStorageInterface::loadRevision()
Replace EntityStorageInterface::deleteRevision() with RevisionableStorageInterface::deleteRevision()

Remaining tasks

I am attaching two combined patches that provide a workaround until this is fixed by the maintainers.

Comments

titacvetkovic created an issue. See original summary.

titacvetkovic’s picture

The issue I described above is actually already covered in another issue, where the maintainer states:
Those are false positives, this module is fully compatible with D11

I thus suggest for this ticket to be closed.

berdir’s picture

Version: 8.x-1.14 » 8.x-1.x-dev
Status: Active » Needs work

If you make them asserts in a merge request then I'm willing to merge it, an if condition is wrong, we know that those storages must be revisionable, it's just not discoverable for phpstan.