Skip to content
Snippets Groups Projects

Move source_module from Migrate to Migrate Drupal

Open quietone requested to merge issue/drupal-3009349:3009349-move-sourcemodule-and into 11.x

Closes #3009349

Merge request reports

Loading
Loading

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

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading