Change record status: 
Project: 
Introduced in branch: 
8.0.x
Description: 

The Migrate API used to have load plugins as a solution for creating dynamic migrations. This plugin type has been removed entirely.

The following interfaces and classes are gone:

  • \Drupal\migrate\Plugin\SourceEntityInterface
  • \Drupal\migrate_drupal\Entity\MigrationInterface
  • \Drupal\migrate_drupal\Entity\Migration
  • \Drupal\migrate_drupal\MigrationStorage
  • \Drupal\migrate_drupal\Plugin\CckFieldMigrateSourceInterface
  • \Drupal\migrate_drupal\Plugin\MigrateLoadInterface
  • \Drupal\migrate_drupal\Plugin\migrate\load\LoadEntity
  • \Drupal\taxonomy\Plugin\migrate\load\LoadTermNode

It is still possible to generate migrations dynamically, using the builder plugin type.

A builder is a plugin which accepts a migration template (described in https://www.drupal.org/node/2527568) and uses it to dynamically generate "variants" of that template, which are saved as full-fledged migration config entities. Builder plugins live in the \Drupal\YOUR_MODULE\Plugin\migrate\builder namespace and implement \Drupal\migrate\Plugin\MigrateBuilderInterface.

A migration template must reference a builder in order for it (the builder) to be invoked. An example, from core/modules/node/migration_templates/d6_node.yml:

id: d6_node
label: Drupal 6 nodes
migration_tags:
  - Drupal 6
builder:
  plugin: d6_node
source:
  plugin: d6_node
process:
  nid: nid
  vid: vid
  type: type
destination:
  plugin: entity:node

The builder key specifies that the builder plugin identified by d6_node should be used to build variants of this template, which are then saved as config entities. In this example, the resulting migrations will have IDs like d6_node__page, d6_node__blog, d6_node__article, and so forth. They will also vary somewhat depending on which CCK fields are defined for each node type.

For more details, check out core/modules/node/src/Plugin/migrate/builder/d6/Node.php -- specifically the buildMigrations() method.

Impacts: 
Module developers