Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
By mikeryan on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.2.x
Introduced in version:
8.2.0-rc2
Issue links:
Description:
Configuration may need to be merged into a migration plugin at runtime (for example, in the Drupal upgrade path setting source_base_path for file migrations). This has been more complex than necessary - it may now be done more straightforwardly by providing an array of configuration overrides to MigrationPluginManager::createInstance().
Before:
$migration = \Drupal::service('plugin.manager.migration')->createInstance('d6_file');
$source = $migration->getSourceConfiguration();
$source['constants']['source_base_path'] = $source_base_path;
$migration->set('source', $source);
After:
$configuration['source']['constants']['source_base_path'] = $source_base_path;
$migration = \Drupal::service('plugin.manager.migration')->createInstance('d6_file', $configuration);
Impacts:
Module developers