Problem/Motivation

Two weird things in the Migration class which are closely linked, so filing just one issue:

1. This property is never set AFAICT:

  /**
   * The identifier map data.
   *
   * Used to initialize $idMapPlugin.
   *
   * @var array
   */
  protected $idMap = [];

It's read in getIdMap():

      $configuration = $this->idMap;
      $plugin = $configuration['plugin'] ?? 'sql';

but as it's null, the 'sql' map plugin will always be used.

I don't know how to fix this.

2. getIdMap() and getIdMapPlugin() both return $this->idMapPlugin.

getIdMap() ensures the map plugin is instantiated first, whereas getIdMapPlugin() just returns it (and it might be NULL if you've not called getIdMap() already!

The fix here is probably to deprecate one of them?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

joachim created an issue. See original summary.

quietone’s picture

Version: 11.0.x-dev » 11.x-dev

Fixes are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.