diff -u b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php --- b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php @@ -2,7 +2,7 @@ namespace Drupal\Tests\migrate\Kernel\Plugin; -use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException; +use Drupal\Component\Plugin\Exception\BadPluginDefinitionException; use Drupal\Component\Render\FormattableMarkup; use Drupal\KernelTests\FileSystemModuleDiscoveryDataProviderTrait; use Drupal\migrate_drupal\Plugin\MigrateFieldPluginManager; @@ -71,11 +71,11 @@ $expected_mappings = [ 'userreference' => [ 'source_module' => 'user_reference', - 'destination_module' => 'entity_reference', + 'destination_module' => 'core', ], 'nodereference' => [ 'source_module' => 'node_reference', - 'destination_module' => 'entity_reference', + 'destination_module' => 'core', ], 'optionwidgets' => [ 'source_module' => 'optionwidgets', @@ -127,7 +127,7 @@ ], 'taxonomy_term_reference' => [ 'source_module' => 'taxonomy', - 'destination_module' => 'entity_reference', + 'destination_module' => 'core', ], 'date' => [ 'source_module' => 'date', @@ -192,7 +192,7 @@ $plugin_manager->method('getDiscovery') ->willReturn($discovery); - $this->setExpectedException(InvalidPluginDefinitionException::class, "The missing_{$missing_property} plugin should define the $missing_property property."); + $this->setExpectedException(BadPluginDefinitionException::class, "The missing_{$missing_property} plugin should define the $missing_property property."); $plugin_manager->getDefinitions(); } diff -u b/core/modules/migrate_drupal/src/Plugin/MigrateFieldPluginManager.php b/core/modules/migrate_drupal/src/Plugin/MigrateFieldPluginManager.php --- b/core/modules/migrate_drupal/src/Plugin/MigrateFieldPluginManager.php +++ b/core/modules/migrate_drupal/src/Plugin/MigrateFieldPluginManager.php @@ -2,7 +2,7 @@ namespace Drupal\migrate_drupal\Plugin; -use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException; +use Drupal\Component\Plugin\Exception\BadPluginDefinitionException; use Drupal\Component\Plugin\Exception\PluginNotFoundException; use Drupal\migrate\Plugin\MigratePluginManager; use Drupal\migrate\Plugin\MigrationInterface; @@ -62,7 +62,7 @@ foreach (['core', 'source_module', 'destination_module'] as $required_property) { if (empty($definition[$required_property])) { - throw new InvalidPluginDefinitionException($plugin_id, sprintf('The %s plugin should define the %s property.', $definition['id'], $required_property)); + throw new BadPluginDefinitionException($plugin_id, $definition['id'], $required_property); } } } diff -u b/core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php b/core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php --- b/core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php @@ -12,7 +12,7 @@ * "nodereference" = "entity_reference", * }, * source_module = "node_reference", - * destination_module = "entity_reference", + * destination_module = "core", * ) */ class NodeReference extends FieldPluginBase { diff -u b/core/modules/migrate_drupal/src/Plugin/migrate/field/UserReference.php b/core/modules/migrate_drupal/src/Plugin/migrate/field/UserReference.php --- b/core/modules/migrate_drupal/src/Plugin/migrate/field/UserReference.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/field/UserReference.php @@ -12,7 +12,7 @@ * "userreference" = "entity_reference", * }, * source_module = "user_reference", - * destination_module = "entity_reference", + * destination_module = "core", * ) */ class UserReference extends FieldPluginBase { diff -u b/core/modules/taxonomy/src/Plugin/migrate/cckfield/TaxonomyTermReference.php b/core/modules/taxonomy/src/Plugin/migrate/cckfield/TaxonomyTermReference.php --- b/core/modules/taxonomy/src/Plugin/migrate/cckfield/TaxonomyTermReference.php +++ b/core/modules/taxonomy/src/Plugin/migrate/cckfield/TaxonomyTermReference.php @@ -15,7 +15,7 @@ * }, * core = {6,7}, * source_module = "taxonomy", - * destination_module = "entity_reference", + * destination_module = "core", * ) * * @deprecated in Drupal 8.4.x, to be removed before Drupal 9.0.x. Use diff -u b/core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php b/core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php --- b/core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php +++ b/core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php @@ -13,7 +13,7 @@ * }, * core = {6,7}, * source_module = "taxonomy", - * destination_module = "entity_reference", + * destination_module = "core", * ) */ class TaxonomyTermReference extends FieldPluginBase { only in patch2: unchanged: --- /dev/null +++ b/core/lib/Drupal/Component/Plugin/Exception/BadPluginDefinitionException.php @@ -0,0 +1,29 @@ +