reverted: --- b/core/modules/block_content/migrations/block_content_body_field.yml +++ a/core/modules/block_content/migrations/block_content_body_field.yml @@ -5,7 +5,7 @@ - Drupal 7 - Configuration source: + plugin: embedded_data - plugin: drupal_embedded_data data_rows: - entity_type: block_content reverted: --- b/core/modules/block_content/migrations/block_content_entity_display.yml +++ a/core/modules/block_content/migrations/block_content_entity_display.yml @@ -5,7 +5,7 @@ - Drupal 7 - Configuration source: + plugin: embedded_data - plugin: drupal_embedded_data data_rows: - entity_type: block_content reverted: --- b/core/modules/block_content/migrations/block_content_entity_form_display.yml +++ a/core/modules/block_content/migrations/block_content_entity_form_display.yml @@ -5,7 +5,7 @@ - Drupal 7 - Configuration source: + plugin: embedded_data - plugin: drupal_embedded_data data_rows: - entity_type: block_content reverted: --- b/core/modules/block_content/migrations/block_content_type.yml +++ a/core/modules/block_content/migrations/block_content_type.yml @@ -5,7 +5,7 @@ - Drupal 7 - Configuration source: + plugin: embedded_data - plugin: drupal_embedded_data data_rows: - id: basic reverted: --- b/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalEmbeddedDataSource.php +++ /dev/null @@ -1,19 +0,0 @@ - '1', 'field1' => 'f1value1', 'field2' => 'f2value1'], - ['key' => '2', 'field1' => 'f1value2', 'field2' => 'f2value2'], - ]; - $ids = ['key' => ['type' => 'integer']]; - $definition = [ - 'migration_tags' => ['Embedded data test'], - 'source' => [ - 'plugin' => 'drupal_embedded_data', - 'data_rows' => $data_rows, - 'ids' => $ids, - 'source_module' => 'my_test_module', - ], - 'process' => [], - 'destination' => ['plugin' => 'null'], - ]; - - $migration = \Drupal::service('plugin.manager.migration')->createStubMigration($definition); - $source = $migration->getSourcePlugin(); - $this->assertSame('my_test_module', $source->getSourceModule()); - - // Validate the plugin returns the source data that was provided. - $results = []; - /** @var \Drupal\migrate\Row $row */ - foreach ($source as $row) { - $this->assertFalse($row->isStub()); - - $data_row = $row->getSource(); - // The "data" row returned by getSource() also includes all source - // configuration - we remove it so we see only the data itself. - unset($data_row['plugin']); - unset($data_row['data_rows']); - unset($data_row['ids']); - unset($data_row['source_module']); - $results[] = $data_row; - } - $this->assertSame($data_rows, $results); - - // Validate the public APIs. - $this->assertSame(count($data_rows), $source->count()); - $this->assertSame($ids, $source->getIds()); - $expected_fields = [ - 'key' => 'key', - 'field1' => 'field1', - 'field2' => 'field2', - ]; - $this->assertSame($expected_fields, $source->fields()); - } - -} diff -u b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php --- b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php @@ -29,7 +29,7 @@ } /** - * Tests that modules exist for all drupal source plugins. + * Tests that source_module exist for all migrate drupal source plugins. */ public function testProvidersExist() { $this->enableAllModules(); reverted: --- b/core/modules/responsive_image/src/Plugin/migrate/source/d7/ResponsiveImageStyles.php +++ a/core/modules/responsive_image/src/Plugin/migrate/source/d7/ResponsiveImageStyles.php @@ -4,8 +4,6 @@ use Drupal\migrate\Row; use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase; -use Drupal\migrate_drupal\Plugin\DrupalSourceInterface; -use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSourceTrait; /** * Gets Drupal responsive image styles source from database. @@ -22,9 +20,7 @@ * source_module = "picture" * ) */ +class ResponsiveImageStyles extends DrupalSqlBase { -class ResponsiveImageStyles extends DrupalSqlBase implements DrupalSourceInterface { - - use DrupalSourceTrait; /** * {@inheritdoc}