Problem/Motivation

In #3502755: Deprecate migrate process plugins needed only for site upgrades we identified the link_options, link_uri, timezone and user_langcode plugins as possibly being useful to sites outside of Migrate Drupal. This issue was spun off from there to decide their fate.

Steps to reproduce

Proposed resolution

For each plugin,

  1. Copy the plugin class to the core/modules/migrate/src/Plugin/migrate/process/ directory and update the code.
  2. Move any tests for the plugin to the migrate module.
  3. Keep the original classes, but deprecate them and remove the MigrateProcess plugin attribute.

Two of the four plugin classes were removed in the main branch in #3572280: Remove Migrate Drupal. In that branch, (1) should read as "Restore" rather than "Copy" for those two plugin classes, and (3) applies to just the other two plugin classes.

Remaining tasks

  1. Update the published change record (CR) Migrate process plugins for legacy upgrade are deprecated with a link to the CR for this issue: Migration plugins link_options, link_uri, timezone, and user_langcode are moved to the Migrate module.

User interface changes

None

Introduced terminology

None

API changes

Deprecate four classes in the menu_link_content, system, and user modules, replacing them with equivalent classes in the migrate module.

Data model changes

None

Release notes snippet

Issue fork drupal-3560075

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

longwave created an issue. See original summary.

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.

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

benjifisher’s picture

Issue summary: View changes
Status: Active » Needs review

In further discussion on #3502755: Deprecate migrate process plugins needed only for site upgrades, opinions were split evenly about whether to keep the timezone process plugin. I think the consensus was to keep all the others.

I think the process plugins should all be moved to the migrate module. I have done that in MR !14686. I followed the same pattern as in #3498915: Move content_entity source plugin to migrate module and #3506605: Move the d8_config source plugin to the migrate module: the only changes to the old plugin classes are removing the plugin attribute and adding deprecation notices. In particular, the old class still has all its own logic instead of extending the replacement class. That means we are free to modernize the code in the replacement classes, and I have done that.

I am updating the issue summary with my proposed resolution, but that is still open for discussion. The original summary said,

For each plugin, either:

  • Keep it where it is
  • Move it to migrate.module
  • Deprecate it
smustgrave’s picture

Status: Needs review » Needs work

This one needs a rebase please.

benjifisher’s picture

@smustgrave:

Thanks for flagging this issue for an update.

In #3502755: Deprecate migrate process plugins needed only for site upgrades, we agreed to keep the process plugins in this issue, but two of them were removed in #3572280: Remove Migrate Drupal, leading to modify/delete merge conflicts. I do not see any discussion of the user_langcode nor timezone plugins (UserLangcode and TimeZone classes) on the latter issue, so I think that was an oversight, not an intentional choice.

Since migrate_drupal will be deprecated, but not removed, in Drupal 11.4, I will not update the branch for MR !14686. I think we should fix this issue for 11.4, using that branch (modifying the existing classes and adding the new ones). I will create a new branch and a new MR, starting with the existing feature branch and resolving the merge conflicts.

benjifisher changed the visibility of the branch 3560075-move-process-plugins to hidden.

benjifisher’s picture

Issue summary: View changes
Status: Needs work » Needs review

I opened MR !14969.

In Comment #7, I over-stated the decision made in #3502755: Deprecate migrate process plugins needed only for site upgrades. The four plugins in this issue are all candidates for keeping, but we can still decide on this issue whether to keep all of them and whether to move the keepers to the migrate module.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs change record updates

Sorry for the delay. But seems like good deprecations. Am tagging for CR updates as assuming https://www.drupal.org/node/3533560 will have to be updated with these items after it's merged.

benjifisher’s picture

Issue summary: View changes

Good point. I am also adding the CR update to the "Remaining tasks", with more detail.

  • catch committed 32d3a4dc on main
    task: #3560075 Relocate or deprecate link_options, link_uri, timezone...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to main, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

catch’s picture

Version: main » 11.x-dev

Actually, after committing this - I realised these should be deprecated in 11.4.0 not 12.0.0 - otherwise they're not available to contrib/custom modules until we drop support for Drupal 11.

Reverted and recommitted with that change.

  • catch committed 4b7913fb on 11.x
    task: #3560075 Relocate or deprecate link_options, link_uri, timezone...

  • catch committed fe9b08d4 on main
    task: #3560075 Relocate or deprecate link_options, link_uri, timezone...

  • catch committed ee459f79 on main
    Revert "task: #3560075 Relocate or deprecate link_options, link_uri,...
benjifisher’s picture

Issue summary: View changes

I updated the change records mentioned in the "Remaining tasks".

needs-review-queue-bot’s picture

Status: Fixed » Needs work
StatusFileSize
new91 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

catch’s picture

Status: Needs work » Fixed
Issue tags: -Needs change record updates

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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