The changes in #3536657: New parameters introduced in MigrateExecutable class constructor to attempt backwards compatibility is inadvertently discarding any $options provided as the third argument to the constructor.

If the MigrateExecutable constructor is invoked with the old method signature (three arguments with the third as an array), the value passed to $keyValue will not be copied over to $options and will be lost.

When an array is provided as the third argument, the code is checking whether $options is already set:

if (!isset($options)) {
  $options = $keyValue;
}

But this is problematic because $options defaults to an empty array so it will always be set. $keyValue is updated to be the KeyValueFactoryInterface and the options array passed to the constructor is lost.

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:

  • 3542697-keep-options Comparechanges, plain diff MR !98
  • 1 hidden branch
  • 6.0.x Comparecompare

Comments

mediabounds created an issue. See original summary.

mediabounds changed the visibility of the branch 6.0.x to hidden.

mediabounds’s picture

Status: Active » Needs review
mediabounds’s picture

Title: Backwards compatibility is inadvertently discarding $options » Backwards compatibility in MigrateExecutable constructor is inadvertently discarding $options

heddn made their first commit to this issue’s fork.

  • heddn committed 73c1954b on 6.0.x authored by mediabounds
    Issue #3542697 by mediabounds, heddn: Backwards compatibility in...
heddn’s picture

Status: Needs review » Fixed

Thanks for the fix here.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.