Install

Works with Drupal: 8.x

Using Composer to manage Drupal site dependencies

Alternative installation files

Download migrate_plus-8.x-2.0.tar.gztar.gz 58.59 KB
MD5: df3fd6fa4fdbc84786655602f217e6fb
SHA-1: b2a76a2af2cb8077cbd85b135fa53c88d1602756
SHA-256: 6e2bd9f98567f9a62dca3ab262709fcb1de51cdf4d8deabd95b8340321a6cbd6
Download migrate_plus-8.x-2.0.zipzip 139.52 KB
MD5: 32db40b3b5e9836ae1d8bfa2ab5e40d2
SHA-1: 866b4778e042fd980dcb787e37f68fd49c5f7dec
SHA-256: 5853c4e265dcee5d49caaf2427126a1fa5efd3e644ac6abde980d7c0906eee39

Release notes

The migrate_plus module extends the core migration system with API enhancements
and additional functionality, as well as providing practical examples.

Extensions to base API

  • A Migration configuration entity is provided, enabling persistance of dynamic migration configuration.
  • A ConfigEntityDiscovery class is implemented which enables plugin configuration to be based on configuration entities. This is fully general - it can be used for any configuration entity type, not just migrations.
  • A MigrationConfigEntityPluginManager class and corresponding plugin.manager.config_entity_migration service is provided, to enable discovery and instantiation of migration plugins based on the Migration configuration entity.
  • A MigrationGroup configuration entity is provided, which enables migrations to be organized in groups, and to maintain shared configuration in one place.
  • A MigrateEvents::PREPARE_ROW event is provided to dispatch hook_prepare_row() invocations as events.
  • A SourcePluginExtension class is provided, enabling one to define fields and IDs for a source plugin via configuration rather than requiring PHP code.

Plugin types

migrate_plus provides the following plugin types, for use with the url source
plugin.

  • A data_parser type, for parsing different formats on behalf of the url source plugin.
  • A data_fetcher type, for fetching data to feed into a data_parser plugin.
  • An authentication type, for adding authentication headers with the http data_fetcher plugin.

Plugins

Process

  • The entity_lookup process plugin allows you to populate references to entities which already exist in Drupal, whether they were migrated or not.
  • The entity_generate process plugin extends entity_lookup to also create the desired entity when it doesn't already exist.
  • The file_copy process plugin allows you to copy a file into Drupal within a process plugin (this is a core plugin in Drupal 8.2.x, and thus removed in migrate_plus 8.x-3.x).
  • The file_blob process plugin supports creating file entities from blob data.
  • The merge process plugin allows the merging of multiple arrays into a single field.
  • The skip_on_value process plugin allows you to skip a row, or a given field, for specific source values.

Source

  • A url source plugin is provided, implementing a common structure for file-based data providers.

Data parsers

  • The xml parser plugin uses PHP's XMLReader interface to incrementally parse XML files. This should be used for XML sources which are potentially very large.
  • The simple_xml parser plugin uses PHP's SimpleXML interface to fully parse XML files. This should be used for XML sources where you need to be able to use complex xpaths for your item selectors, or have to access elements outside of the current item element via xpaths.
  • The json parser plugin supports JSON sources.
  • The soap parser plugin supports SOAP sources.

Data fetchers

  • The file fetcher plugin works for most URLs regardless of protocol, as well as local filesystems.
  • The http fetcher plugin provides the ability to add headers to an HTTP request (particularly through authentication plugins).

Authentication

  • The basic authentication plugin provides HTTP Basic authentication.
  • The digest authentication plugin provides HTTP Digest authentication.
  • The oauth2 authentication plugin provides OAuth2 authentication over HTTP.

Examples

  • The migrate_example submodule provides a fully functional and runnable example migration scenario demonstrating the basic concepts and most common techniques for SQL-based migrations.
  • The migrate_example_advanced submodule provides examples of migration from different kinds of sources, as well as less common techniques.
Created by: mikeryan
Created on: 21 Mar 2017 at 21:09 UTC
Last updated: 21 Mar 2017 at 21:13 UTC
Bug fixes
New features

Other releases