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

Issue fork drupal-3507572

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

Issue summary: View changes
Status: Postponed » Active
quietone’s picture

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

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

quietone’s picture

Title: Deprecate migrate source plugins » Deprecate migrate_drupal source plugins
longwave’s picture

Status: Active » Needs review

Alternative 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.

longwave’s picture

Added 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.

longwave’s picture

Added 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.

mikelutz’s picture

I 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.

mikelutz changed the visibility of the branch 3507572-deprecate-migrate-source to hidden.

mikelutz’s picture

@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?

longwave’s picture

We 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.

mikelutz’s picture

I'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.

longwave’s picture

Status: Needs review » Needs work

Let'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.

heddn’s picture

+1 on adding the deprecation directly on DrupalSqlBase

heddn’s picture

Status: Needs work » Needs review

Back to NR

heddn’s picture

I also took a hand at writing the CR for this.

needs-review-queue-bot’s picture

Status: Needs review » 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.

quietone’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems 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.

catch’s picture

Status: Reviewed & tested by the community » Needs work

The test changes will need to use phpunit attributes instead of @group legacy now.

quietone’s picture

Status: Needs work » Needs review

Made the switch to using attributes per #23.

catch’s picture

Status: Needs review » Reviewed & tested by the community

Back to RTBC for me

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » 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.

quietone’s picture

Status: Needs work » Reviewed & tested by the community

There 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

catch’s picture

Status: Reviewed & tested by the community » Needs work

Looks like there's at least one more merge conflict.

quietone’s picture

Status: Needs work » Reviewed & tested by the community

Rebase again, due to #3542540: Deprecate comment libraries and move to history module. I am restoring RTBC.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for all the rebasing. Committed/pushed to 11.x so it doesn't have to be done again!

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

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

Maintainers, please credit people who helped resolve this issue.

  • catch committed 515b5279 on 11.x
    Issue #3507572 by quietone, longwave, mikelutz, heddn: Deprecate...

Status: Fixed » Closed (fixed)

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