Change record status: 
Project: 
Introduced in branch: 
8.5.x
Introduced in version: 
8.5.0
Description: 

To be able to group together all entity storage methods providing revision support, RevisionableStorageInterface was added. When defining a new entity type needing revision support be sure to set a storage handler implementing this interface.

Two of its methods are also defined by EntityStorageInterface:

  • RevisionableStorageInterface::loadRevision()
  • RevisionableStorageInterface::deleteRevision()

The corresponding methods on EntityStorageInterface could not be removed but should be considered deprecated. Entity storage classes not implementing ContentEntityStorageInterface and supporting revisions should always implement RevisionableStorageInterface, rather than relying on EntityStorageInterface alone. Those methods will actually be deprecated in the last Drupal 8 minor release and will not be part of Drupal 9.

The new \Drupal\Core\Entity\RevisionableStorageInterface interface contains the following methods:

  • loadRevision()
  • loadMultipleRevisions()
  • deleteRevision()
  • getLatestRevisionId()

Note that additional methods might be added to this interface before Drupal 8.5.0.

The new \Drupal\Core\Entity\TranslatableRevisionableStorageInterface interface contains the following methods:

  • getLatestTranslationAffectingRevisionId()

On top of that, the following methods were added:

  • RevisionableInterface::isLatestRevision()
  • TranslatableRevisionableInterface::isLatestTranslationAffectingRevision
Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done