Remove hardcoded plugin IDs from migration process plugins

Created on 1 November 2019, about 5 years ago
Updated 13 March 2024, 10 months ago

Problem/Motivation

Several process plugins contain lookups against hardcoded migration ids. These ids can change in contrib, or custom migrations with different ids should be able to work with the process plugins.

A scenario where this is a problem is exampled in issue summary of the duplicate β†’ .

Process plugins:
[x] BlockPluginId.php used in d6_block.yml and d7_block.
[X] BlockVisibility.php used in d6_block.yml and d7_block.
[x] d7/FieldBundle.php used in d7_field_instance.yml
[X] d6/FieldFile.php OK. This is added to the migration by defineValueProcessPipeline so it is installed in the yaml as a process.
[X] d6/FilterFormatPermission.php used in d6_user_role.yml
[(x)] MenuLinkParent.php does a self lookup, so no change needed

Furthermore there are migrateLookup->lookup() calls in

  • MigrateLookupTest
  • MigrateStubTest
  • MenuLinkParentTest
  • MigrationLookupTest

unsure if these also have to be adjusted.

Proposed resolution

Move migration_lookups from the following plugin to the migration yml so that migrate_upgrade can find it.

  • BlockPluginId.php
  • BlockVisibility.php
  • d7/FieldBundle.php
  • d6/FilterFormatPermission.php

Add new process plugins to do the lookups given the migration ID supplied by the yml.

  • block/src/Plugin/migrate/process/RolesLookup.php
  • user/src/Plugin/migrate/process/d6/FilterFormatLookup.php

Remaining tasks

Review

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

10.3 ✨

Component
MigrationΒ  β†’

Last updated about 3 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States mikelutz Michigan, USA

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024