Problem/Motivation

Deprecate the migrate process plugins used for migrating legacy Drupal sites.
There are 78 Migrate process plugins, 29 are in the migrate module. That leaves 49 to check to see if any are useful outside of a legacy migration. Of those 17 are for drupal6 and 7 are for drupal 7. That leaves 25 to check, listed below.

Commands to find the plugin that are not in core/modules/migrate
List
git grep -l "#\[MigrateProcess" | grep -v core/modules/migrate | nl
List all deprecated process plugins
git grep -l "#\[MigrateProcess" | grep -v core/modules/migrate | xargs grep -H -c https://www.drupal.org/node/3533560 | grep :2 | awk -F: '{print $1}'
List all non deprecated process plugin
git grep -l "#\[MigrateProcess" | grep -v core/modules/migrate | xargs grep -H -c https://www.drupal.org/node/3533560 | grep :0 | awk -F: '{print $1}'

Here are all the process plugins where a decision to deprecate or to keep is needed.

  1. core/modules/block/src/Plugin/migrate/process/BlockPluginId.php
  2. core/modules/block/src/Plugin/migrate/process/BlockRegion.php
  3. core/modules/block/src/Plugin/migrate/process/BlockSettings.php
  4. core/modules/block/src/Plugin/migrate/process/BlockTheme.php
  5. core/modules/block/src/Plugin/migrate/process/BlockVisibility.php
  6. core/modules/block/src/Plugin/migrate/process/RolesLookup.php
  7. core/modules/field/src/Plugin/migrate/process/FieldType.php
  8. core/modules/field/src/Plugin/migrate/process/ProcessField.php
  9. core/modules/filter/src/Plugin/migrate/process/FilterID.php
  10. core/modules/filter/src/Plugin/migrate/process/FilterSettings.php
  11. core/modules/language/src/Plugin/migrate/process/ContentTranslationEnabledSetting.php
  12. core/modules/language/src/Plugin/migrate/process/LanguageDomains.php
  13. core/modules/language/src/Plugin/migrate/process/LanguageNegotiation.php
  14. core/modules/language/src/Plugin/migrate/process/LanguageTypes.php
  15. core/modules/link/src/Plugin/migrate/process/FieldLink.php
  16. core/modules/menu_link_content/src/Plugin/migrate/process/LinkOptions.php
  17. core/modules/menu_link_content/src/Plugin/migrate/process/LinkUri.php
  18. core/modules/path/src/Plugin/migrate/process/PathSetTranslated.php
  19. core/modules/responsive_image/src/Plugin/migrate/process/ImageStyleMappings.php
  20. core/modules/search/src/Plugin/migrate/process/SearchConfigurationRankings.php
  21. core/modules/taxonomy/src/Plugin/migrate/process/TargetBundle.php
  22. core/modules/user/src/Plugin/migrate/process/ConvertTokens.php
  23. core/modules/user/src/Plugin/migrate/process/ProfileFieldSettings.php
  24. core/modules/user/src/Plugin/migrate/process/UserUpdate8002.php

Steps to reproduce

Proposed resolution

Keep

  1. core/modules/menu_link_content/src/Plugin/migrate/process/LinkOptions.php
  2. core/modules/menu_link_content/src/Plugin/migrate/process/LinkUri.php
  3. core/modules/user/src/Plugin/migrate/process/UserLangcode.php
  4. core/modules/system/src/Plugin/migrate/process/d6/TimeZone.php

Deprecate in 11.3.0 for removal in 12.0.0

  1. core/modules/block/src/Plugin/migrate/process/BlockPluginId.php
  2. core/modules/block/src/Plugin/migrate/process/BlockRegion.php
  3. core/modules/block/src/Plugin/migrate/process/BlockSettings.php
  4. core/modules/block/src/Plugin/migrate/process/BlockTheme.php
  5. core/modules/block/src/Plugin/migrate/process/BlockVisibility.php
  6. core/modules/block/src/Plugin/migrate/process/RolesLookup.php
  7. core/modules/field/src/Plugin/migrate/process/d6/FieldFormatterSettingsDefaults.php
  8. core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceDefaults.php
  9. core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceOptionTranslation.php
  10. core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceSettings.php
  11. core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceWidgetSettings.php
  12. core/modules/field/src/Plugin/migrate/process/d6/FieldOptionTranslation.php
  13. core/modules/field/src/Plugin/migrate/process/d6/FieldSettings.php
  14. core/modules/field/src/Plugin/migrate/process/d6/FieldTypeDefaults.php
  15. core/modules/field/src/Plugin/migrate/process/d7/FieldBundle.php
  16. core/modules/field/src/Plugin/migrate/process/d7/FieldInstanceDefaults.php
  17. core/modules/field/src/Plugin/migrate/process/d7/FieldInstanceOptionTranslation.php
  18. core/modules/field/src/Plugin/migrate/process/d7/FieldInstanceSettings.php
  19. core/modules/field/src/Plugin/migrate/process/d7/FieldOptionTranslation.php
  20. core/modules/field/src/Plugin/migrate/process/d7/FieldSettings.php
  21. core/modules/field/src/Plugin/migrate/process/d7/FieldTypeDefaults.php
  22. core/modules/file/src/Plugin/migrate/process/d6/FieldFile.php
  23. core/modules/file/src/Plugin/migrate/process/d6/FileUri.php
  24. core/modules/filter/src/Plugin/migrate/process/FilterID.php
  25. core/modules/filter/src/Plugin/migrate/process/FilterSettings.php
  26. core/modules/filter/src/Plugin/migrate/process/d6/FilterFormatPermission.php
  27. core/modules/image/src/Plugin/migrate/process/d6/ImageCacheActions.php
  28. core/modules/language/src/Plugin/migrate/process/ContentTranslationEnabledSetting.php
  29. core/modules/language/src/Plugin/migrate/process/LanguageDomains.php
  30. core/modules/language/src/Plugin/migrate/process/LanguageNegotiation.php
  31. core/modules/language/src/Plugin/migrate/process/LanguageTypes.php
  32. core/modules/link/src/Plugin/migrate/process/FieldLink.php
  33. core/modules/node/src/Plugin/migrate/process/d6/NodeUpdate7008.php
  34. core/modules/path/src/Plugin/migrate/process/PathSetTranslated.php
  35. core/modules/responsive_image/src/Plugin/migrate/process/ImageStyleMappings.php
  36. core/modules/search/src/Plugin/migrate/process/SearchConfigurationRankings.php
  37. core/modules/system/src/Plugin/migrate/process/d6/SystemUpdate7000.php
  38. core/modules/system/src/Plugin/migrate/process/d6/TimeZone.php
  39. core/modules/taxonomy/src/Plugin/migrate/process/TargetBundle.php
  40. core/modules/user/src/Plugin/migrate/process/ConvertTokens.php
  41. core/modules/user/src/Plugin/migrate/process/ProfileFieldSettings.php
  42. core/modules/user/src/Plugin/migrate/process/UserLangcode.php
  43. core/modules/user/src/Plugin/migrate/process/UserUpdate8002.php
  44. core/modules/user/src/Plugin/migrate/process/d6/ProfileFieldOptionTranslation.php
  45. core/modules/user/src/Plugin/migrate/process/d6/UserUpdate7002.php

Completed in #3502749: Deprecate migrate field plugins

  1. core/modules/field/src/Plugin/migrate/process/FieldType.php
  2. core/modules/field/src/Plugin/migrate/process/ProcessField.php

The process plugins in migrate_drupal are not deprecated individually because the module itself will be deprecated.

Remaining tasks

Decide if the following should be kept or deprecated.

  1. link_options (Drupal\menu_link_content\Plugin\migrate\process\LinkOptions): if $value['query'] is a string, then apply parse_str() to replace it with an array.
  2. timezone (Drupal\system\Plugin\migrate\process\d6\TimeZone): if $value is an offset (in seconds) from UTC, then convert it to a compatible timezone name using timezone_name_from_abbr().

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3502755

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

quietone created an issue. See original summary.

quietone’s picture

Status: Active » Postponed
quietone’s picture

Issue summary: View changes
benjifisher’s picture

Issue summary: View changes
Status: Postponed » Active

Updated from discussion on the Migrate video call today. benjifisher, heddn, mikelutz and quietone were present. #3518542: [meeting] Migrate Meeting 2025-04-24 2100Z

Two of the blocking issues have been Fixed, and the third is Closed (won't fix).

quietone’s picture

Issue summary: View changes
nicxvan’s picture

benjifisher’s picture

Title: Deprecate migrate process plugins » Deprecate migrate process plugins needed only for site upgrades

Yes, the filter_id process plugin is needed only when upgrading from Drupal 6 or 7. It should be deprecated as part of this issue.

I am updating the title to clarify that we are not planning to deprecate all process plugins. My title is a little awkward, so feel free to improve on it.

quietone’s picture

Issue summary: View changes
quietone’s picture

Issue summary: View changes
quietone’s picture

Issue summary: View changes

Add the process plugins in migrate_drupal.

quietone’s picture

Issue summary: View changes
quietone’s picture

Issue summary: View changes
quietone’s picture

Issue summary: View changes
quietone’s picture

Issue summary: View changes
Status: Active » Needs review
benjifisher’s picture

Status: Needs review » Needs work

@quietone:

I am confused by the two lists in the issue summary (IS). Can you explain the "to check" list and why some items are struck through?

I guess the second list (under Proposed resolution) is meant to agree with the list of changed files in the MR. If so, then it is mostly correct, but the MR deprecates three process plugins in the migrate_drupal module. I think the IS is correct, and the MR should be updated: we do not need to deprecate these process plugins, since we will be deprecating the entire migrate_drupal module, right?

I have used the link_uri process plugin (Drupal\menu_link_content\Plugin\migrate\process\LinkUri) in custom migrations. My vote is that we should not deprecate that one.

I think I am going to have to review the other 46 process plugins and decide whether there are more that I want to keep.

I wonder if, when we want to keep a process plugin, we should move it to the migrate module. I do not think I will have a firm opinion until I review the 46 process plugins. If we think this is a good idea, then we should follow the pattern we used when moving two source plugins from migrate_drupal to migrate:

  1. Deprecate the original process plugin.
  2. Remove the MigrateProcess attribute from the original.
  3. Add the plugin to the migrate module, with the MigrateProcess attribute.
  4. Modernize the code in the new plugin. For example, use constructor promotion and add type declarations.

We might even decide to do (1) as part of this issue and postpone (2) to (4) to a followup issue.

benjifisher’s picture

I reviewed the process plugins in the block and field modules. I do not think we want to keep any of them. That is, they all seem to be written explicitly to handle migrations from D6/D7, and I do not think they are generally useful.

21 done, 26 to go.

I also made a RFC in the #migration Slack channel.

benjifisher’s picture

I reviewed the 47 process plugins, and I think there are 4 that we should consider keeping:

  1. link_options (Drupal\menu_link_content\Plugin\migrate\process\LinkOptions): if $value['query'] is a string, then apply parse_str() to replace it with an array.
  2. link_uri (Drupal\menu_link_content\Plugin\migrate\process\LinkUri): if $value is a path representing an internal link (starting with '/', '?', or '#'), then convert it to a URI using one of the schemes base:, entity:, or internal:.
  3. timezone (Drupal\system\Plugin\migrate\process\d6\TimeZone): if $value is an offset (in seconds) from UTC, then convert it to a compatible timezone name using timezone_name_from_abbr().
  4. user_langcode (Drupal\user\Plugin\migrate\process\UserLangcode): if $value is the language code of a language enabled on the site, then return $value; otherwise, fall back to 'en' or the language code of the site’s default language (depending on configuration).

The only one I feel strongly about is (2), since I have used it in custom migrations (not site upgrades). I think that (1) could be useful when migrating data into a link field, and I can see using (3) or (4) in a migration that creates users from a CSV source.

I do think that we should move any "keepers" to the migrate module. That will give us a chance to modernize the code (as I suggested in Comment #16) and to rewrite the doc blocks. To control scope, we should do that in a followup issue.

quietone’s picture

Issue summary: View changes

why some items are struck through?

They were ones that I subsequently resolved.

However, I have updated the 'problem' section of the issue summary and removed the strike throughs.

quietone’s picture

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

@benjifisher, thanks for reviewing all the process plugins!

I have restored link_uri in the MR since it was used in a custom migration. I agree that user_langcode is one to keep. The others are possible too but let's hear from others before changing the MR. So far, there has been no response in the Slack thread.

I don't think it matters but I have asked the other release managers about deprecating the migrate_drupal process plugins:

Right now I don't think the kept process plugins should move to the migrate module. But let's explore that in a meeting or a separate issue.

quietone’s picture

Issue summary: View changes
longwave’s picture

Some thoughts about the four plugins identified in #18:

link_options seems quite specific to its intended use; a more generic parse_str() plugin would be better than expecting an array with a query key.

link_uri indeed seems useful and we should keep it.

timezone doesn't seem too useful and could be done with a callback plugin if someone wanted to do it, I think?

user_langcode does seem like it has a niche use case in migrating language codes from other sources, perhaps we just keep it?

danflanagan8’s picture

In an independent assessment following @benjifisher's comment in Slack, timezone<code> was the only process plugin outside the migrate module (other than <codel>link_uri) that struck me as potentially useful in a non-Drupal-upgrade migration.

@Longwave is probably right in #22 that it could be re-created with callback. It would be a little clumsy though because the that function takes three arguments and the first and third are constants and the middle one is the modified pipeline value. And then there's a default value. I think it would have to go something like this:

constants:
  empty_string: ''
  zero: 0
process:
  _timezone_int:
    plugin: callback
    callable: intval
    source: my_timesone
  timezone_string:
    -
      plugin: callback
      unpack_source: true
      callable: timezone_name_from_abbr
      source:
        - constants/empty_string
        - '@_timezone_int'
        - constants/zero
    -
      plugin: default_value
      default_value: 'UTC'

I'd rather use timezone if I had to do this transformation. Of course, I've never run into this case!

I don't know. It's a little piece of code that has test coverage and might be useful. I tend to be in favor of keeping things like that. I also have too much stuff in basement. :)

quietone’s picture

Issue summary: View changes
quietone’s picture

Issue summary: View changes

The timezone plugin implements a very specific case and hard codes 2 of the 3 the input parameters to timezone_name_from_abbr. The process plugins in the migrate module are more generic and flexible. For that reason I think it should not stay in core.

quietone’s picture

Issue summary: View changes
benjifisher’s picture

Let's take a step back: what is the criterion for keeping a process plugin?

I think the criterion should be

It is reasonable to expect that a few developers have used the plugin in custom migrations.

If so, then I would like to save them the trouble of updating their migrations: it is a sort of backwards compatibility. Even if the change is as simple as replacing

  'link/options':
    plugin: link_options
    source: options

(which my hypothetical developer borrowed from d6_menu_links.yml) with

  'link/options': options
  'link/options/query':
    - plugin: skip_on_empty
      source: options/query
    - plugin: parse_url

the hypothetical developer will have to

  1. Notice that there is a problem
  2. Find the release note or change record
  3. Update the migration

In other words, Step 3 is the easy part.

In short, I am arguing in favor of a low bar for keeping a process plugin. That ends up with the same conclusion that @danflanagan8 suggested in Comment #23:

It's a little piece of code that has test coverage and might be useful. I tend to be in favor of keeping things like that.

quietone’s picture

@benjifisher, i am confused. #23 suggests keeping timezone not link_options. Are you suggesting keeping both?

benjifisher’s picture

@quietone:

Yes, I am suggesting that we keep all four that I listed in Comment #18. But I will not fight for link_options if the consensus is to deprecate it.

quietone’s picture

Issue summary: View changes

@benjifisher, thanks.

So, we need a final decision on link_options and timezone.

Looking again timezone I see that it is in a d6 sub-directory. We should not have the d6 and d7 sub-directories in Drupal 12 so that one, at least has to move elsewhere.

longwave’s picture

Status: Needs review » Needs work

Ideally we want to ship this with 11.3.0 and the remaining window is very short so I think this should land ASAP.

To err on the side of caution let's just keep both of those in, it won't hurt if they go unused, and we can always deprecate them later.

longwave’s picture

Status: Needs work » Reviewed & tested by the community

Un-deprecated those two plugins, and also removed the IgnoreDeprecations from LinkUriTest now that is not deprecated either. Hopefully this is a minor enough change that I can self-RTBC.

quietone’s picture

Issue summary: View changes

@longwave, thanks.

I have updated the issue summary and the change record.

benjifisher’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs followup

I think we should revert the commit d21d179e293. The commit message is "remove process plugins in migrate_drupal", but it un-deprecates 3 process plugins in the migrate module, all related to the "complete" node migrations.

Other than that, I agree with Comment #31: we should get this issue mostly right ASAP, and we may change our minds later about the handful of process plugins that we are keeping.

I am adding the tag for a followup, to consider moving the four "keepers" to the migrate module.

benjifisher’s picture

Status: Needs work » Reviewed & tested by the community

Sorry for the noise.

I looked again, and indeed those three process plugins are in the migrate_drupal module. We do not have to deprecate the process plugins since the whole module is deprecated.

Back to RTBC.

longwave’s picture

catch’s picture

Status: Reviewed & tested by the community » Needs work

Went to commit this but it needs a rebase.

quietone’s picture

Status: Needs work » Reviewed & tested by the community

Rebase with no conflict, back to RTBC

catch’s picture

Version: 11.x-dev » 11.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked to 11.3.x, 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 committed ace0483c on 11.3.x
    task: #3502755 Deprecate migrate process plugins needed only for site...

  • catch committed d1a5b4fa on 11.x
    task: #3502755 Deprecate migrate process plugins needed only for site...

Status: Fixed » Closed (fixed)

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