diff --git a/core/lib/Drupal/Core/Entity/Schema/ContentEntitySchemaHandler.php b/core/lib/Drupal/Core/Entity/Schema/ContentEntitySchemaHandler.php index 86d9806..defd36b 100644 --- a/core/lib/Drupal/Core/Entity/Schema/ContentEntitySchemaHandler.php +++ b/core/lib/Drupal/Core/Entity/Schema/ContentEntitySchemaHandler.php @@ -6,7 +6,7 @@ namespace Drupal\Core\Entity\Schema; -use Drupal\Core\Entity\ContentEntityType; +use Drupal\Core\Entity\ContentEntityTypeInterface; use Drupal\Core\Entity\ContentEntityDatabaseStorage; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Entity\SqlStorageInterface; @@ -20,7 +20,7 @@ class ContentEntitySchemaHandler implements ContentEntitySchemaHandlerInterface /** * The entity type this schema builder is responsible for. * - * @var \Drupal\Core\Entity\ContentEntityType + * @var \Drupal\Core\Entity\ContentEntityTypeInterface */ protected $entityType; @@ -50,12 +50,12 @@ class ContentEntitySchemaHandler implements ContentEntitySchemaHandlerInterface * * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. - * @param \Drupal\Core\Entity\ContentEntityType $entity_type + * @param \Drupal\Core\Entity\ContentEntityTypeInterface $entity_type * The entity type. * @param \Drupal\Core\Entity\SqlStorageInterface $storage * The storage of the entity type. This must be an SQL-based storage. */ - public function __construct(EntityManagerInterface $entity_manager, ContentEntityType $entity_type, SqlStorageInterface $storage) { + public function __construct(EntityManagerInterface $entity_manager, ContentEntityTypeInterface $entity_type, SqlStorageInterface $storage) { $this->entityType = $entity_type; $this->fieldDefinitions = $entity_manager->getBaseFieldDefinitions($entity_type->id()); $this->storage = $storage; diff --git a/core/modules/views/lib/Drupal/views/Entity/View.php b/core/modules/views/lib/Drupal/views/Entity/View.php index 2beb7ac..54ab465 100644 --- a/core/modules/views/lib/Drupal/views/Entity/View.php +++ b/core/modules/views/lib/Drupal/views/Entity/View.php @@ -277,7 +277,10 @@ public function calculateDependencies() { // Ensure that the view is dependant on the module that provides the schema // for the base table. $schema = drupal_get_schema($this->base_table); - if ($this->module != $schema['module']) { + // @todo Entity base tables are no longer registered in hook_schema(). Once + // we automate the views data for entity types add the entity type + // type provider as a dependency. + if ($schema && $this->module != $schema['module']) { $this->addDependency('module', $schema['module']); }