diff --git a/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php b/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php index 3ead817..f6d97e1 100644 --- a/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php +++ b/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php @@ -72,7 +72,7 @@ public function getChangeSummary() { break; case static::DEFINITION_UPDATED: - $summary[$entity_type_id][] = $this->t('The %field_name field needs to be updated.', ['%field_name' => $storage_definitions[$field_name]->getLabel()]); + $summary[$entity_type_id][] = $this->t('The %field_name (%entity_type) field needs to be updated.', ['%field_name' => $storage_definitions[$field_name]->getLabel(), '%entity_type' => $entity_type_id]); break; case static::DEFINITION_DELETED: diff --git a/core/modules/aggregator/aggregator.install b/core/modules/aggregator/aggregator.install index cd7203f..7b00079 100644 --- a/core/modules/aggregator/aggregator.install +++ b/core/modules/aggregator/aggregator.install @@ -37,3 +37,24 @@ function aggregator_update_8001() { /** * @} End of "addtogroup updates-8.0.0-rc". */ + +/** + * @addtogroup updates-8.3.x + * @{ + */ + + +/** + * Update the 'fid' and 'refresh' fields in order to make them required at the + * storage level. + */ +function aggregator_update_8300() { + $manager = \Drupal::entityDefinitionUpdateManager(); + $manager->updateFieldStorageDefinition($manager->getFieldStorageDefinition('fid', 'aggregator_item')); + $manager->updateFieldStorageDefinition($manager->getFieldStorageDefinition('refresh', 'aggregator_feed')); +} + +/** + * @} End of "addtogroup updates-8.3.x". + */ + diff --git a/core/modules/aggregator/tests/src/Kernel/Views/AggregatorItemViewsFieldAccessTest.php b/core/modules/aggregator/tests/src/Kernel/Views/AggregatorItemViewsFieldAccessTest.php index a095d3c..e007d8e 100644 --- a/core/modules/aggregator/tests/src/Kernel/Views/AggregatorItemViewsFieldAccessTest.php +++ b/core/modules/aggregator/tests/src/Kernel/Views/AggregatorItemViewsFieldAccessTest.php @@ -35,6 +35,7 @@ public function testAggregatorItemFields() { $feed = Feed::create([ 'title' => 'Drupal org', 'url' => 'https://www.drupal.org/rss.xml', + 'refresh' => 900, ]); $feed->save(); $item = Item::create([ diff --git a/core/modules/block_content/block_content.install b/core/modules/block_content/block_content.install index 4279cde..47c3f52 100644 --- a/core/modules/block_content/block_content.install +++ b/core/modules/block_content/block_content.install @@ -61,3 +61,20 @@ function block_content_update_8003() { \Drupal::entityDefinitionUpdateManager() ->installFieldStorageDefinition('revision_user', 'block_content', 'block_content', $revision_user); } + +/** + * @addtogroup updates-8.3.x + * @{ + */ + +/** + * Update the 'info' field in order to make it required at the storage level. + */ +function block_content_update_8300() { + $manager = \Drupal::entityDefinitionUpdateManager(); + $manager->updateFieldStorageDefinition($manager->getFieldStorageDefinition('info', 'block_content')); +} + +/** + * @} End of "addtogroup updates-8.3.x". + */ diff --git a/core/modules/comment/comment.install b/core/modules/comment/comment.install index 895c039..c750917 100644 --- a/core/modules/comment/comment.install +++ b/core/modules/comment/comment.install @@ -206,5 +206,14 @@ function comment_update_8301() { } /** + * Update the 'entity_id' field in order to make it required at the storage + * level. + */ +function comment_update_8302() { + $manager = \Drupal::entityDefinitionUpdateManager(); + $manager->updateFieldStorageDefinition($manager->getFieldStorageDefinition('entity_id', 'comment')); +} + +/** * @} End of "addtogroup updates-8.3.x". */ diff --git a/core/modules/menu_link_content/menu_link_content.install b/core/modules/menu_link_content/menu_link_content.install index 43c75ec..7449685 100644 --- a/core/modules/menu_link_content/menu_link_content.install +++ b/core/modules/menu_link_content/menu_link_content.install @@ -16,3 +16,20 @@ function menu_link_content_install() { // https://www.drupal.org/node/1965074 module_set_weight('menu_link_content', 1); } + +/** + * @addtogroup updates-8.3.x + * @{ + */ + +/** + * Update the 'title' field in order to make it required at the storage level. + */ +function menu_link_content_update_8300() { + $manager = \Drupal::entityDefinitionUpdateManager(); + $manager->updateFieldStorageDefinition($manager->getFieldStorageDefinition('title', 'menu_link_content')); +} + +/** + * @} End of "addtogroup updates-8.3.x". + */ diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php index 9da3de6..350370f 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php @@ -213,11 +213,10 @@ protected function processStubRow(Row $row) { if ($field_definition->isRequired() && is_null($row->getDestinationProperty($field_name))) { // Use the configured default value for this specific field, if any. if ($default_value = $field_definition->getDefaultValueLiteral()) { - $values[] = $default_value; + $values = reset($default_value); } else { // Otherwise, ask the field type to generate a sample value. - $field_type = $field_definition->getType(); /** @var \Drupal\Core\Field\FieldItemInterface $field_type_class */ $field_type_class = $this->fieldTypeManager ->getPluginClass($field_definition->getType()); diff --git a/core/modules/node/node.install b/core/modules/node/node.install index 2751b2c..489cf69 100644 --- a/core/modules/node/node.install +++ b/core/modules/node/node.install @@ -253,5 +253,13 @@ function node_update_8301() { } /** + * Update the 'status' field in order to make it required at the storage level. + */ +function node_update_8302() { + $manager = \Drupal::entityDefinitionUpdateManager(); + $manager->updateFieldStorageDefinition($manager->getFieldStorageDefinition('status', 'node')); +} + +/** * @} End of "addtogroup updates-8.3.x". */ diff --git a/core/modules/user/user.install b/core/modules/user/user.install index a3c2600..3c7a0b7 100644 --- a/core/modules/user/user.install +++ b/core/modules/user/user.install @@ -109,7 +109,7 @@ function user_update_8100() { */ /** - * @addtogroup updates-8.3.0-beta + * @addtogroup updates-8.3.x * @{ */ @@ -122,5 +122,5 @@ function user_update_8300() { } /** - * @} End of "addtogroup updates-8.3.0-beta". + * @} End of "addtogroup updates-8.3.x" */