Remove \Drupal\migrate\Plugin\Migration::$requirements

Created on 13 March 2023, over 1 year ago

Problem/Motivation

From alexpott in #2796755-168: Deprecate Migration::set() β†’

I'm also struck by the concept of the requirements property being a list of migrations that have to have completed and a dependencies array with a required key - how come these are not always the same? I wonder if instead of setting requirements on the migration we could use the list of required migrations and do something recursive like:

Steps to reproduce

Proposed resolution

TBA

Remaining tasks

Determine if this can be done

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

10.1 ✨

Component
MigrationΒ  β†’

Last updated about 10 hours ago

Created by

πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand

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

Comments & Activities

  • Issue created by @quietone
  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand

    Copying a comment I made in #migration

    I looked at the requirements a bit., which are built by \Drupal\migrate\MigrateBuildDependencyInterface::buildDependencyMigration. I wanted to see if the calculated dependencies differ from migration_dependencies['required']. I chose to work with the node migration tests, d7/MigrateNodeTest.php and d7/MigrateNodeCompleteTest.php. It turns out that the calculated $requirements differed from the declared 'required' for d7_node, d7_node_entity_translation and probably d7_entity_translation as well. The calculated $requirements included 'd7_user_role' which is not listed in the migration_dependencies for these migrations.

    Curiously, this was not true for d7_node_complete. I didn't figure out why there is a difference.

Production build 0.69.0 2024