Nothing sets $this->idMap, so can't override map plugin, and getIdMap() does the same thing as getIdMapPlugin() but has to be called first

Created on 7 May 2024, 8 months ago
Updated 12 July 2024, 6 months ago

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

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
MigrationΒ  β†’

Last updated about 12 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024