Expand $migration_dependencies when it is set

Created on 4 April 2023, about 1 year ago

Problem/Motivation

This issue is a follow-up to πŸ“Œ $migration_dependencies has inconsistent structure Fixed , another child of πŸ“Œ [PP-1] Deprecate Migration::set() Postponed .

As in #3262395, "expand" refers to taking a list of migration plugins and adding to it all derivatives of any migration on the list. Before #3262395, this was done inconsistently when the list was set or updated. In #3262395, we adopted a strategy of "validate on set, expand on get".

While working on the parent issue, we realized that this strategy led to problems. See Comments #180, #181 on that issue and πŸ“Œ [meeting] Migrate Meeting 2023-03-23 1400Z Fixed . We cannot deprecate Migration::set() until we actually remove the code that we deprecated in #2796755.

Since #2796755 was fixed only on the 10.1.x branch, we still have time to change our minds. Instead of "validate on set, expand on get", we can validate and expand when the list of dependencies is set, then have a simple getter. This should make it possible to deprecate Migration::set() before the next major release of Drupal.

Steps to reproduce

Proposed resolution

  1. "Expand" the lists of migrations when $migration_dependencies is set by createInstances() or set().
  2. Change getMigrationDependencies() to a simple getter, and remove the optional parameter added in #3262395.

Remaining tasks

User interface changes

None

API changes

I am not sure that this counts as an API change. Previously, it was possible to set $migration_dependencies to an arbitrary value using set() and then use getMigrationDependencies() (adding the optional parameter after #3262395) to get the unexpanded lists. Now, it will be impossible to get the unexpanded lists.

Data model changes

None

Release notes snippet

N/A

πŸ“Œ Task
Status

Active

Version

10.1 ✨

Component
MigrationΒ  β†’

Last updated about 10 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

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

Comments & Activities

Production build 0.69.0 2024