Change record status: 
Project: 
Introduced in branch: 
8.7.x
Introduced in version: 
8.7.0
Description: 

Starting with Drupal 8.7.0, the entity type manger and the entity field manager are able to return the last installed entity type and field storage definitions, and the entity storage as well entity queries started using them instead of the live (in-code) definitions.

This change makes it possible to execute entity CRUD operations in scenarios where the live (in-code) definitions have changes that require an entity schema migration, but the update process which converts the schema to the new definitions hasn't run yet.

API additions:

  • A new getActiveDefinition($entity_type_id) method has been added to EntityTypeManager
  • A new getActiveFieldStorageDefinitions($entity_type_id) method has been added to EntityFieldManager

Deprecated methods:

  • \Drupal\Core\Entity\Sql\SqlContentEntityStorage::getFieldStorageDefinitions() has been deprecated in favor of getting the active field storage definitions directly from the entity field manager
Impacts: 
Module developers
Site templates, recipes and distribution developers