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
- "Expand" the lists of migrations when
$migration_dependenciesis set bycreateInstances()orset(). - 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
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