Skip to content
Snippets Groups Projects

Move source_module from Migrate to Migrate Drupal

Closed quietone requested to merge issue/drupal-3009349:3009349-move-sourcemodule-and into 11.x
2 unresolved threads

Closes #3009349

Merge request reports

Approval is optional
Code Quality is loading
Test summary results are being parsed
Metrics reports are loading

Closed by catchcatch 1 month ago (Apr 18, 2025 1:16am UTC)

Merge details

  • The changes were not merged into .

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    • 669285f5 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Alex Pott added 1 commit

    added 1 commit

    • b64bc428 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Alex Pott added 1 commit

    added 1 commit

    • 6ccfd351 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Alex Pott added 1 commit

    added 1 commit

    • 89022df9 - Fix docs to use inheritdoc and fix my mistake :)

    Compare with previous version

  • quietone resolved all threads

    resolved all threads

  • quietone added 15 commits

    added 15 commits

    Compare with previous version

  • quietone added 1 commit

    added 1 commit

    • fc1e7678 - check the migration for the source_module definition

    Compare with previous version

  • quietone added 71 commits

    added 71 commits

    Compare with previous version

  • quietone added 1 commit

    added 1 commit

    • 7ba502f8 - add declare(strict_types=1);

    Compare with previous version

  • 100 // source_module.
    101 $source_id = $definition['source']['plugin'];
    102 $source_definition = $this->sourceManager->getDefinition($source_id);
    103 if (empty($source_definition['source_module'])) {
    104 throw new BadPluginDefinitionException($source_id, 'source_module');
    99 // Confirm that source_module is defined for Drupal sourced migrations.
    100 // If source_module is not defined in the migration then check for it in
    101 // the source plugin. Throw an exception if the source plugin has
    102 // migrate_drupal as a provider but does not define a source_module.
    103 if (empty($definition['source']['source_module'])) {
    104 $source_id = $definition['source']['plugin'];
    105 $source_definition = $this->sourceManager->getDefinition($source_id);
    106 if (in_array('migrate_drupal', $source_definition['provider'], TRUE) && empty($source_definition['source_module'])) {
    107 throw new BadPluginDefinitionException($source_id, 'source_module');
    108 }
    105 109 }
    • Comment on lines -99 to 105
      Suggested change
      100 // Confirm that source_module is defined for Drupal sourced migrations.
      101 // If source_module is not defined in the migration then check for it in
      102 // the source plugin. Throw an exception if the source plugin has
      103 // migrate_drupal as a provider but does not define a source_module.
      104 if (empty($definition['source']['source_module'])) {
      105 $source_id = $definition['source']['plugin'];
      106 $source_definition = $this->sourceManager->getDefinition($source_id);
      107 if (in_array('migrate_drupal', $source_definition['provider'], TRUE) && empty($source_definition['source_module'])) {
      108 throw new BadPluginDefinitionException($source_id, 'source_module');
      109 }
      110 }
      100 // Confirm that source_module is defined for Drupal sourced migrations.
      101 $source_id = $definition['source']['plugin'];
      102 $source_definition = $this->sourceManager->getDefinition($source_id);
      103 if (in_array('migrate_drupal', $source_definition['provider'], TRUE) && empty($source_definition['source_module'])) {
      104 throw new BadPluginDefinitionException($source_id, 'source_module');
      105 }
      106 // Tell non-Drupal sourced migrations to remove the source_module.
      107 if (!in_array('migrate_drupal', $source_definition['provider'], TRUE) && !empty($source_definition['source_module'])) {
      108 @trigger_error("Plugin $source_id has unless source_module defined. See CR", E_USER_DEPRECATED);
      109 }

      I think we should be triggering a deprecation something like the above.

      Edited by Alex Pott
    • changed this line in version 15 of the diff

    • Please register or sign in to reply
  • quietone added 85 commits

    added 85 commits

    Compare with previous version

  • Benji Fisher added 1553 commits

    added 1553 commits

    • f1b71f97...98f40c82 - 1544 commits from branch project:11.x
    • e5cc4008 - Convert patch #40
    • 5c5abe64 - Apply 1 suggestion(s) to 1 file(s)
    • 93fd3672 - Apply 1 suggestion(s) to 1 file(s)
    • 782ce59b - Apply 1 suggestion(s) to 1 file(s)
    • adaf9acd - Fix docs to use inheritdoc and fix my mistake :)
    • 28eac499 - Add test
    • 74af5ccc - check the migration for the source_module definition
    • 26e7a616 - add declare(strict_types=1);
    • 4b4ef344 - Convert new test module to use attributes instead of annotations

    Compare with previous version

  • Benji Fisher added 1 commit

    added 1 commit

    • 3dbadc2e - Add missing strict_types declaration

    Compare with previous version

  • Benji Fisher added 1 commit

    added 1 commit

    • 0fc5dbb9 - Update plugin manager after changing to attributes from annotations

    Compare with previous version

  • Benji Fisher added 1 commit

    added 1 commit

    • ce55824a - Update a test after changing plugin manager to attributes from annotations

    Compare with previous version

  • Benji Fisher added 4 commits

    added 4 commits

    • bfcbbdb0 - Handle different definition structure for source plugins annotations vs. attributes
    • 68460e53 - Trigger a deprecation error if source_module is used when not needed
    • 2c966100 - Move source_module to a new Attribute class in migrate_drupal
    • 8dcacf76 - Update most source plugins to use MigrateDrupalSource attribute

    Compare with previous version

  • Benji Fisher added 28 commits

    added 28 commits

    • 8dcacf76...73613e52 - 14 commits from branch project:11.x
    • 73613e52...279de759 - 4 earlier commits
    • d71b2601 - Fix docs to use inheritdoc and fix my mistake :)
    • 9bbc180e - Add test
    • 45c7a0ab - check the migration for the source_module definition
    • a60489ba - add declare(strict_types=1);
    • ca09423f - Convert new test module to use attributes instead of annotations
    • b4d9b12f - Add missing strict_types declaration
    • c12775fe - Updates after changing to attributes from annotations
    • 45d97895 - Trigger a deprecation error if source_module is used when not needed
    • d420eb09 - Move source_module to a new Attribute class in migrate_drupal
    • 8e68493f - Update most source plugins to use MigrateDrupalSource attribute

    Compare with previous version

  • Benji Fisher added 3 commits

    added 3 commits

    • 74bef4ad - Trigger a deprecation error if source_module is used when not needed
    • 7e3723ed - Move source_module to a new Attribute class in migrate_drupal
    • 36cd3482 - Update most source plugins to use MigrateDrupalSource attribute

    Compare with previous version

  • Benji Fisher added 1 commit

    added 1 commit

    • c3f55d70 - Restrict the new deprecation message

    Compare with previous version

  • Benji Fisher added 2 commits

    added 2 commits

    • a75be8a5 - Revert most source plugins to use annotations
    • 901533a3 - Remove the MigrateDrupalSource attribute class

    Compare with previous version

  • Benji Fisher added 2 commits

    added 2 commits

    • 76755ec2 - Remove source_module from migrations in block_content module
    • 653a0797 - Do not cause errors when migration_tags is not set

    Compare with previous version

  • Benji Fisher added 1 commit

    added 1 commit

    Compare with previous version

  • Benji Fisher added 2 commits

    added 2 commits

    • a6f1648d - Revert "Remove source_module from migrations in block_content module"
    • 81f1173d - Make sure that getEnforcedSourceModuleTags() works in this test

    Compare with previous version

  • Benji Fisher added 1 commit

    added 1 commit

    Compare with previous version

  • 623 623 /**
    624 624 * {@inheritdoc}
    625 625 */
    626 626 public function getSourceModule() {
  • Benji Fisher added 131 commits

    added 131 commits

    • 287a21a1...60ce3e07 - 108 commits from branch project:11.x
    • 60ce3e07...a80a27d1 - 13 earlier commits
    • 8fe29222 - Update most source plugins to use MigrateDrupalSource attribute
    • a77abb2c - Restrict the new deprecation message
    • 75f80312 - Revert most source plugins to use annotations
    • 65270fa5 - Remove the MigrateDrupalSource attribute class
    • dd5a17cc - Remove source_module from migrations in block_content module
    • 2c7fa232 - Do not cause errors when migration_tags is not set
    • 95c51304 - Revert some test changes from Issue #3421014
    • 81b4c0bb - Revert "Remove source_module from migrations in block_content module"
    • 490bb13a - Make sure that getEnforcedSourceModuleTags() works in this test
    • 089db44f - Fix an @group annotation

    Compare with previous version

  • Benji Fisher added 1 commit

    added 1 commit

    • 3668a002 - Update newly added source plugin after rebase

    Compare with previous version

  • Benji Fisher added 1 commit

    added 1 commit

    • d561234a - Update newly added source plugin after rebase

    Compare with previous version

  • closed

  • Please register or sign in to reply
    Loading