diff --git a/core/modules/field/field.install b/core/modules/field/field.install deleted file mode 100644 index 507e971..0000000 --- a/core/modules/field/field.install +++ /dev/null @@ -1,31 +0,0 @@ -listAll('field.storage.') as $field_id) { - $field_storage = $config->getEditable($field_id); - $class = $field_type_manager->getPluginClass($field_storage->get('type')); - - // Deal only with entity reference fields and descendants. - if ($class != $item_class && !is_subclass_of($class, $item_class)) { - continue; - } - - // Remove 'target_bundle' from settings. - $field_storage->clear('settings.target_bundle'); - $field_storage->save(TRUE); - } -} diff --git a/core/modules/field/src/Tests/Update/EntityReferenceTargetBundleUpdateTest.php b/core/modules/field/src/Tests/Update/EntityReferenceTargetBundleUpdateTest.php deleted file mode 100644 index bfdfc4d..0000000 --- a/core/modules/field/src/Tests/Update/EntityReferenceTargetBundleUpdateTest.php +++ /dev/null @@ -1,53 +0,0 @@ -databaseDumpFiles = [ - __DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz', - ]; - } - - /** - * Tests field_update_8001(). - * - * @see field_update_8001() - */ - public function testFieldUpdate8001() { - $configFactory = $this->container->get('config.factory'); - - // Add the deprecated 'target_bundle' setting to the 'node.field_tags' field - // storage config. - /** @var \Drupal\Core\Config\Config */ - $config = $configFactory->getEditable('field.storage.node.field_tags'); - $config->set('settings.target_bundle', NULL); - $config->save(TRUE); - - // Run updates. - $this->runUpdates(); - - // Reload the config, and check that the 'target_bundle' setting has been - // removed. - $config = $configFactory->getEditable('field.storage.node.field_tags'); - $settings = $config->get('settings'); - $this->assertFalse(array_key_exists('target_bundle', $settings)); - } - -}