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.
- core/modules/block/src/Plugin/migrate/process/BlockPluginId.php
- core/modules/block/src/Plugin/migrate/process/BlockRegion.php
- core/modules/block/src/Plugin/migrate/process/BlockSettings.php
- core/modules/block/src/Plugin/migrate/process/BlockTheme.php
- core/modules/block/src/Plugin/migrate/process/BlockVisibility.php
- core/modules/block/src/Plugin/migrate/process/RolesLookup.php
- core/modules/field/src/Plugin/migrate/process/FieldType.php
- core/modules/field/src/Plugin/migrate/process/ProcessField.php
- core/modules/filter/src/Plugin/migrate/process/FilterID.php
- core/modules/filter/src/Plugin/migrate/process/FilterSettings.php
- core/modules/language/src/Plugin/migrate/process/ContentTranslationEnabledSetting.php
- core/modules/language/src/Plugin/migrate/process/LanguageDomains.php
- core/modules/language/src/Plugin/migrate/process/LanguageNegotiation.php
- core/modules/language/src/Plugin/migrate/process/LanguageTypes.php
- core/modules/link/src/Plugin/migrate/process/FieldLink.php
- core/modules/menu_link_content/src/Plugin/migrate/process/LinkOptions.php
- core/modules/menu_link_content/src/Plugin/migrate/process/LinkUri.php
- core/modules/path/src/Plugin/migrate/process/PathSetTranslated.php
- core/modules/responsive_image/src/Plugin/migrate/process/ImageStyleMappings.php
- core/modules/search/src/Plugin/migrate/process/SearchConfigurationRankings.php
- core/modules/taxonomy/src/Plugin/migrate/process/TargetBundle.php
- core/modules/user/src/Plugin/migrate/process/ConvertTokens.php
- core/modules/user/src/Plugin/migrate/process/ProfileFieldSettings.php
- core/modules/user/src/Plugin/migrate/process/UserUpdate8002.php
Steps to reproduce
Proposed resolution
Keep
- core/modules/menu_link_content/src/Plugin/migrate/process/LinkOptions.php
- core/modules/menu_link_content/src/Plugin/migrate/process/LinkUri.php
- core/modules/user/src/Plugin/migrate/process/UserLangcode.php
- core/modules/system/src/Plugin/migrate/process/d6/TimeZone.php
Deprecate in 11.3.0 for removal in 12.0.0
- core/modules/block/src/Plugin/migrate/process/BlockPluginId.php
- core/modules/block/src/Plugin/migrate/process/BlockRegion.php
- core/modules/block/src/Plugin/migrate/process/BlockSettings.php
- core/modules/block/src/Plugin/migrate/process/BlockTheme.php
- core/modules/block/src/Plugin/migrate/process/BlockVisibility.php
- core/modules/block/src/Plugin/migrate/process/RolesLookup.php
- core/modules/field/src/Plugin/migrate/process/d6/FieldFormatterSettingsDefaults.php
- core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceDefaults.php
- core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceOptionTranslation.php
- core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceSettings.php
- core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceWidgetSettings.php
- core/modules/field/src/Plugin/migrate/process/d6/FieldOptionTranslation.php
- core/modules/field/src/Plugin/migrate/process/d6/FieldSettings.php
- core/modules/field/src/Plugin/migrate/process/d6/FieldTypeDefaults.php
- core/modules/field/src/Plugin/migrate/process/d7/FieldBundle.php
- core/modules/field/src/Plugin/migrate/process/d7/FieldInstanceDefaults.php
- core/modules/field/src/Plugin/migrate/process/d7/FieldInstanceOptionTranslation.php
- core/modules/field/src/Plugin/migrate/process/d7/FieldInstanceSettings.php
- core/modules/field/src/Plugin/migrate/process/d7/FieldOptionTranslation.php
- core/modules/field/src/Plugin/migrate/process/d7/FieldSettings.php
- core/modules/field/src/Plugin/migrate/process/d7/FieldTypeDefaults.php
- core/modules/file/src/Plugin/migrate/process/d6/FieldFile.php
- core/modules/file/src/Plugin/migrate/process/d6/FileUri.php
- core/modules/filter/src/Plugin/migrate/process/FilterID.php
- core/modules/filter/src/Plugin/migrate/process/FilterSettings.php
- core/modules/filter/src/Plugin/migrate/process/d6/FilterFormatPermission.php
- core/modules/image/src/Plugin/migrate/process/d6/ImageCacheActions.php
- core/modules/language/src/Plugin/migrate/process/ContentTranslationEnabledSetting.php
- core/modules/language/src/Plugin/migrate/process/LanguageDomains.php
- core/modules/language/src/Plugin/migrate/process/LanguageNegotiation.php
- core/modules/language/src/Plugin/migrate/process/LanguageTypes.php
- core/modules/link/src/Plugin/migrate/process/FieldLink.php
- core/modules/node/src/Plugin/migrate/process/d6/NodeUpdate7008.php
- core/modules/path/src/Plugin/migrate/process/PathSetTranslated.php
- core/modules/responsive_image/src/Plugin/migrate/process/ImageStyleMappings.php
- core/modules/search/src/Plugin/migrate/process/SearchConfigurationRankings.php
- core/modules/system/src/Plugin/migrate/process/d6/SystemUpdate7000.php
- core/modules/system/src/Plugin/migrate/process/d6/TimeZone.php
- core/modules/taxonomy/src/Plugin/migrate/process/TargetBundle.php
- core/modules/user/src/Plugin/migrate/process/ConvertTokens.php
- core/modules/user/src/Plugin/migrate/process/ProfileFieldSettings.php
- core/modules/user/src/Plugin/migrate/process/UserLangcode.php
- core/modules/user/src/Plugin/migrate/process/UserUpdate8002.php
- core/modules/user/src/Plugin/migrate/process/d6/ProfileFieldOptionTranslation.php
- core/modules/user/src/Plugin/migrate/process/d6/UserUpdate7002.php
Completed in #3502749: Deprecate migrate field plugins
- core/modules/field/src/Plugin/migrate/process/FieldType.php
- 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.
- 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.
- 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
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:
- 3502755-deprecate-migrate-process
changes, plain diff MR !12582
Comments
Comment #2
quietone commentedComment #3
quietone commentedComment #4
benjifisherUpdated 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).
Comment #5
quietone commentedComment #6
nicxvan commentedI suspect: https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/filte... will be on the list for removal.
Comment #7
benjifisherYes, the
filter_idprocess 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.
Comment #9
quietone commentedComment #10
quietone commentedComment #11
quietone commentedAdd the process plugins in migrate_drupal.
Comment #12
quietone commentedComment #13
quietone commentedComment #14
quietone commentedComment #15
quietone commentedComment #16
benjifisher@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_drupalmodule. 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 entiremigrate_drupalmodule, right?I have used the
link_uriprocess 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
migratemodule. 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 frommigrate_drupaltomigrate:MigrateProcessattribute from the original.migratemodule, with theMigrateProcessattribute.We might even decide to do (1) as part of this issue and postpone (2) to (4) to a followup issue.
Comment #17
benjifisherI reviewed the process plugins in the
blockandfieldmodules. 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
#migrationSlack channel.Comment #18
benjifisherI reviewed the 47 process plugins, and I think there are 4 that we should consider keeping:
link_options(Drupal\menu_link_content\Plugin\migrate\process\LinkOptions): if$value['query']is a string, then applyparse_str()to replace it with an array.link_uri(Drupal\menu_link_content\Plugin\migrate\process\LinkUri): if$valueis a path representing an internal link (starting with'/','?', or'#'), then convert it to a URI using one of the schemesbase:,entity:, orinternal:.timezone(Drupal\system\Plugin\migrate\process\d6\TimeZone): if$valueis an offset (in seconds) from UTC, then convert it to a compatible timezone name usingtimezone_name_from_abbr().user_langcode(Drupal\user\Plugin\migrate\process\UserLangcode): if$valueis 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
linkfield, 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
migratemodule. 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.Comment #19
quietone commentedThey were ones that I subsequently resolved.
However, I have updated the 'problem' section of the issue summary and removed the strike throughs.
Comment #20
quietone commented@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.
Comment #21
quietone commentedComment #22
longwaveSome thoughts about the four plugins identified in #18:
link_optionsseems quite specific to its intended use; a more genericparse_str()plugin would be better than expecting an array with aquerykey.link_uriindeed seems useful and we should keep it.timezonedoesn't seem too useful and could be done with a callback plugin if someone wanted to do it, I think?user_langcodedoes seem like it has a niche use case in migrating language codes from other sources, perhaps we just keep it?Comment #23
danflanagan8In 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:I'd rather use
timezoneif 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. :)
Comment #24
quietone commentedComment #25
quietone commentedThe 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.Comment #26
quietone commentedComment #27
benjifisherLet's take a step back: what is the criterion for keeping a process plugin?
I think the criterion should be
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
(which my hypothetical developer borrowed from
d6_menu_links.yml) withthe hypothetical developer will have to
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:
Comment #28
quietone commented@benjifisher, i am confused. #23 suggests keeping
timezonenotlink_options. Are you suggesting keeping both?Comment #29
benjifisher@quietone:
Yes, I am suggesting that we keep all four that I listed in Comment #18. But I will not fight for
link_optionsif the consensus is to deprecate it.Comment #30
quietone commented@benjifisher, thanks.
So, we need a final decision on
link_optionsandtimezone.Looking again
timezoneI 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.Comment #31
longwaveIdeally 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.
Comment #32
longwaveUn-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.
Comment #33
quietone commented@longwave, thanks.
I have updated the issue summary and the change record.
Comment #34
benjifisherI 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
migratemodule, 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
migratemodule.Comment #35
benjifisherSorry for the noise.
I looked again, and indeed those three process plugins are in the
migrate_drupalmodule. We do not have to deprecate the process plugins since the whole module is deprecated.Back to RTBC.
Comment #36
longwaveOpened #3560075: Relocate or deprecate link_options, link_uri, timezone and user_langcode migrate plugins
Comment #37
catchWent to commit this but it needs a rebase.
Comment #38
quietone commentedRebase with no conflict, back to RTBC
Comment #39
catchCommitted/pushed to 11.x and cherry-picked to 11.3.x, thanks!