Change record status: 
Project: 
Introduced in branch: 
9.2.x
Introduced in version: 
9.2.0, 9.1.4
Description: 

A source plugin derived from Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase can declare a minimum schema version by setting minimum_version in its plugin annotation. Any migration using such a source plugin will check the version of the module installed on the source site and throw a RequirementsException if it is less than the declared minimum version.

Any Migrate source plugin can declare $minimum_version: see Drupal\migrate\Annotation\MigrateSource. Currently, it is only used in classes that extend DrupalSqlBase.

Previously, DrupalSqlBase checked 'minimum_schema_version' in its plugin annotation, although no such class was declared in the annotation class. The test based on that code was broken and has been removed.

Example


namespace Drupal\mymodule\src\Plugin\migrate\source\MymoduleSource;

use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;

/**
 * Custom source plugin.
 *
 * @MigrateSource(
 *   id = "mymodule_source",
 *   source_module = "mymodule",
 *   mimimum_version = "7001",
 * )
 */
class MymoduleSource extends DrupalSqlBase {
  // ...
}
Impacts: 
Module developers