Problem/Motivation

This issue is a follow-up to #3262395: $migration_dependencies has inconsistent structure, another child of #2796755: [PP-1] Deprecate Migration::set().

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 #3349922: [meeting] Migrate Meeting 2023-03-23 1400Z. 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

Issue fork drupal-3351991

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

benjifisher created an issue. See original summary.

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

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

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.