Problem/Motivation
Deprecate the migrate source plugins used for migrating legacy Drupal sites.
Steps to reproduce
Proposed resolution
Deprecate in 11.3.0 for removal in 12.0.0
- DrupalSqlBase. Do this instead of adding deprecation notices to the 107 Migrate Drupal source plugins.
- \Drupal\migrate_drupal\Plugin\migrate\source\EmptySource
- \Drupal\migrate_drupal\Plugin\migrate\source\I18nQueryTrait
Remaining tasks
Create MR
Review
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|
Issue fork drupal-3507572
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
Comment #2
quietone commentedComment #3
quietone commentedUpdated from discussion on the Migrate video call today, benjifisher, heddn, mikelutz and myself were present. #3518542: [meeting] Migrate Meeting 2025-04-24 2100Z
Comment #7
quietone commentedComment #8
longwaveAlternative proposal in !12617 which deprecates DrupalSqlBase but then skips the deprecation notices for core extensions of that class; any other extensions in contrib will trigger the message as normal.
Comment #9
longwaveAdded some test coverage by removing test modules from the skip, and then expecting the deprecation in tests that use them. Let's see if anything else will fail now I copied in the other two source plugin deprecations from the original MR.
Comment #10
longwaveAdded similar dynamic migration messages for the EmptySource plugin and I18nQueryTrait trait and skipped the core implementations of them, they should still trigger in contrib/custom code.
Comment #11
mikelutzI like that, it’s pretty slick and much fewer lines than I was expecting to have to deal with. I’m inclined to try to get this merged in early in the 10.3 cycle so that contrib has time to deal with the fallout. It leaves the ‘hard’ problem of identifying each of the source plugins the legacy tests for the actual removal when the 12.x branch opens, but at least we don’t have to do that twice, once for @legacy annotations, and again for removal. And when we get around to doing it, we could just remove the suppressions to get a list of all affected tests easily enough.
Comment #13
mikelutz@longwave, Do we need to add the @deprecated annotation for DrupalSqlBase, or should that just be covered with the deprecation of the whole module eventually?
Comment #14
longwaveWe can, because that will notify people via PHPStan as well as via tests or at runtime - but I suspect the PHPStan baseline will grow quite a bit. Don't think we can engineer an ignore in the same way because the string will be fixed in the docblock and so it will be ignored by downstream too.
Comment #15
mikelutzI'm inclined to do it, since we can generate the baseline and don't have to put it together manually, but it's ultimately up to the committers and RMs. Contrib and custom code will be far more likely to be alerted through phpstan, as contrib and custom test coverage is likely to be spotty at best.
Comment #16
longwaveLet's try out adding the annotation and seeing what the impact is. If we have to add a bunch of stuff to the baseline, so be it; perhaps we can figure a way of ignoring it for core only, but letting downstream users get their notifications.
Comment #17
heddn+1 on adding the deprecation directly on DrupalSqlBase
Comment #18
heddnBack to NR
Comment #19
heddnI also took a hand at writing the CR for this.
Comment #20
needs-review-queue-bot commentedThe 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.
Comment #21
quietone commentedComment #22
smustgrave commentedSeems like a good deprecation to me. Couldn't find other examples of trait deprecations but the wording seemed fine and CR seems cleared so believe this one is good.
Comment #23
catchThe test changes will need to use phpunit attributes instead of @group legacy now.
Comment #24
quietone commentedMade the switch to using attributes per #23.
Comment #25
catchBack to RTBC for me
Comment #26
needs-review-queue-bot commentedThe 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.
Comment #27
quietone commentedThere was a simple conflict about attributes from #3547849: Add #[RunTestsInSeparateProcesses] attribute to all Functional/FunctionalJavascript tests in core/modules/migrate_drupal_ui/tests/src/Functional/MigrateMessageControllerTest.php. I am restoring RTBC
Comment #28
catchLooks like there's at least one more merge conflict.
Comment #29
quietone commentedRebase again, due to #3542540: Deprecate comment libraries and move to history module. I am restoring RTBC.
Comment #30
catchThanks for all the rebasing. Committed/pushed to 11.x so it doesn't have to be done again!