Change record status: 
Project: 
Introduced in branch: 
8.0.x
Introduced in version: 
8.0.0
Description: 

A new public static function calculateStorageDependencies(FieldStorageDefinitionInterface $field_storage_definition) method is now added to FieldItemInterface. It was not possible earlier for field items to provide configuration dependencies, such as that the tags field depends on the tags vocabulary or the image field depends on the file module. The new method is implemented in FieldItemBase and returns no dependencies by default. An example implementation for entity references is as follows:

  /**
   * {@inheritdoc}
   */
  public static function calculateStorageDependencies(FieldStorageDefinitionInterface $field_definition) {
    $dependencies = parent::calculateStorageDependencies($field_definition);
    $target_entity_type = \Drupal::entityManager()->getDefinition($field_definition->getSetting('target_type'));
    $dependencies['module'][] = $target_entity_type->getProvider();
    return $dependencies;
  }
Impacts: 
Module developers