diff --git a/core/modules/action/migration_templates/action_settings.yml b/core/modules/action/migration_templates/action_settings.yml index df69e33..a99676b 100644 --- a/core/modules/action/migration_templates/action_settings.yml +++ b/core/modules/action/migration_templates/action_settings.yml @@ -7,6 +7,7 @@ source: plugin: variable variables: - actions_max_stack + source_module: action process: recursion_limit: actions_max_stack destination: diff --git a/core/modules/action/src/Plugin/migrate/source/Action.php b/core/modules/action/src/Plugin/migrate/source/Action.php index ac14a44..f3ff266 100644 --- a/core/modules/action/src/Plugin/migrate/source/Action.php +++ b/core/modules/action/src/Plugin/migrate/source/Action.php @@ -10,7 +10,7 @@ * * @MigrateSource( * id = "action", - * source_provider = "system" + * source_module = "system" * ) */ class Action extends DrupalSqlBase { diff --git a/core/modules/aggregator/migration_templates/d6_aggregator_settings.yml b/core/modules/aggregator/migration_templates/d6_aggregator_settings.yml index 72372e4..d6ebf3d 100644 --- a/core/modules/aggregator/migration_templates/d6_aggregator_settings.yml +++ b/core/modules/aggregator/migration_templates/d6_aggregator_settings.yml @@ -12,6 +12,7 @@ source: - aggregator_teaser_length - aggregator_clear - aggregator_summary_items + source_module: aggregator process: fetcher: aggregator_fetcher parser: aggregator_parser diff --git a/core/modules/aggregator/migration_templates/d7_aggregator_settings.yml b/core/modules/aggregator/migration_templates/d7_aggregator_settings.yml index c8c793f..3396950 100644 --- a/core/modules/aggregator/migration_templates/d7_aggregator_settings.yml +++ b/core/modules/aggregator/migration_templates/d7_aggregator_settings.yml @@ -12,6 +12,7 @@ source: - aggregator_teaser_length - aggregator_clear - aggregator_summary_items + source_module: aggregator process: fetcher: aggregator_fetcher parser: aggregator_parser diff --git a/core/modules/aggregator/src/Plugin/migrate/source/AggregatorFeed.php b/core/modules/aggregator/src/Plugin/migrate/source/AggregatorFeed.php index 59244d4..7d01536 100644 --- a/core/modules/aggregator/src/Plugin/migrate/source/AggregatorFeed.php +++ b/core/modules/aggregator/src/Plugin/migrate/source/AggregatorFeed.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "aggregator_feed", - * source_provider = "aggregator" + * source_module = "aggregator" * ) */ class AggregatorFeed extends DrupalSqlBase { diff --git a/core/modules/aggregator/src/Plugin/migrate/source/AggregatorItem.php b/core/modules/aggregator/src/Plugin/migrate/source/AggregatorItem.php index 428c558..8cde1f8 100644 --- a/core/modules/aggregator/src/Plugin/migrate/source/AggregatorItem.php +++ b/core/modules/aggregator/src/Plugin/migrate/source/AggregatorItem.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "aggregator_item", - * source_provider = "aggregator" + * source_module = "aggregator" * ) */ class AggregatorItem extends DrupalSqlBase { diff --git a/core/modules/ban/src/Plugin/migrate/source/d7/BlockedIps.php b/core/modules/ban/src/Plugin/migrate/source/d7/BlockedIps.php index fc4d877..7d3eeeb 100644 --- a/core/modules/ban/src/Plugin/migrate/source/d7/BlockedIps.php +++ b/core/modules/ban/src/Plugin/migrate/source/d7/BlockedIps.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "d7_blocked_ips", - * source_provider = "system" + * source_module = "system" * ) */ class BlockedIps extends DrupalSqlBase { diff --git a/core/modules/block/src/Plugin/migrate/source/Block.php b/core/modules/block/src/Plugin/migrate/source/Block.php index df4c0e9..6ec421c 100644 --- a/core/modules/block/src/Plugin/migrate/source/Block.php +++ b/core/modules/block/src/Plugin/migrate/source/Block.php @@ -10,7 +10,7 @@ * * @MigrateSource( * id = "block", - * source_provider = "block" + * source_module = "block" * ) */ class Block extends DrupalSqlBase { diff --git a/core/modules/block_content/migration_templates/block_content_body_field.yml b/core/modules/block_content/migration_templates/block_content_body_field.yml index b51d032..a40ac20 100644 --- a/core/modules/block_content/migration_templates/block_content_body_field.yml +++ b/core/modules/block_content/migration_templates/block_content_body_field.yml @@ -19,6 +19,7 @@ source: type: string field_name: type: string + source_module: block process: entity_type: entity_type bundle: bundle diff --git a/core/modules/block_content/migration_templates/block_content_entity_display.yml b/core/modules/block_content/migration_templates/block_content_entity_display.yml index 06a35d7..9d75e6f 100644 --- a/core/modules/block_content/migration_templates/block_content_entity_display.yml +++ b/core/modules/block_content/migration_templates/block_content_entity_display.yml @@ -22,6 +22,7 @@ source: type: string field_name: type: string + source_module: block process: entity_type: entity_type bundle: bundle diff --git a/core/modules/block_content/migration_templates/block_content_entity_form_display.yml b/core/modules/block_content/migration_templates/block_content_entity_form_display.yml index 92b5a10..d8f387e 100644 --- a/core/modules/block_content/migration_templates/block_content_entity_form_display.yml +++ b/core/modules/block_content/migration_templates/block_content_entity_form_display.yml @@ -20,6 +20,7 @@ source: type: string field_name: type: string + source_module: block process: entity_type: entity_type bundle: bundle diff --git a/core/modules/block_content/migration_templates/block_content_type.yml b/core/modules/block_content/migration_templates/block_content_type.yml index bc75eea..ca797b9 100644 --- a/core/modules/block_content/migration_templates/block_content_type.yml +++ b/core/modules/block_content/migration_templates/block_content_type.yml @@ -12,6 +12,7 @@ source: ids: id: type: string + source_module: block process: id: id label: label diff --git a/core/modules/block_content/src/Plugin/migrate/source/d6/Box.php b/core/modules/block_content/src/Plugin/migrate/source/d6/Box.php index a28927b..0a1da19 100644 --- a/core/modules/block_content/src/Plugin/migrate/source/d6/Box.php +++ b/core/modules/block_content/src/Plugin/migrate/source/d6/Box.php @@ -8,7 +8,8 @@ * Drupal 6 block source from database. * * @MigrateSource( - * id = "d6_box" + * id = "d6_box", + * source_module = "block" * ) */ class Box extends DrupalSqlBase { diff --git a/core/modules/block_content/src/Plugin/migrate/source/d7/BlockCustom.php b/core/modules/block_content/src/Plugin/migrate/source/d7/BlockCustom.php index ea33682..7c166e9 100644 --- a/core/modules/block_content/src/Plugin/migrate/source/d7/BlockCustom.php +++ b/core/modules/block_content/src/Plugin/migrate/source/d7/BlockCustom.php @@ -8,7 +8,8 @@ * Drupal 7 custom block source from database. * * @MigrateSource( - * id = "d7_block_custom" + * id = "d7_block_custom", + * source_module = "block" * ) */ class BlockCustom extends DrupalSqlBase { diff --git a/core/modules/book/migration_templates/d6_book_settings.yml b/core/modules/book/migration_templates/d6_book_settings.yml index 16e6695..d205b8d 100644 --- a/core/modules/book/migration_templates/d6_book_settings.yml +++ b/core/modules/book/migration_templates/d6_book_settings.yml @@ -8,6 +8,7 @@ source: - book_child_type - book_block_mode - book_allowed_types + source_module: book process: child_type: book_child_type 'block/navigation/mode': book_block_mode diff --git a/core/modules/book/src/Plugin/migrate/source/d6/Book.php b/core/modules/book/src/Plugin/migrate/source/d6/Book.php index f41bb42..87ae972 100644 --- a/core/modules/book/src/Plugin/migrate/source/d6/Book.php +++ b/core/modules/book/src/Plugin/migrate/source/d6/Book.php @@ -8,7 +8,8 @@ * Drupal 6 book source. * * @MigrateSource( - * id = "d6_book" + * id = "d6_book", + * source_module = "book" * ) */ class Book extends DrupalSqlBase { diff --git a/core/modules/comment/src/Plugin/migrate/source/d6/Comment.php b/core/modules/comment/src/Plugin/migrate/source/d6/Comment.php index 93f77a0..671947d 100644 --- a/core/modules/comment/src/Plugin/migrate/source/d6/Comment.php +++ b/core/modules/comment/src/Plugin/migrate/source/d6/Comment.php @@ -10,7 +10,7 @@ * * @MigrateSource( * id = "d6_comment", - * source_provider = "comment" + * source_module = "comment" * ) */ class Comment extends DrupalSqlBase { diff --git a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariable.php b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariable.php index a56fb4d..398895b 100644 --- a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariable.php +++ b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariable.php @@ -7,7 +7,8 @@ /** * @MigrateSource( - * id = "d6_comment_variable" + * id = "d6_comment_variable", + * source_module = "comment" * ) */ class CommentVariable extends DrupalSqlBase { diff --git a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php index 0eea686..0096ecd 100644 --- a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php +++ b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php @@ -4,7 +4,8 @@ /** * @MigrateSource( - * id = "d6_comment_variable_per_comment_type" + * id = "d6_comment_variable_per_comment_type", + * source_module = "comment" * ) */ class CommentVariablePerCommentType extends CommentVariable { diff --git a/core/modules/comment/src/Plugin/migrate/source/d7/Comment.php b/core/modules/comment/src/Plugin/migrate/source/d7/Comment.php index e643eb1..4e3f3ca 100644 --- a/core/modules/comment/src/Plugin/migrate/source/d7/Comment.php +++ b/core/modules/comment/src/Plugin/migrate/source/d7/Comment.php @@ -10,7 +10,7 @@ * * @MigrateSource( * id = "d7_comment", - * source_provider = "comment" + * source_module = "comment" * ) */ class Comment extends FieldableEntity { diff --git a/core/modules/comment/src/Plugin/migrate/source/d7/CommentType.php b/core/modules/comment/src/Plugin/migrate/source/d7/CommentType.php index 2ac7c97..a64fc8e 100644 --- a/core/modules/comment/src/Plugin/migrate/source/d7/CommentType.php +++ b/core/modules/comment/src/Plugin/migrate/source/d7/CommentType.php @@ -11,7 +11,7 @@ * * @MigrateSource( * id = "d7_comment_type", - * source_provider = "comment" + * source_module = "comment" * ) */ class CommentType extends DrupalSqlBase { diff --git a/core/modules/config_translation/migration_templates/d6_i18n_system_maintenance.yml b/core/modules/config_translation/migration_templates/d6_i18n_system_maintenance.yml index 1c99961..8f10767 100644 --- a/core/modules/config_translation/migration_templates/d6_i18n_system_maintenance.yml +++ b/core/modules/config_translation/migration_templates/d6_i18n_system_maintenance.yml @@ -6,6 +6,7 @@ source: plugin: i18n_variable variables: - site_offline_message + source_module: i18n process: langcode: language message: site_offline_message diff --git a/core/modules/config_translation/migration_templates/d6_i18n_system_site.yml b/core/modules/config_translation/migration_templates/d6_i18n_system_site.yml index 3c80821..f54e1b8 100644 --- a/core/modules/config_translation/migration_templates/d6_i18n_system_site.yml +++ b/core/modules/config_translation/migration_templates/d6_i18n_system_site.yml @@ -13,6 +13,7 @@ source: - site_frontpage - site_403 - site_404 + source_module: i18n process: langcode: language name: site_name diff --git a/core/modules/config_translation/migration_templates/d6_i18n_user_mail.yml b/core/modules/config_translation/migration_templates/d6_i18n_user_mail.yml index d1e5db5..d6e6063 100644 --- a/core/modules/config_translation/migration_templates/d6_i18n_user_mail.yml +++ b/core/modules/config_translation/migration_templates/d6_i18n_user_mail.yml @@ -19,6 +19,7 @@ source: - user_mail_register_pending_approval_body - user_mail_status_blocked_subject - user_mail_status_blocked_body + source_module: i18n process: langcode: language 'status_activated/subject': diff --git a/core/modules/config_translation/migration_templates/d6_i18n_user_settings.yml b/core/modules/config_translation/migration_templates/d6_i18n_user_settings.yml index 36b0fa6c..8fc7bf4 100644 --- a/core/modules/config_translation/migration_templates/d6_i18n_user_settings.yml +++ b/core/modules/config_translation/migration_templates/d6_i18n_user_settings.yml @@ -10,6 +10,7 @@ source: - user_email_verification - user_register - anonymous + source_module: i18n process: langcode: language 'notify/status_blocked': user_mail_status_blocked_notify diff --git a/core/modules/config_translation/src/Plugin/migrate/source/d6/I18nProfileField.php b/core/modules/config_translation/src/Plugin/migrate/source/d6/I18nProfileField.php index 2989f96..76321c2 100644 --- a/core/modules/config_translation/src/Plugin/migrate/source/d6/I18nProfileField.php +++ b/core/modules/config_translation/src/Plugin/migrate/source/d6/I18nProfileField.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "d6_i18n_profile_field", - * source_provider = "i18n" + * source_module = "i18nprofile" * ) */ class I18nProfileField extends DrupalSqlBase { diff --git a/core/modules/contact/src/Plugin/migrate/source/ContactCategory.php b/core/modules/contact/src/Plugin/migrate/source/ContactCategory.php index 0b9f7b3..c361588 100644 --- a/core/modules/contact/src/Plugin/migrate/source/ContactCategory.php +++ b/core/modules/contact/src/Plugin/migrate/source/ContactCategory.php @@ -10,7 +10,7 @@ * * @MigrateSource( * id = "contact_category", - * source_provider = "contact" + * source_module = "contact" * ) */ class ContactCategory extends DrupalSqlBase { diff --git a/core/modules/contact/src/Plugin/migrate/source/ContactSettings.php b/core/modules/contact/src/Plugin/migrate/source/ContactSettings.php index 911f3bd..8297be6 100644 --- a/core/modules/contact/src/Plugin/migrate/source/ContactSettings.php +++ b/core/modules/contact/src/Plugin/migrate/source/ContactSettings.php @@ -7,7 +7,7 @@ /** * @MigrateSource( * id = "contact_settings", - * source_provider = "contact" + * source_module = "contact" * ) */ class ContactSettings extends Variable { diff --git a/core/modules/dblog/migration_templates/d6_dblog_settings.yml b/core/modules/dblog/migration_templates/d6_dblog_settings.yml index 64da0a7..a5d746e 100644 --- a/core/modules/dblog/migration_templates/d6_dblog_settings.yml +++ b/core/modules/dblog/migration_templates/d6_dblog_settings.yml @@ -6,6 +6,7 @@ source: plugin: variable variables: - dblog_row_limit + source_module: dblog process: row_limit: dblog_row_limit destination: diff --git a/core/modules/dblog/migration_templates/d7_dblog_settings.yml b/core/modules/dblog/migration_templates/d7_dblog_settings.yml index e22768f..761e9e4 100644 --- a/core/modules/dblog/migration_templates/d7_dblog_settings.yml +++ b/core/modules/dblog/migration_templates/d7_dblog_settings.yml @@ -6,6 +6,7 @@ source: plugin: variable variables: - dblog_row_limit + source_module: dblog process: row_limit: dblog_row_limit destination: diff --git a/core/modules/field/src/Plugin/migrate/source/d6/Field.php b/core/modules/field/src/Plugin/migrate/source/d6/Field.php index 7c9e620..cab0204 100644 --- a/core/modules/field/src/Plugin/migrate/source/d6/Field.php +++ b/core/modules/field/src/Plugin/migrate/source/d6/Field.php @@ -10,7 +10,7 @@ * * @MigrateSource( * id = "d6_field", - * source_provider = "content" + * source_module = "content" * ) */ class Field extends DrupalSqlBase { diff --git a/core/modules/field/src/Plugin/migrate/source/d6/FieldInstance.php b/core/modules/field/src/Plugin/migrate/source/d6/FieldInstance.php index dbea7a8..b47f6ab 100644 --- a/core/modules/field/src/Plugin/migrate/source/d6/FieldInstance.php +++ b/core/modules/field/src/Plugin/migrate/source/d6/FieldInstance.php @@ -10,7 +10,7 @@ * * @MigrateSource( * id = "d6_field_instance", - * source_provider = "content" + * source_module = "content" * ) */ class FieldInstance extends DrupalSqlBase { diff --git a/core/modules/field/src/Plugin/migrate/source/d6/FieldInstancePerFormDisplay.php b/core/modules/field/src/Plugin/migrate/source/d6/FieldInstancePerFormDisplay.php index 21baa9e..1db201e 100644 --- a/core/modules/field/src/Plugin/migrate/source/d6/FieldInstancePerFormDisplay.php +++ b/core/modules/field/src/Plugin/migrate/source/d6/FieldInstancePerFormDisplay.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "d6_field_instance_per_form_display", - * source_provider = "content" + * source_module = "content" * ) */ class FieldInstancePerFormDisplay extends DrupalSqlBase { diff --git a/core/modules/field/src/Plugin/migrate/source/d6/FieldInstancePerViewMode.php b/core/modules/field/src/Plugin/migrate/source/d6/FieldInstancePerViewMode.php index 33852d6..2fd1e1b 100644 --- a/core/modules/field/src/Plugin/migrate/source/d6/FieldInstancePerViewMode.php +++ b/core/modules/field/src/Plugin/migrate/source/d6/FieldInstancePerViewMode.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "d6_field_instance_per_view_mode", - * source_provider = "content" + * source_module = "content" * ) */ class FieldInstancePerViewMode extends ViewModeBase { diff --git a/core/modules/field/src/Plugin/migrate/source/d7/Field.php b/core/modules/field/src/Plugin/migrate/source/d7/Field.php index d9aef91..5b63ad7 100644 --- a/core/modules/field/src/Plugin/migrate/source/d7/Field.php +++ b/core/modules/field/src/Plugin/migrate/source/d7/Field.php @@ -9,7 +9,8 @@ * Drupal 7 field source from database. * * @MigrateSource( - * id = "d7_field" + * id = "d7_field", + * source_module = "field" * ) */ class Field extends DrupalSqlBase { diff --git a/core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php b/core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php index d06336e..522f537 100644 --- a/core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php +++ b/core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php @@ -10,7 +10,7 @@ * * @MigrateSource( * id = "d7_field_instance", - * source_provider = "field" + * source_module = "field" * ) */ class FieldInstance extends DrupalSqlBase { diff --git a/core/modules/field/src/Plugin/migrate/source/d7/FieldInstancePerFormDisplay.php b/core/modules/field/src/Plugin/migrate/source/d7/FieldInstancePerFormDisplay.php index ac599ec..3f7336e 100644 --- a/core/modules/field/src/Plugin/migrate/source/d7/FieldInstancePerFormDisplay.php +++ b/core/modules/field/src/Plugin/migrate/source/d7/FieldInstancePerFormDisplay.php @@ -9,7 +9,8 @@ * The field instance per form display source class. * * @MigrateSource( - * id = "d7_field_instance_per_form_display" + * id = "d7_field_instance_per_form_display", + * source_module = "field" * ) */ class FieldInstancePerFormDisplay extends DrupalSqlBase { diff --git a/core/modules/field/src/Plugin/migrate/source/d7/FieldInstancePerViewMode.php b/core/modules/field/src/Plugin/migrate/source/d7/FieldInstancePerViewMode.php index 7339e76..52eca16 100644 --- a/core/modules/field/src/Plugin/migrate/source/d7/FieldInstancePerViewMode.php +++ b/core/modules/field/src/Plugin/migrate/source/d7/FieldInstancePerViewMode.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "d7_field_instance_per_view_mode", - * source_provider = "field" + * source_module = "field" * ) */ class FieldInstancePerViewMode extends DrupalSqlBase { diff --git a/core/modules/field/src/Plugin/migrate/source/d7/ViewMode.php b/core/modules/field/src/Plugin/migrate/source/d7/ViewMode.php index 3dd037c..71cbf77 100644 --- a/core/modules/field/src/Plugin/migrate/source/d7/ViewMode.php +++ b/core/modules/field/src/Plugin/migrate/source/d7/ViewMode.php @@ -6,7 +6,8 @@ /** * @MigrateSource( - * id = "d7_view_mode" + * id = "d7_view_mode", + * source_module = "field" * ) */ class ViewMode extends DrupalSqlBase { diff --git a/core/modules/file/migration_templates/d6_upload_field.yml b/core/modules/file/migration_templates/d6_upload_field.yml index a919f91..ecd0959 100644 --- a/core/modules/file/migration_templates/d6_upload_field.yml +++ b/core/modules/file/migration_templates/d6_upload_field.yml @@ -6,7 +6,7 @@ source: # We do an empty source and a proper destination to have an idmap for # migration_dependencies. plugin: md_empty - provider: upload + source_module: upload constants: entity_type: node type: file diff --git a/core/modules/file/migration_templates/file_settings.yml b/core/modules/file/migration_templates/file_settings.yml index 36584cc..9af1808 100644 --- a/core/modules/file/migration_templates/file_settings.yml +++ b/core/modules/file/migration_templates/file_settings.yml @@ -9,6 +9,7 @@ source: - file_description_type - file_description_length - file_icon_directory + source_module: system process: 'description/type': file_description_type 'description/length': file_description_length diff --git a/core/modules/file/src/Plugin/migrate/source/d6/File.php b/core/modules/file/src/Plugin/migrate/source/d6/File.php index 0564b6b..714dec9 100644 --- a/core/modules/file/src/Plugin/migrate/source/d6/File.php +++ b/core/modules/file/src/Plugin/migrate/source/d6/File.php @@ -9,7 +9,8 @@ * Drupal 6 file source from database. * * @MigrateSource( - * id = "d6_file" + * id = "d6_file", + * source_module = "system" * ) */ class File extends DrupalSqlBase { diff --git a/core/modules/file/src/Plugin/migrate/source/d6/Upload.php b/core/modules/file/src/Plugin/migrate/source/d6/Upload.php index 4e07a23..475ce61 100644 --- a/core/modules/file/src/Plugin/migrate/source/d6/Upload.php +++ b/core/modules/file/src/Plugin/migrate/source/d6/Upload.php @@ -10,7 +10,7 @@ * * @MigrateSource( * id = "d6_upload", - * source_provider = "upload" + * source_module = "upload" * ) */ class Upload extends DrupalSqlBase { diff --git a/core/modules/file/src/Plugin/migrate/source/d6/UploadInstance.php b/core/modules/file/src/Plugin/migrate/source/d6/UploadInstance.php index c1b3345..a0eff92 100644 --- a/core/modules/file/src/Plugin/migrate/source/d6/UploadInstance.php +++ b/core/modules/file/src/Plugin/migrate/source/d6/UploadInstance.php @@ -10,7 +10,7 @@ * * @MigrateSource( * id = "d6_upload_instance", - * source_provider = "upload" + * source_module = "upload" * ) */ class UploadInstance extends DrupalSqlBase { diff --git a/core/modules/file/src/Plugin/migrate/source/d7/File.php b/core/modules/file/src/Plugin/migrate/source/d7/File.php index e418f82..5e88151 100644 --- a/core/modules/file/src/Plugin/migrate/source/d7/File.php +++ b/core/modules/file/src/Plugin/migrate/source/d7/File.php @@ -10,7 +10,8 @@ * Drupal 7 file source from database. * * @MigrateSource( - * id = "d7_file" + * id = "d7_file", + * source_module = "file" * ) */ class File extends DrupalSqlBase { diff --git a/core/modules/filter/migration_templates/d7_filter_settings.yml b/core/modules/filter/migration_templates/d7_filter_settings.yml index d6239fc..f3182e3 100644 --- a/core/modules/filter/migration_templates/d7_filter_settings.yml +++ b/core/modules/filter/migration_templates/d7_filter_settings.yml @@ -6,6 +6,7 @@ source: plugin: variable variables: - filter_fallback_format + source_module: filter process: fallback_format: filter_fallback_format destination: diff --git a/core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php b/core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php index 54b33d4..de9ab4c 100644 --- a/core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php +++ b/core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php @@ -9,7 +9,8 @@ * Drupal 6 filter source from database. * * @MigrateSource( - * id = "d6_filter_format" + * id = "d6_filter_format", + * source_module = "filter" * ) */ class FilterFormat extends DrupalSqlBase { diff --git a/core/modules/filter/src/Plugin/migrate/source/d7/FilterFormat.php b/core/modules/filter/src/Plugin/migrate/source/d7/FilterFormat.php index 55c2811..13438f2 100644 --- a/core/modules/filter/src/Plugin/migrate/source/d7/FilterFormat.php +++ b/core/modules/filter/src/Plugin/migrate/source/d7/FilterFormat.php @@ -9,7 +9,8 @@ * Drupal 7 filter source from database. * * @MigrateSource( - * id = "d7_filter_format" + * id = "d7_filter_format", + * source_module = "filter" * ) */ class FilterFormat extends DrupalSqlBase { diff --git a/core/modules/forum/migration_templates/d6_forum_settings.yml b/core/modules/forum/migration_templates/d6_forum_settings.yml index 18ba8d4..406eed3 100644 --- a/core/modules/forum/migration_templates/d6_forum_settings.yml +++ b/core/modules/forum/migration_templates/d6_forum_settings.yml @@ -11,6 +11,7 @@ source: - forum_block_num_0 - forum_block_num_1 - forum_nav_vocabulary + source_module: forum process: 'block/active/limit': forum_block_num_0 'block/new/limit': forum_block_num_1 diff --git a/core/modules/forum/migration_templates/d7_forum_settings.yml b/core/modules/forum/migration_templates/d7_forum_settings.yml index 086d3e6..70d690a 100644 --- a/core/modules/forum/migration_templates/d7_forum_settings.yml +++ b/core/modules/forum/migration_templates/d7_forum_settings.yml @@ -11,6 +11,7 @@ source: - forum_block_num_active - forum_block_num_new - forum_nav_vocabulary + source_module: forum process: 'block/active/limit': forum_block_num_active 'block/new/limit': forum_block_num_new diff --git a/core/modules/image/migration_templates/d7_image_settings.yml b/core/modules/image/migration_templates/d7_image_settings.yml index bfae4d5..354706a 100644 --- a/core/modules/image/migration_templates/d7_image_settings.yml +++ b/core/modules/image/migration_templates/d7_image_settings.yml @@ -8,6 +8,7 @@ source: - allow_insecure_derivatives - suppress_itok_output - image_style_preview_image + source_module: image process: suppress_itok_output: suppress_itok_output allow_insecure_derivatives: allow_insecure_derivatives diff --git a/core/modules/image/src/Plugin/migrate/source/d6/ImageCachePreset.php b/core/modules/image/src/Plugin/migrate/source/d6/ImageCachePreset.php index aade9ab..662648d 100644 --- a/core/modules/image/src/Plugin/migrate/source/d6/ImageCachePreset.php +++ b/core/modules/image/src/Plugin/migrate/source/d6/ImageCachePreset.php @@ -10,7 +10,7 @@ * * @MigrateSource( * id = "d6_imagecache_presets", - * source_provider = "imagecache" + * source_module = "imagecache" * ) */ class ImageCachePreset extends DrupalSqlBase { diff --git a/core/modules/image/src/Plugin/migrate/source/d7/ImageStyles.php b/core/modules/image/src/Plugin/migrate/source/d7/ImageStyles.php index dab62f3..070cc9b 100644 --- a/core/modules/image/src/Plugin/migrate/source/d7/ImageStyles.php +++ b/core/modules/image/src/Plugin/migrate/source/d7/ImageStyles.php @@ -10,7 +10,7 @@ * * @MigrateSource( * id = "d7_image_styles", - * source_provider = "image" + * source_module = "image" * ) */ class ImageStyles extends DrupalSqlBase { diff --git a/core/modules/language/migration_templates/d6_language_negotiation_settings.yml b/core/modules/language/migration_templates/d6_language_negotiation_settings.yml index abc71f6..2530ebc 100644 --- a/core/modules/language/migration_templates/d6_language_negotiation_settings.yml +++ b/core/modules/language/migration_templates/d6_language_negotiation_settings.yml @@ -6,6 +6,7 @@ source: plugin: variable variables: - language_negotiation + source_module: language process: session/parameter: plugin: default_value diff --git a/core/modules/language/migration_templates/d6_language_types.yml b/core/modules/language/migration_templates/d6_language_types.yml index 05ce300..52289c5 100644 --- a/core/modules/language/migration_templates/d6_language_types.yml +++ b/core/modules/language/migration_templates/d6_language_types.yml @@ -6,6 +6,7 @@ source: plugin: variable variables: - language_negotiation + source_module: language process: all: plugin: default_value diff --git a/core/modules/language/migration_templates/d7_language_negotiation_settings.yml b/core/modules/language/migration_templates/d7_language_negotiation_settings.yml index 7759965..7e113b8 100644 --- a/core/modules/language/migration_templates/d7_language_negotiation_settings.yml +++ b/core/modules/language/migration_templates/d7_language_negotiation_settings.yml @@ -7,6 +7,7 @@ source: variables: - locale_language_negotiation_session_param - locale_language_negotiation_url_part + source_module: locale process: session/parameter: plugin: default_value diff --git a/core/modules/language/migration_templates/d7_language_types.yml b/core/modules/language/migration_templates/d7_language_types.yml index 3a634a2..10d6ac7 100644 --- a/core/modules/language/migration_templates/d7_language_types.yml +++ b/core/modules/language/migration_templates/d7_language_types.yml @@ -12,6 +12,7 @@ source: - locale_language_providers_weight_language - locale_language_providers_weight_language_content - locale_language_providers_weight_language_url + source_module: language process: all: plugin: language_types diff --git a/core/modules/language/migration_templates/default_language.yml b/core/modules/language/migration_templates/default_language.yml index 6d7604d..ddb966f 100644 --- a/core/modules/language/migration_templates/default_language.yml +++ b/core/modules/language/migration_templates/default_language.yml @@ -7,6 +7,7 @@ source: plugin: variable variables: - language_default + source_module: locale process: default_langcode: - diff --git a/core/modules/language/src/Plugin/migrate/source/Language.php b/core/modules/language/src/Plugin/migrate/source/Language.php index fa6a199..c232675 100644 --- a/core/modules/language/src/Plugin/migrate/source/Language.php +++ b/core/modules/language/src/Plugin/migrate/source/Language.php @@ -8,7 +8,7 @@ /** * @MigrateSource( * id = "language", - * source_provider = "locale" + * source_module = "locale" * ) */ class Language extends DrupalSqlBase { diff --git a/core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettings.php b/core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettings.php index ab9ba83..369238c 100644 --- a/core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettings.php +++ b/core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettings.php @@ -10,6 +10,7 @@ * * @MigrateSource( * id = "d6_language_content_settings", + * source_module = "locale" * ) */ class LanguageContentSettings extends DrupalSqlBase { diff --git a/core/modules/language/src/Plugin/migrate/source/d7/LanguageContentSettings.php b/core/modules/language/src/Plugin/migrate/source/d7/LanguageContentSettings.php index cb748ae..efe8708 100644 --- a/core/modules/language/src/Plugin/migrate/source/d7/LanguageContentSettings.php +++ b/core/modules/language/src/Plugin/migrate/source/d7/LanguageContentSettings.php @@ -10,6 +10,7 @@ * * @MigrateSource( * id = "d7_language_content_settings", + * source_module = "locale" * ) */ class LanguageContentSettings extends DrupalSqlBase { diff --git a/core/modules/locale/migration_templates/locale_settings.yml b/core/modules/locale/migration_templates/locale_settings.yml index 6eebe20..dbd7b61 100644 --- a/core/modules/locale/migration_templates/locale_settings.yml +++ b/core/modules/locale/migration_templates/locale_settings.yml @@ -8,6 +8,7 @@ source: variables: - locale_cache_strings - locale_js_directory + source_module: locale process: cache_strings: locale_cache_strings 'javascript/directory': locale_js_directory diff --git a/core/modules/menu_link_content/src/Plugin/migrate/source/MenuLink.php b/core/modules/menu_link_content/src/Plugin/migrate/source/MenuLink.php index 338d3ec..2efb8ac 100644 --- a/core/modules/menu_link_content/src/Plugin/migrate/source/MenuLink.php +++ b/core/modules/menu_link_content/src/Plugin/migrate/source/MenuLink.php @@ -11,6 +11,7 @@ * * @MigrateSource( * id = "menu_link", + * source_module = "menu" * ) */ class MenuLink extends DrupalSqlBase { diff --git a/core/modules/menu_ui/migration_templates/menu_settings.yml b/core/modules/menu_ui/migration_templates/menu_settings.yml index dee5f9e..d3b1501 100644 --- a/core/modules/menu_ui/migration_templates/menu_settings.yml +++ b/core/modules/menu_ui/migration_templates/menu_settings.yml @@ -8,6 +8,7 @@ source: plugin: variable variables: - menu_override_parent_selector + source_module: menu process: override_parent_selector: menu_override_parent_selector destination: diff --git a/core/modules/migrate/src/Annotation/MigrateDestination.php b/core/modules/migrate/src/Annotation/MigrateDestination.php index 1fd51d7..e0bea38 100644 --- a/core/modules/migrate/src/Annotation/MigrateDestination.php +++ b/core/modules/migrate/src/Annotation/MigrateDestination.php @@ -43,4 +43,16 @@ class MigrateDestination extends Plugin { */ public $requirements_met = TRUE; + /** + * Identifies the system handling the data the destination plugin will write. + * + * This can be any type, and the destination plugin itself determines how the + * value is used. For example, Migrate Drupal's destination plugins expect + * destination_module to be the name of a module that must be installed on the + * destination. + * + * @var mixed + */ + public $destination_module; + } diff --git a/core/modules/migrate/src/Annotation/MigrateSource.php b/core/modules/migrate/src/Annotation/MigrateSource.php index 95a2431..5c688cd 100644 --- a/core/modules/migrate/src/Annotation/MigrateSource.php +++ b/core/modules/migrate/src/Annotation/MigrateSource.php @@ -44,15 +44,15 @@ class MigrateSource extends Plugin implements MultipleProviderAnnotationInterfac * Identifies the system providing the data the source plugin will read. * * This can be any type, and the source plugin itself determines how the value - * is used. For example, Migrate Drupal's source plugins expect - * source_provider to be the name of a module that must be installed and - * enabled in the source database. + * is used. For example, Migrate Drupal's source plugins expect source_module + * to be the name of a module that must be installed and enabled in the source + * database. * * @see \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase::checkRequirements * * @var mixed */ - public $source_provider; + public $source_module; /** * Specifies the minimum version of the source provider. @@ -60,7 +60,7 @@ class MigrateSource extends Plugin implements MultipleProviderAnnotationInterfac * This can be any type, and the source plugin itself determines how it is * used. For example, Migrate Drupal's source plugins expect this to be an * integer representing the minimum installed database schema version of the - * module specified by source_provider. + * module specified by source_module. * * @var mixed */ diff --git a/core/modules/migrate/src/Plugin/MigrateDestinationInterface.php b/core/modules/migrate/src/Plugin/MigrateDestinationInterface.php index 866e80c..103916c 100644 --- a/core/modules/migrate/src/Plugin/MigrateDestinationInterface.php +++ b/core/modules/migrate/src/Plugin/MigrateDestinationInterface.php @@ -133,4 +133,11 @@ public function supportsRollback(); */ public function rollbackAction(); + /** + * Gets the destination module handling the destination data. + * + * @return string|null + * The destination module or NULL if not found. + */ + public function getDestinationModule(); } diff --git a/core/modules/migrate/src/Plugin/MigrateSourceInterface.php b/core/modules/migrate/src/Plugin/MigrateSourceInterface.php index ef1785e..a40af2e 100644 --- a/core/modules/migrate/src/Plugin/MigrateSourceInterface.php +++ b/core/modules/migrate/src/Plugin/MigrateSourceInterface.php @@ -100,4 +100,12 @@ public function __toString(); */ public function getIds(); + /** + * Gets the source module providing the source data. + * + * @return string|null + * The source module or NULL if not found. + */ + public function getSourceModule(); + } diff --git a/core/modules/migrate/src/Plugin/migrate/destination/Config.php b/core/modules/migrate/src/Plugin/migrate/destination/Config.php index b8db601..18d78a3 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/Config.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/Config.php @@ -195,4 +195,26 @@ public function rollback(array $destination_identifier) { } } + /** + * {@inheritdoc} + */ + public function getDestinationModule() { + if (!empty($this->configuration['destination_module'])) { + return $this->configuration['destination_module']; + } + if (!empty($this->pluginDefinition['destination_module'])) { + return $this->pluginDefinition['destination_module']; + } + // Config translations require the config_translation module so set the + // migration provider to 'config_translation'. The corresponding non + // translated configuration is expected to be handled in a separate + // migration. + if (isset($this->configuration['translations'])) { + return 'config_translation'; + } + // Get the module handling this configuration object from the config_name, + // which is of the form . + return !empty($this->configuration['config_name']) ? explode('.', $this->configuration['config_name'], 2)[0] : NULL; + } + } diff --git a/core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php b/core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php index 18a95e6..d6c3088 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php @@ -110,4 +110,22 @@ protected function setRollbackAction(array $id_map, $update_action = MigrateIdMa } } + /** + * {@inheritdoc} + */ + public function getDestinationModule() { + if (!empty($this->configuration['destination_module'])) { + return $this->configuration['destination_module']; + } + if (!empty($this->pluginDefinition['destination_module'])) { + return $this->pluginDefinition['destination_module']; + } + if (is_string($this->migration->provider)) { + return $this->migration->provider; + } + else { + return reset($this->migration->provider); + } + } + } diff --git a/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php b/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php index e355850..cef9882 100644 --- a/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php +++ b/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php @@ -541,4 +541,17 @@ public function postRollback(MigrateRollbackEvent $event) { $this->saveHighWater(NULL); } + /** + * {@inheritdoc} + */ + public function getSourceModule() { + if (!empty($this->configuration['source_module'])) { + return $this->configuration['source_module']; + } + elseif (!empty($this->pluginDefinition['source_module'])) { + return $this->pluginDefinition['source_module']; + } + return NULL; + } + } diff --git a/core/modules/migrate/tests/modules/migrate_external_translated_test/src/Plugin/migrate/source/MigrateExternalTranslatedTestSource.php b/core/modules/migrate/tests/modules/migrate_external_translated_test/src/Plugin/migrate/source/MigrateExternalTranslatedTestSource.php index ceda6d8..8edaecc 100644 --- a/core/modules/migrate/tests/modules/migrate_external_translated_test/src/Plugin/migrate/source/MigrateExternalTranslatedTestSource.php +++ b/core/modules/migrate/tests/modules/migrate_external_translated_test/src/Plugin/migrate/source/MigrateExternalTranslatedTestSource.php @@ -8,7 +8,8 @@ * A simple migrate source for our tests. * * @MigrateSource( - * id = "migrate_external_translated_test" + * id = "migrate_external_translated_test", + * source_module = "migrate_external_translated_test" * ) */ class MigrateExternalTranslatedTestSource extends SourcePluginBase { diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php new file mode 100644 index 0000000..b54ecf7 --- /dev/null +++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php @@ -0,0 +1,64 @@ +container->get('module_handler'); + $modules = $this->coreModuleListDataProvider(); + $modules_enabled = $module_handler->getModuleList(); + $modules_to_enable = array_keys(array_diff_key($modules, $modules_enabled)); + $this->enableModules($modules_to_enable); + + /** @var \Drupal\migrate\Plugin\MigrationPluginManager $manager */ + $pluginManager = $this->container->get('plugin.manager.migration'); + // Get all the migrations + $migrations = $pluginManager->createInstances(array_keys($pluginManager->getDefinitions())); + // Ensure the test module was enabled. + $this->assertTrue(array_key_exists('migration_provider_test', $migrations)); + $this->assertTrue(array_key_exists('migration_provider_no_annotation', $migrations)); + /** @var \Drupal\migrate\Plugin\Migration $migration */ + foreach ($migrations as $migration) { + $source_module = $migration->getSourcePlugin()->getSourceModule(); + $destination_module = $migration->getDestinationPlugin()->getDestinationModule(); + $migration_id = $migration->getPluginId(); + if ($migration_id == 'migration_provider_test') { + $this->assertFalse($source_module, new FormattableMarkup('Source module not found for @migration_id.', ['@migration_id' => $migration_id])); + $this->assertFalse($destination_module, new FormattableMarkup('Destination module not found for @migration_id.', ['@migration_id' => $migration_id])); + } + elseif ($migration_id == 'migration_provider_no_annotation') { + $this->assertFalse($source_module, new FormattableMarkup('Source module not found for @migration_id.', ['@migration_id' => $migration_id])); + $this->assertTrue($destination_module, new FormattableMarkup('Destination module found for @migration_id.', ['@migration_id' => $migration_id])); + } + else { + $this->assertTrue($source_module, new FormattableMarkup('Source module found for @migration_id.', ['@migration_id' => $migration_id])); + $this->assertTrue($destination_module, new FormattableMarkup('Destination module found for @migration_id.', ['@migration_id' => $migration_id])); + } + // Destination module can't be migrate or migrate_drupal or migrate_drupal_ui + $invalid_destinations = ['migrate', 'migrate_drupal', 'migrate_drupal_ui']; + $this->assertNotContains($destination_module, $invalid_destinations, new FormattableMarkup('Invalid destination for @migration_id.', ['@migration_id' => $migration_id])); + } + } + +} diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php index ffff626..445441b 100644 --- a/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php @@ -94,14 +94,14 @@ public static function create(ContainerInterface $container, array $configuratio */ public function checkRequirements() { if ($this->pluginDefinition['requirements_met'] === TRUE) { - if (isset($this->pluginDefinition['source_provider'])) { - if ($this->moduleExists($this->pluginDefinition['source_provider'])) { - if (isset($this->pluginDefinition['minimum_schema_version']) && !$this->getModuleSchemaVersion($this->pluginDefinition['source_provider']) < $this->pluginDefinition['minimum_schema_version']) { + if (isset($this->pluginDefinition['source_module'])) { + if ($this->moduleExists($this->pluginDefinition['source_module'])) { + if (isset($this->pluginDefinition['minimum_schema_version']) && !$this->getModuleSchemaVersion($this->pluginDefinition['source_module']) < $this->pluginDefinition['minimum_schema_version']) { throw new RequirementsException('Required minimum schema version ' . $this->pluginDefinition['minimum_schema_version'], ['minimum_schema_version' => $this->pluginDefinition['minimum_schema_version']]); } } else { - throw new RequirementsException('The module ' . $this->pluginDefinition['source_provider'] . ' is not enabled in the source site.', ['source_provider' => $this->pluginDefinition['source_provider']]); + throw new RequirementsException('The module ' . $this->pluginDefinition['source_module'] . ' is not enabled in the source site.', ['source_module' => $this->pluginDefinition['source_module']]); } } } diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php index 6dd5925..ebd9334 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php @@ -43,7 +43,7 @@ class DrupalSqlBaseTest extends MigrateTestCase { */ public function testSourceProviderNotActive() { $plugin_definition['requirements_met'] = TRUE; - $plugin_definition['source_provider'] = 'module1'; + $plugin_definition['source_module'] = 'module1'; /** @var \Drupal\Core\State\StateInterface $state */ $state = $this->getMock('Drupal\Core\State\StateInterface'); /** @var \Drupal\Core\Entity\EntityManagerInterface $entity_manager */ @@ -57,7 +57,7 @@ public function testSourceProviderNotActive() { } catch (RequirementsException $e) { // Ensure requirements are set on the exception. - $this->assertEquals(['source_provider' => 'module1'], $e->getRequirements()); + $this->assertEquals(['source_module' => 'module1'], $e->getRequirements()); // Re-throw so PHPUnit can assert the exception. throw $e; } diff --git a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php index c87247e..ffe4313 100644 --- a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php +++ b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php @@ -21,670 +21,6 @@ class MigrateUpgradeForm extends ConfirmFormBase { use MigrationConfigurationTrait; /** - * Mapping of known migrations and their source and destination modules. - * - * @todo https://www.drupal.org/node/2569805 Hardcoding this information is - * not robust - the migrations themselves should hold the necessary - * information. - * - * @var array[] - */ - protected $moduleUpgradePaths = [ - 'action_settings' => [ - 'source_module' => 'system', - 'destination_module' => 'action', - ], - 'd6_aggregator_feed' => [ - 'source_module' => 'aggregator', - 'destination_module' => 'aggregator', - ], - 'd6_aggregator_item' => [ - 'source_module' => 'aggregator', - 'destination_module' => 'aggregator', - ], - 'd6_aggregator_settings' => [ - 'source_module' => 'aggregator', - 'destination_module' => 'aggregator', - ], - 'd7_aggregator_feed' => [ - 'source_module' => 'aggregator', - 'destination_module' => 'aggregator', - ], - 'd7_aggregator_item' => [ - 'source_module' => 'aggregator', - 'destination_module' => 'aggregator', - ], - 'd7_aggregator_settings' => [ - 'source_module' => 'aggregator', - 'destination_module' => 'aggregator', - ], - 'd7_blocked_ips' => [ - 'source_module' => 'system', - 'destination_module' => 'ban', - ], - 'd6_block' => [ - 'source_module' => 'block', - 'destination_module' => 'block', - ], - 'd7_block' => [ - 'source_module' => 'block', - 'destination_module' => 'block', - ], - 'block_content_entity_form_display' => [ - 'source_module' => 'block', - 'destination_module' => 'block_content', - ], - 'block_content_entity_display' => [ - 'source_module' => 'block', - 'destination_module' => 'block_content', - ], - 'block_content_body_field' => [ - 'source_module' => 'block', - 'destination_module' => 'block_content', - ], - 'block_content_type' => [ - 'source_module' => 'block', - 'destination_module' => 'block_content', - ], - 'd6_custom_block' => [ - 'source_module' => 'block', - 'destination_module' => 'block_content', - ], - 'd7_custom_block' => [ - 'source_module' => 'block', - 'destination_module' => 'block_content', - ], - 'd6_book' => [ - 'source_module' => 'book', - 'destination_module' => 'book', - ], - 'd6_book_settings' => [ - 'source_module' => 'book', - 'destination_module' => 'book', - ], - 'd6_comment' => [ - 'source_module' => 'comment', - 'destination_module' => 'comment', - ], - 'd6_comment_entity_display' => [ - 'source_module' => 'comment', - 'destination_module' => 'comment', - ], - 'd6_comment_entity_form_display' => [ - 'source_module' => 'comment', - 'destination_module' => 'comment', - ], - 'd6_comment_entity_form_display_subject' => [ - 'source_module' => 'comment', - 'destination_module' => 'comment', - ], - 'd6_comment_field' => [ - 'source_module' => 'comment', - 'destination_module' => 'comment', - ], - 'd6_comment_field_instance' => [ - 'source_module' => 'comment', - 'destination_module' => 'comment', - ], - 'd6_comment_type' => [ - 'source_module' => 'comment', - 'destination_module' => 'comment', - ], - 'd7_comment' => [ - 'source_module' => 'comment', - 'destination_module' => 'comment', - ], - 'd7_comment_entity_display' => [ - 'source_module' => 'comment', - 'destination_module' => 'comment', - ], - 'd7_comment_entity_form_display' => [ - 'source_module' => 'comment', - 'destination_module' => 'comment', - ], - 'd7_comment_entity_form_display_subject' => [ - 'source_module' => 'comment', - 'destination_module' => 'comment', - ], - 'd7_comment_field' => [ - 'source_module' => 'comment', - 'destination_module' => 'comment', - ], - 'd7_comment_field_instance' => [ - 'source_module' => 'comment', - 'destination_module' => 'comment', - ], - 'd7_comment_type' => [ - 'source_module' => 'comment', - 'destination_module' => 'comment', - ], - 'contact_category' => [ - 'source_module' => 'contact', - 'destination_module' => 'contact', - ], - 'd6_contact_settings' => [ - 'source_module' => 'contact', - 'destination_module' => 'contact', - ], - 'd7_contact_settings' => [ - 'source_module' => 'contact', - 'destination_module' => 'contact', - ], - 'd6_dblog_settings' => [ - 'source_module' => 'dblog', - 'destination_module' => 'dblog', - ], - 'd7_dblog_settings' => [ - 'source_module' => 'dblog', - 'destination_module' => 'dblog', - ], - 'default_language' => [ - 'source_module' => 'locale', - 'destination_module' => 'language', - ], - 'd6_field' => [ - 'source_module' => 'content', - 'destination_module' => 'field', - ], - 'd6_field_formatter_settings' => [ - 'source_module' => 'content', - 'destination_module' => 'field', - ], - 'd6_field_instance' => [ - 'source_module' => 'content', - 'destination_module' => 'field', - ], - 'd6_field_instance_widget_settings' => [ - 'source_module' => 'content', - 'destination_module' => 'field', - ], - 'd7_field' => [ - 'source_module' => 'field', - 'destination_module' => 'field', - ], - 'd7_field_formatter_settings' => [ - 'source_module' => 'field', - 'destination_module' => 'field', - ], - 'd7_field_instance' => [ - 'source_module' => 'field', - 'destination_module' => 'field', - ], - 'd7_field_instance_widget_settings' => [ - 'source_module' => 'field', - 'destination_module' => 'field', - ], - 'd7_view_modes' => [ - 'source_module' => 'field', - 'destination_module' => 'field', - ], - 'd6_file' => [ - 'source_module' => 'system', - 'destination_module' => 'file', - ], - 'file_settings' => [ - 'source_module' => 'system', - 'destination_module' => 'file', - ], - 'd6_upload' => [ - 'source_module' => 'upload', - 'destination_module' => 'file', - ], - 'd6_upload_entity_display' => [ - 'source_module' => 'upload', - 'destination_module' => 'file', - ], - 'd6_upload_entity_form_display' => [ - 'source_module' => 'upload', - 'destination_module' => 'file', - ], - 'd6_upload_field' => [ - 'source_module' => 'upload', - 'destination_module' => 'file', - ], - 'd6_upload_field_instance' => [ - 'source_module' => 'upload', - 'destination_module' => 'file', - ], - 'd7_file' => [ - 'source_module' => 'file', - 'destination_module' => 'file', - ], - 'd7_file_private' => [ - 'source_module' => 'file', - 'destination_module' => 'file', - ], - 'd6_filter_format' => [ - 'source_module' => 'filter', - 'destination_module' => 'filter', - ], - 'd7_filter_format' => [ - 'source_module' => 'filter', - 'destination_module' => 'filter', - ], - 'd7_filter_settings' => [ - 'source_module' => 'filter', - 'destination_module' => 'filter', - ], - 'd6_forum_settings' => [ - 'source_module' => 'forum', - 'destination_module' => 'forum', - ], - 'd7_forum_settings' => [ - 'source_module' => 'forum', - 'destination_module' => 'forum', - ], - 'd7_global_theme_settings' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'd6_imagecache_presets' => [ - 'source_module' => 'imagecache', - 'destination_module' => 'image', - ], - 'd7_image_settings' => [ - 'source_module' => 'image', - 'destination_module' => 'image', - ], - 'd7_image_styles' => [ - 'source_module' => 'image', - 'destination_module' => 'image', - ], - 'd6_language_content_settings' => [ - 'source_module' => 'locale', - 'destination_module' => 'language', - ], - 'd7_language_content_settings' => [ - 'source_module' => 'locale', - 'destination_module' => 'language', - ], - 'd6_language_negotiation_settings' => [ - 'source_module' => 'locale', - 'destination_module' => 'language', - ], - 'd7_language_negotiation_settings' => [ - 'source_module' => 'locale', - 'destination_module' => 'language', - ], - 'language_prefixes_and_domains' => [ - 'source_module' => 'locale', - 'destination_module' => 'language', - ], - 'd6_language_types' => [ - 'source_module' => 'locale', - 'destination_module' => 'language', - ], - 'language' => [ - 'source_module' => 'locale', - 'destination_module' => 'language', - ], - 'd7_language_types' => [ - 'source_module' => 'locale', - 'destination_module' => 'language', - ], - 'locale_settings' => [ - 'source_module' => 'locale', - 'destination_module' => 'locale', - ], - 'd6_menu_links' => [ - 'source_module' => 'menu', - 'destination_module' => 'menu_link_content', - ], - 'menu_settings' => [ - 'source_module' => 'menu', - 'destination_module' => 'menu_ui', - ], - 'd7_menu_links' => [ - 'source_module' => 'menu', - 'destination_module' => 'menu_link_content', - ], - 'd6_node' => [ - 'source_module' => 'node', - 'destination_module' => 'node', - ], - 'd6_node_translation' => [ - 'source_module' => 'translation', - 'destination_module' => 'content_translation', - ], - 'd6_node_revision' => [ - 'source_module' => 'node', - 'destination_module' => 'node', - ], - 'd6_node_setting_promote' => [ - 'source_module' => 'node', - 'destination_module' => 'node', - ], - 'd6_node_setting_status' => [ - 'source_module' => 'node', - 'destination_module' => 'node', - ], - 'd6_node_setting_sticky' => [ - 'source_module' => 'node', - 'destination_module' => 'node', - ], - 'd6_node_settings' => [ - 'source_module' => 'node', - 'destination_module' => 'node', - ], - 'd6_node_type' => [ - 'source_module' => 'node', - 'destination_module' => 'node', - ], - 'd6_view_modes' => [ - 'source_module' => 'node', - 'destination_module' => 'node', - ], - 'd7_node' => [ - 'source_module' => 'node', - 'destination_module' => 'node', - ], - 'd7_node_revision' => [ - 'source_module' => 'node', - 'destination_module' => 'node', - ], - 'd7_node_settings' => [ - 'source_module' => 'node', - 'destination_module' => 'node', - ], - 'd7_node_translation' => [ - 'source_module' => 'node', - 'destination_module' => 'node', - ], - 'd7_node_title_label' => [ - 'source_module' => 'node', - 'destination_module' => 'node', - ], - 'd7_node_type' => [ - 'source_module' => 'node', - 'destination_module' => 'node', - ], - 'd6_url_alias' => [ - 'source_module' => 'path', - 'destination_module' => 'path', - ], - 'd7_url_alias' => [ - 'source_module' => 'path', - 'destination_module' => 'path', - ], - 'search_page' => [ - 'source_module' => 'search', - 'destination_module' => 'search', - ], - 'd6_search_settings' => [ - 'source_module' => 'search', - 'destination_module' => 'search', - ], - 'd7_search_settings' => [ - 'source_module' => 'search', - 'destination_module' => 'search', - ], - 'd7_shortcut' => [ - 'source_module' => 'shortcut', - 'destination_module' => 'shortcut', - ], - 'd7_shortcut_set' => [ - 'source_module' => 'shortcut', - 'destination_module' => 'shortcut', - ], - 'd7_shortcut_set_users' => [ - 'source_module' => 'shortcut', - 'destination_module' => 'shortcut', - ], - 'd6_simpletest_settings' => [ - 'source_module' => 'simpletest', - 'destination_module' => 'simpletest', - ], - 'd7_simpletest_settings' => [ - 'source_module' => 'simpletest', - 'destination_module' => 'simpletest', - ], - 'statistics_settings' => [ - 'source_module' => 'statistics', - 'destination_module' => 'statistics', - ], - 'd6_syslog_settings' => [ - 'source_module' => 'syslog', - 'destination_module' => 'syslog', - ], - 'd7_syslog_settings' => [ - 'source_module' => 'syslog', - 'destination_module' => 'syslog', - ], - 'd6_date_formats' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'd6_system_cron' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'd6_system_date' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'd6_system_file' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'system_image' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'system_image_gd' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'system_logging' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'system_maintenance' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'd6_system_performance' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'system_rss' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'system_site' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'd7_system_authorize' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'd7_system_cron' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'd7_system_date' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'd7_system_file' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'd7_system_mail' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'd7_system_performance' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'd6_menu' => [ - 'source_module' => 'menu', - 'destination_module' => 'system', - ], - 'd7_menu' => [ - 'source_module' => 'menu', - 'destination_module' => 'system', - ], - 'taxonomy_settings' => [ - 'source_module' => 'taxonomy', - 'destination_module' => 'taxonomy', - ], - 'd6_taxonomy_term' => [ - 'source_module' => 'taxonomy', - 'destination_module' => 'taxonomy', - ], - 'd6_taxonomy_term_translation' => [ - 'source_module' => 'i18n', - 'destination_module' => 'taxonomy', - ], - 'd6_taxonomy_vocabulary' => [ - 'source_module' => 'taxonomy', - 'destination_module' => 'taxonomy', - ], - 'd6_taxonomy_vocabulary_translation' => [ - 'source_module' => 'i18n', - 'destination_module' => 'taxonomy', - ], - 'd6_term_node' => [ - 'source_module' => 'taxonomy', - 'destination_module' => 'taxonomy', - ], - 'd6_term_node_revision' => [ - 'source_module' => 'taxonomy', - 'destination_module' => 'taxonomy', - ], - 'd6_vocabulary_entity_display' => [ - 'source_module' => 'taxonomy', - 'destination_module' => 'taxonomy', - ], - 'd6_vocabulary_entity_form_display' => [ - 'source_module' => 'taxonomy', - 'destination_module' => 'taxonomy', - ], - 'd6_vocabulary_field' => [ - 'source_module' => 'taxonomy', - 'destination_module' => 'taxonomy', - ], - 'd6_vocabulary_field_instance' => [ - 'source_module' => 'taxonomy', - 'destination_module' => 'taxonomy', - ], - 'd7_taxonomy_term' => [ - 'source_module' => 'taxonomy', - 'destination_module' => 'taxonomy', - ], - 'd7_taxonomy_vocabulary' => [ - 'source_module' => 'taxonomy', - 'destination_module' => 'taxonomy', - ], - 'text_settings' => [ - 'source_module' => 'text', - 'destination_module' => 'text', - ], - 'd7_tracker_node' => [ - 'source_module' => 'tracker', - 'destination_module' => 'tracker', - ], - 'd7_tracker_settings' => [ - 'source_module' => 'tracker', - 'destination_module' => 'tracker', - ], - 'd7_tracker_user' => [ - 'source_module' => 'tracker', - 'destination_module' => 'tracker', - ], - 'update_settings' => [ - 'source_module' => 'update', - 'destination_module' => 'update', - ], - 'd6_profile_values' => [ - 'source_module' => 'profile', - 'destination_module' => 'user', - ], - 'd7_theme_settings' => [ - 'source_module' => 'system', - 'destination_module' => 'system', - ], - 'd6_user' => [ - 'source_module' => 'user', - 'destination_module' => 'user', - ], - 'd6_user_contact_settings' => [ - 'source_module' => 'user', - 'destination_module' => 'user', - ], - 'd6_user_mail' => [ - 'source_module' => 'user', - 'destination_module' => 'user', - ], - 'd6_user_picture_file' => [ - 'source_module' => 'user', - 'destination_module' => 'user', - ], - 'd6_user_role' => [ - 'source_module' => 'user', - 'destination_module' => 'user', - ], - 'd6_user_settings' => [ - 'source_module' => 'user', - 'destination_module' => 'user', - ], - 'd7_user' => [ - 'source_module' => 'user', - 'destination_module' => 'user', - ], - 'd7_user_flood' => [ - 'source_module' => 'user', - 'destination_module' => 'user', - ], - 'd7_user_mail' => [ - 'source_module' => 'user', - 'destination_module' => 'user', - ], - 'd7_user_role' => [ - 'source_module' => 'user', - 'destination_module' => 'user', - ], - 'user_picture_entity_display' => [ - 'source_module' => 'user', - 'destination_module' => 'user', - ], - 'user_picture_entity_form_display' => [ - 'source_module' => 'user', - 'destination_module' => 'user', - ], - 'user_picture_field' => [ - 'source_module' => 'user', - 'destination_module' => 'user', - ], - 'user_picture_field_instance' => [ - 'source_module' => 'user', - 'destination_module' => 'user', - ], - 'user_profile_entity_display' => [ - 'source_module' => 'profile', - 'destination_module' => 'user', - ], - 'user_profile_entity_form_display' => [ - 'source_module' => 'profile', - 'destination_module' => 'user', - ], - 'user_profile_field' => [ - 'source_module' => 'profile', - 'destination_module' => 'user', - ], - 'user_profile_field_instance' => [ - 'source_module' => 'profile', - 'destination_module' => 'user', - ], - 'd6_i18n_user_profile_field_instance' => [ - 'source_module' => 'i18n', - 'destination_module' => 'user', - ], - ]; - - /** * The state service. * * @var \Drupal\Core\State\StateInterface @@ -1054,6 +390,7 @@ public function validateCredentialForm(array &$form, FormStateInterface $form_st } // Store the retrieved migration IDs in form storage. + $form_state->set('version', $version); $form_state->set('migrations', $migration_array); $form_state->set('source_base_path', $form_state->getValue('source_base_path')); $form_state->set('source_private_file_path', $form_state->getValue('source_private_file_path')); @@ -1103,19 +440,24 @@ public function buildConfirmForm(array $form, FormStateInterface $form_state) { $form['actions']['submit']['#value'] = $this->t('Perform upgrade'); + $version = $form_state->get('version'); + $migrations = $this->getMigrations('migrate_drupal_' . $version, $version); + $table_data = []; - $system_data = []; - foreach ($form_state->get('migrations') as $migration_id => $migration_label) { - // Fetch the system data at the first opportunity. - if (empty($system_data)) { - $system_data = $form_state->get('system_data'); + foreach ($migrations as $migration) { + $migration_id = $migration->getPluginId(); + $source_module = $migration->getSourcePlugin()->getSourceModule(); + if (!$source_module) { + drupal_set_message($this->t('Source module not found for @migration_id.', ['@migration_id' => $migration_id]), 'error'); + } + $destination_module = $migration->getDestinationPlugin()->getDestinationModule(); + if (!$destination_module) { + drupal_set_message($this->t('Destination module not found for @migration_id.', ['@migration_id' => $migration_id]), 'error'); } - // Handle derivatives. - list($migration_id,) = explode(':', $migration_id, 2); - $source_module = $this->moduleUpgradePaths[$migration_id]['source_module']; - $destination_module = $this->moduleUpgradePaths[$migration_id]['destination_module']; - $table_data[$source_module][$destination_module][$migration_id] = $migration_label; + if ($source_module && $destination_module) { + $table_data[$source_module][$destination_module][$migration_id] = $migration->label(); + } } // Sort the table by source module names and within that destination // module names. @@ -1123,6 +465,9 @@ public function buildConfirmForm(array $form, FormStateInterface $form_state) { foreach ($table_data as $source_module => $destination_module_info) { ksort($table_data[$source_module]); } + + // Fetch the system data at the first opportunity. + $system_data = $form_state->get('system_data'); $unmigrated_source_modules = array_diff_key($system_data['module'], $table_data); // Missing migrations. diff --git a/core/modules/migrate_drupal_ui/src/Tests/MigrateUpgradeTestBase.php b/core/modules/migrate_drupal_ui/src/Tests/MigrateUpgradeTestBase.php index 4aea3f1..3846bd8 100644 --- a/core/modules/migrate_drupal_ui/src/Tests/MigrateUpgradeTestBase.php +++ b/core/modules/migrate_drupal_ui/src/Tests/MigrateUpgradeTestBase.php @@ -44,6 +44,7 @@ 'book', 'forum', 'statistics', + 'modules_available_test', ]; /** @@ -149,6 +150,30 @@ public function testMigrateUpgrade() { $this->drupalPostForm(NULL, $edits, t('Review upgrade')); $this->assertResponse(200); $this->assertText('Are you sure?'); + // Ensure we get errors about missing modules. + $this->assertText(t('Source module not found for module_no_annotation.')); + $this->assertText(t('Source module not found for modules_available_test.')); + $this->assertText(t('Destination module not found for modules_available_test')); + + // Uninstall the module causing the missing module error messages. + $this->container->get('module_installer')->uninstall(['modules_available_test'], TRUE); + + // Restart the upgrade process. + $this->drupalGet('/upgrade'); + $this->assertText('Upgrade a site by importing it into a clean and empty new install of Drupal 8. You will lose any existing configuration once you import your site into it. See the online documentation for Drupal site upgrades for more detailed information.'); + + $this->drupalPostForm(NULL, [], t('Continue')); + $this->assertText('Provide credentials for the database of the Drupal site you want to upgrade.'); + $this->assertFieldByName('mysql[host]'); + + $this->drupalPostForm(NULL, $edits, t('Review upgrade')); + $this->assertResponse(200); + $this->assertText('Are you sure?'); + // Ensure there are no errors about the missing modules. + $this->assertNoText(t('Source module not found for module_no_annotation.')); + $this->assertNoText(t('Source module not found for modules_available_test.')); + $this->assertNoText(t('Destination module not found for modules_available_test')); + // Check for any missing module errors. $this->drupalPostForm(NULL, [], t('Perform upgrade')); $this->assertText(t('Congratulations, you upgraded Drupal!')); diff --git a/core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/migration_provider_test.info.yml b/core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/migration_provider_test.info.yml new file mode 100644 index 0000000..49b7dce --- /dev/null +++ b/core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/migration_provider_test.info.yml @@ -0,0 +1,6 @@ +name: 'Migration provider missing' +type: module +description: 'Add a migration missing a source and destination migration provider and a source plugin missing a migration provider.' +package: Testing +version: VERSION +core: 8.x diff --git a/core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/migration_templates/migration_provider_no_annotation.yml b/core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/migration_templates/migration_provider_no_annotation.yml new file mode 100644 index 0000000..bdc9066 --- /dev/null +++ b/core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/migration_templates/migration_provider_no_annotation.yml @@ -0,0 +1,13 @@ +id: migration_provider_no_annotation +label: Missing source annotation +migration_tags: + - Drupal 6 + - Drupal 7 +source: +# Test plugin without a source_module annotation + plugin: no_source_module +process: + message: site_offline_message +destination: + plugin: config + config_name: test.settings diff --git a/core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/migration_templates/migration_provider_test.yml b/core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/migration_templates/migration_provider_test.yml new file mode 100644 index 0000000..d3afc66 --- /dev/null +++ b/core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/migration_templates/migration_provider_test.yml @@ -0,0 +1,16 @@ +id: migration_provider_test +label: Missing source and destination provider +migration_tags: + - Drupal 6 + - Drupal 7 +source: + plugin: variable + variables: + - site_offline_message +# Do not add a provider for the test. +process: + message: site_offline_message +destination: + plugin: config +# An empty config_name will not have a destination provider. + config_name: \ No newline at end of file diff --git a/core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/src/Plugin/migrate/source/NoSourceModule.php b/core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/src/Plugin/migrate/source/NoSourceModule.php new file mode 100644 index 0000000..0fc3063 --- /dev/null +++ b/core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/src/Plugin/migrate/source/NoSourceModule.php @@ -0,0 +1,31 @@ +drupalPostForm(NULL, $edits, t('Review upgrade')); $this->assertResponse(200); $this->assertText('Are you sure?'); + // Ensure we get errors about missing modules. + $this->assertSession()->pageTextContains(t('Source module not found for migration_provider_no_annotation.')); + $this->assertSession()->pageTextContains(t('Source module not found for migration_provider_test.')); + $this->assertSession()->pageTextContains(t('Destination module not found for migration_provider_test')); + + // Uninstall the module causing the missing module error messages. + $this->container->get('module_installer')->uninstall(['migration_provider_test'], TRUE); + + // Restart the upgrade process. + $this->drupalGet('/upgrade'); + $this->assertSession()->pageTextContains('Upgrade a site by importing it into a clean and empty new install of Drupal 8. You will lose any existing configuration once you import your site into it. See the online documentation for Drupal site upgrades for more detailed information.'); + + $this->drupalPostForm(NULL, [], t('Continue')); + $this->assertSession()->pageTextContains('Provide credentials for the database of the Drupal site you want to upgrade.'); + $this->assertSession()->fieldExists('mysql[host]'); + + $this->drupalPostForm(NULL, $edits, t('Review upgrade')); + $this->assertSession()->statusCodeEquals(200); + $this->assertSession()->pageTextContains('Are you sure?'); + // Ensure there are no errors about the missing modules from the test module. + $this->assertSession()->pageTextNotContains(t('Source module not found for migration_provider_no_annotation.')); + $this->assertSession()->pageTextNotContains(t('Source module not found for migration_provider_test.')); + $this->assertSession()->pageTextNotContains(t('Destination module not found for migration_provider_test')); + // Ensure there are no errors about any other missing migration providers. + $this->assertSession()->pageTextNotContains(t('module not found')); $this->drupalPostForm(NULL, [], t('Perform upgrade')); $this->assertText(t('Congratulations, you upgraded Drupal!')); diff --git a/core/modules/node/migration_templates/d6_node_settings.yml b/core/modules/node/migration_templates/d6_node_settings.yml index 17b0857..98b09fb 100644 --- a/core/modules/node/migration_templates/d6_node_settings.yml +++ b/core/modules/node/migration_templates/d6_node_settings.yml @@ -6,6 +6,7 @@ source: plugin: variable variables: - node_admin_theme + source_module: node process: use_admin_theme: node_admin_theme destination: diff --git a/core/modules/node/migration_templates/d6_node_translation.yml b/core/modules/node/migration_templates/d6_node_translation.yml index 3eb06e8..4bf36da 100644 --- a/core/modules/node/migration_templates/d6_node_translation.yml +++ b/core/modules/node/migration_templates/d6_node_translation.yml @@ -6,6 +6,7 @@ deriver: Drupal\node\Plugin\migrate\D6NodeDeriver source: plugin: d6_node translations: true + source_module: translation process: # If you are using this file to build a custom migration consider removing # the nid field to allow incremental migrations. @@ -41,6 +42,7 @@ process: destination: plugin: entity:node translations: true + destination_module: content_translation migration_dependencies: required: - d6_user @@ -52,4 +54,3 @@ migration_dependencies: - d6_field_instance_widget_settings - d6_field_formatter_settings - d6_upload_field_instance -provider: migrate_drupal diff --git a/core/modules/node/migration_templates/d7_node_settings.yml b/core/modules/node/migration_templates/d7_node_settings.yml index 0461754..46eec7c 100644 --- a/core/modules/node/migration_templates/d7_node_settings.yml +++ b/core/modules/node/migration_templates/d7_node_settings.yml @@ -6,6 +6,7 @@ source: plugin: variable variables: - node_admin_theme + source_module: node process: use_admin_theme: node_admin_theme destination: diff --git a/core/modules/node/migration_templates/d7_node_translation.yml b/core/modules/node/migration_templates/d7_node_translation.yml index 11dfbb7..856f345 100644 --- a/core/modules/node/migration_templates/d7_node_translation.yml +++ b/core/modules/node/migration_templates/d7_node_translation.yml @@ -7,6 +7,7 @@ deriver: Drupal\node\Plugin\migrate\D7NodeDeriver source: plugin: d7_node translations: true + source_module: translation process: # If you are using this file to build a custom migration consider removing # the nid field to allow incremental migrations. @@ -32,6 +33,7 @@ destination: translations: true content_translation_update_definitions: - node + destination_module: content_translation migration_dependencies: required: - d7_user @@ -39,4 +41,3 @@ migration_dependencies: - language optional: - d7_field_instance -provider: migrate_drupal diff --git a/core/modules/node/src/Plugin/migrate/source/d6/Node.php b/core/modules/node/src/Plugin/migrate/source/d6/Node.php index ffa2659..1dc81f9 100644 --- a/core/modules/node/src/Plugin/migrate/source/d6/Node.php +++ b/core/modules/node/src/Plugin/migrate/source/d6/Node.php @@ -15,7 +15,9 @@ * Drupal 6 node source from database. * * @MigrateSource( - * id = "d6_node" + * id = "d6_node", + * source_module = "node" + * * ) */ class Node extends DrupalSqlBase { diff --git a/core/modules/node/src/Plugin/migrate/source/d6/NodeRevision.php b/core/modules/node/src/Plugin/migrate/source/d6/NodeRevision.php index f3296c2..a0103fc 100644 --- a/core/modules/node/src/Plugin/migrate/source/d6/NodeRevision.php +++ b/core/modules/node/src/Plugin/migrate/source/d6/NodeRevision.php @@ -7,7 +7,8 @@ * Drupal 6 node revision source from database. * * @MigrateSource( - * id = "d6_node_revision" + * id = "d6_node_revision", + * source_module = "node" * ) */ class NodeRevision extends Node { diff --git a/core/modules/node/src/Plugin/migrate/source/d6/NodeType.php b/core/modules/node/src/Plugin/migrate/source/d6/NodeType.php index b5a66ce..5ec0aae 100644 --- a/core/modules/node/src/Plugin/migrate/source/d6/NodeType.php +++ b/core/modules/node/src/Plugin/migrate/source/d6/NodeType.php @@ -9,7 +9,8 @@ * Drupal 6 Node types source from database. * * @MigrateSource( - * id = "d6_node_type" + * id = "d6_node_type", + * source_module = "node" * ) */ class NodeType extends DrupalSqlBase { diff --git a/core/modules/node/src/Plugin/migrate/source/d6/ViewMode.php b/core/modules/node/src/Plugin/migrate/source/d6/ViewMode.php index b5a6d4d..434007a 100644 --- a/core/modules/node/src/Plugin/migrate/source/d6/ViewMode.php +++ b/core/modules/node/src/Plugin/migrate/source/d6/ViewMode.php @@ -7,7 +7,7 @@ * * @MigrateSource( * id = "d6_view_mode", - * source_provider = "content" + * source_module = "content" * ) */ class ViewMode extends ViewModeBase { diff --git a/core/modules/node/src/Plugin/migrate/source/d7/Node.php b/core/modules/node/src/Plugin/migrate/source/d7/Node.php index 451905c..1a9037e 100644 --- a/core/modules/node/src/Plugin/migrate/source/d7/Node.php +++ b/core/modules/node/src/Plugin/migrate/source/d7/Node.php @@ -17,7 +17,7 @@ * * @MigrateSource( * id = "d7_node", - * source_provider = "node" + * source_module = "node" * ) */ class Node extends FieldableEntity { diff --git a/core/modules/node/src/Plugin/migrate/source/d7/NodeRevision.php b/core/modules/node/src/Plugin/migrate/source/d7/NodeRevision.php index 89c1bcc..67071a7 100644 --- a/core/modules/node/src/Plugin/migrate/source/d7/NodeRevision.php +++ b/core/modules/node/src/Plugin/migrate/source/d7/NodeRevision.php @@ -7,7 +7,7 @@ * * @MigrateSource( * id = "d7_node_revision", - * source_provider = "node" + * source_module = "node" * ) */ class NodeRevision extends Node { diff --git a/core/modules/node/src/Plugin/migrate/source/d7/NodeType.php b/core/modules/node/src/Plugin/migrate/source/d7/NodeType.php index a0b2273..7f8290f 100644 --- a/core/modules/node/src/Plugin/migrate/source/d7/NodeType.php +++ b/core/modules/node/src/Plugin/migrate/source/d7/NodeType.php @@ -10,7 +10,7 @@ * * @MigrateSource( * id = "d7_node_type", - * source_provider = "node" + * source_module = "node" * ) */ class NodeType extends DrupalSqlBase { diff --git a/core/modules/path/src/Plugin/migrate/source/d6/UrlAlias.php b/core/modules/path/src/Plugin/migrate/source/d6/UrlAlias.php index 3e1f624..c01d364 100644 --- a/core/modules/path/src/Plugin/migrate/source/d6/UrlAlias.php +++ b/core/modules/path/src/Plugin/migrate/source/d6/UrlAlias.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "d6_url_alias", - * source_provider = "path" + * source_module = "path" * ) */ class UrlAlias extends UrlAliasBase { diff --git a/core/modules/path/src/Plugin/migrate/source/d7/UrlAlias.php b/core/modules/path/src/Plugin/migrate/source/d7/UrlAlias.php index eaaea16..58405fd 100644 --- a/core/modules/path/src/Plugin/migrate/source/d7/UrlAlias.php +++ b/core/modules/path/src/Plugin/migrate/source/d7/UrlAlias.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "d7_url_alias", - * source_provider = "path" + * source_module = "path" * ) */ class UrlAlias extends UrlAliasBase { diff --git a/core/modules/search/migration_templates/d6_search_settings.yml b/core/modules/search/migration_templates/d6_search_settings.yml index 28f8600..1500a3f 100644 --- a/core/modules/search/migration_templates/d6_search_settings.yml +++ b/core/modules/search/migration_templates/d6_search_settings.yml @@ -10,6 +10,7 @@ source: - minimum_word_size - overlap_cjk - search_cron_limit + source_module: search process: 'index/minimum_word_size': minimum_word_size 'index/overlap_cjk': overlap_cjk diff --git a/core/modules/search/migration_templates/d7_search_settings.yml b/core/modules/search/migration_templates/d7_search_settings.yml index 57db8b9..74f0ef7 100644 --- a/core/modules/search/migration_templates/d7_search_settings.yml +++ b/core/modules/search/migration_templates/d7_search_settings.yml @@ -13,6 +13,7 @@ source: - search_tag_weights - search_and_or_limit - search_default_module + source_module: search process: 'index/minimum_word_size': minimum_word_size 'index/overlap_cjk': overlap_cjk diff --git a/core/modules/search/migration_templates/search_page.yml b/core/modules/search/migration_templates/search_page.yml index 8ddc02a..fc9b410 100644 --- a/core/modules/search/migration_templates/search_page.yml +++ b/core/modules/search/migration_templates/search_page.yml @@ -16,6 +16,7 @@ source: id: node_search path: node plugin: node_search + source_module: search process: id: 'constants/id' path: 'constants/path' diff --git a/core/modules/shortcut/src/Plugin/migrate/source/d7/Shortcut.php b/core/modules/shortcut/src/Plugin/migrate/source/d7/Shortcut.php index 444c38f..ac2c63f 100644 --- a/core/modules/shortcut/src/Plugin/migrate/source/d7/Shortcut.php +++ b/core/modules/shortcut/src/Plugin/migrate/source/d7/Shortcut.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "d7_shortcut", - * source_provider = "shortcut" + * source_module = "shortcut" * ) */ class Shortcut extends DrupalSqlBase { diff --git a/core/modules/shortcut/src/Plugin/migrate/source/d7/ShortcutSet.php b/core/modules/shortcut/src/Plugin/migrate/source/d7/ShortcutSet.php index a088ca8..7a3ed8a 100644 --- a/core/modules/shortcut/src/Plugin/migrate/source/d7/ShortcutSet.php +++ b/core/modules/shortcut/src/Plugin/migrate/source/d7/ShortcutSet.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "d7_shortcut_set", - * source_provider = "shortcut" + * source_module = "shortcut" * ) */ class ShortcutSet extends DrupalSqlBase { diff --git a/core/modules/shortcut/src/Plugin/migrate/source/d7/ShortcutSetUsers.php b/core/modules/shortcut/src/Plugin/migrate/source/d7/ShortcutSetUsers.php index b86dccd..c4d54e9 100644 --- a/core/modules/shortcut/src/Plugin/migrate/source/d7/ShortcutSetUsers.php +++ b/core/modules/shortcut/src/Plugin/migrate/source/d7/ShortcutSetUsers.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "d7_shortcut_set_users", - * source_provider = "shortcut" + * source_module = "shortcut" * ) */ class ShortcutSetUsers extends DrupalSqlBase { diff --git a/core/modules/simpletest/migration_templates/d6_simpletest_settings.yml b/core/modules/simpletest/migration_templates/d6_simpletest_settings.yml index c9eedbb..ec5e2f2 100644 --- a/core/modules/simpletest/migration_templates/d6_simpletest_settings.yml +++ b/core/modules/simpletest/migration_templates/d6_simpletest_settings.yml @@ -10,6 +10,7 @@ source: - simpletest_httpauth_password - simpletest_httpauth_username - simpletest_verbose + source_module: simpletest process: clear_results: simpletest_clear_results 'httpauth/method': simpletest_httpauth_method diff --git a/core/modules/simpletest/migration_templates/d7_simpletest_settings.yml b/core/modules/simpletest/migration_templates/d7_simpletest_settings.yml index b77f76a..f5e9357 100644 --- a/core/modules/simpletest/migration_templates/d7_simpletest_settings.yml +++ b/core/modules/simpletest/migration_templates/d7_simpletest_settings.yml @@ -10,6 +10,7 @@ source: - simpletest_httpauth_password - simpletest_httpauth_username - simpletest_verbose + source_module: simpletest process: clear_results: simpletest_clear_results 'httpauth/method': simpletest_httpauth_method diff --git a/core/modules/statistics/migration_templates/statistics_settings.yml b/core/modules/statistics/migration_templates/statistics_settings.yml index 1f5b5bb..429d7e1 100644 --- a/core/modules/statistics/migration_templates/statistics_settings.yml +++ b/core/modules/statistics/migration_templates/statistics_settings.yml @@ -9,6 +9,7 @@ source: - statistics_enable_access_log - statistics_flush_accesslog_timer - statistics_count_content_views + source_module: statistics process: 'count_content_views': statistics_count_content_views destination: diff --git a/core/modules/syslog/migration_templates/d6_syslog_settings.yml b/core/modules/syslog/migration_templates/d6_syslog_settings.yml index 86a7017..5426271 100644 --- a/core/modules/syslog/migration_templates/d6_syslog_settings.yml +++ b/core/modules/syslog/migration_templates/d6_syslog_settings.yml @@ -7,6 +7,7 @@ source: variables: - syslog_identity - syslog_facility + source_module: syslog process: identity: syslog_identity facility: syslog_facility diff --git a/core/modules/syslog/migration_templates/d7_syslog_settings.yml b/core/modules/syslog/migration_templates/d7_syslog_settings.yml index 4000572..357b38a 100644 --- a/core/modules/syslog/migration_templates/d7_syslog_settings.yml +++ b/core/modules/syslog/migration_templates/d7_syslog_settings.yml @@ -8,6 +8,7 @@ source: - syslog_facility - syslog_format - syslog_identity + source_module: syslog process: facility: syslog_facility format: syslog_format diff --git a/core/modules/system/migration_templates/d6_date_formats.yml b/core/modules/system/migration_templates/d6_date_formats.yml index 71257d4..b281280 100644 --- a/core/modules/system/migration_templates/d6_date_formats.yml +++ b/core/modules/system/migration_templates/d6_date_formats.yml @@ -8,6 +8,7 @@ source: - date_format_long - date_format_medium - date_format_short + source_module: system process: id: plugin: static_map diff --git a/core/modules/system/migration_templates/d6_system_cron.yml b/core/modules/system/migration_templates/d6_system_cron.yml index 7dd3a2b..bf1f6b3 100644 --- a/core/modules/system/migration_templates/d6_system_cron.yml +++ b/core/modules/system/migration_templates/d6_system_cron.yml @@ -8,6 +8,7 @@ source: - cron_threshold_warning - cron_threshold_error - cron_last + source_module: system process: 'threshold/requirements_warning': cron_threshold_warning 'threshold/requirements_error': cron_threshold_error diff --git a/core/modules/system/migration_templates/d6_system_date.yml b/core/modules/system/migration_templates/d6_system_date.yml index 25f6728..7da96c3 100644 --- a/core/modules/system/migration_templates/d6_system_date.yml +++ b/core/modules/system/migration_templates/d6_system_date.yml @@ -8,6 +8,7 @@ source: - configurable_timezones - date_first_day - date_default_timezone + source_module: system process: 'timezone/user/configurable': configurable_timezones first_day: date_first_day diff --git a/core/modules/system/migration_templates/d6_system_file.yml b/core/modules/system/migration_templates/d6_system_file.yml index 60cd616..902b0e4 100644 --- a/core/modules/system/migration_templates/d6_system_file.yml +++ b/core/modules/system/migration_templates/d6_system_file.yml @@ -7,6 +7,7 @@ source: variables: - file_directory_temp - allow_insecure_uploads + source_module: system process: 'path/temporary': file_directory_temp allow_insecure_uploads: diff --git a/core/modules/system/migration_templates/d6_system_performance.yml b/core/modules/system/migration_templates/d6_system_performance.yml index 70a03d6..87811c3 100644 --- a/core/modules/system/migration_templates/d6_system_performance.yml +++ b/core/modules/system/migration_templates/d6_system_performance.yml @@ -10,6 +10,7 @@ source: - cache_lifetime - cache - page_compression + source_module: system process: 'css/preprocess': preprocess_css 'js/preprocess': preprocess_js diff --git a/core/modules/system/migration_templates/d7_global_theme_settings.yml b/core/modules/system/migration_templates/d7_global_theme_settings.yml index 42c5177..9b5ff83 100644 --- a/core/modules/system/migration_templates/d7_global_theme_settings.yml +++ b/core/modules/system/migration_templates/d7_global_theme_settings.yml @@ -6,6 +6,7 @@ source: plugin: variable variables: - theme_settings + source_module: system process: 'features/logo': theme_settings/toggle_logo 'features/name': theme_settings/toggle_name diff --git a/core/modules/system/migration_templates/d7_system_authorize.yml b/core/modules/system/migration_templates/d7_system_authorize.yml index 420497b..780499e 100644 --- a/core/modules/system/migration_templates/d7_system_authorize.yml +++ b/core/modules/system/migration_templates/d7_system_authorize.yml @@ -5,6 +5,7 @@ source: plugin: variable variables: - authorize_filetransfer_default + source_module: system process: filetransfer_default: authorize_filetransfer_default destination: diff --git a/core/modules/system/migration_templates/d7_system_cron.yml b/core/modules/system/migration_templates/d7_system_cron.yml index a603af3..55021c9 100644 --- a/core/modules/system/migration_templates/d7_system_cron.yml +++ b/core/modules/system/migration_templates/d7_system_cron.yml @@ -7,6 +7,7 @@ source: variables: - cron_threshold_warning - cron_threshold_error + source_module: system process: 'threshold/requirements_warning': cron_threshold_warning 'threshold/requirements_error': cron_threshold_error diff --git a/core/modules/system/migration_templates/d7_system_date.yml b/core/modules/system/migration_templates/d7_system_date.yml index b380c89..9722a03 100644 --- a/core/modules/system/migration_templates/d7_system_date.yml +++ b/core/modules/system/migration_templates/d7_system_date.yml @@ -10,6 +10,7 @@ source: - configurable_timezones - empty_timezone_message - user_default_timezone + source_module: system process: 'country/default': site_default_country first_day: date_first_day diff --git a/core/modules/system/migration_templates/d7_system_file.yml b/core/modules/system/migration_templates/d7_system_file.yml index 2295e0e..9652cb0 100644 --- a/core/modules/system/migration_templates/d7_system_file.yml +++ b/core/modules/system/migration_templates/d7_system_file.yml @@ -7,6 +7,7 @@ source: variables: - allow_insecure_uploads - file_temporary_path + source_module: system process: allow_insecure_uploads: plugin: static_map diff --git a/core/modules/system/migration_templates/d7_system_mail.yml b/core/modules/system/migration_templates/d7_system_mail.yml index d4a569c..bc9577e 100644 --- a/core/modules/system/migration_templates/d7_system_mail.yml +++ b/core/modules/system/migration_templates/d7_system_mail.yml @@ -5,6 +5,7 @@ source: plugin: variable variables: - mail_system + source_module: system process: 'interface/default': plugin: static_map diff --git a/core/modules/system/migration_templates/d7_system_performance.yml b/core/modules/system/migration_templates/d7_system_performance.yml index abeb008..0f28dbf 100644 --- a/core/modules/system/migration_templates/d7_system_performance.yml +++ b/core/modules/system/migration_templates/d7_system_performance.yml @@ -9,6 +9,7 @@ source: - preprocess_js - cache_lifetime - page_compression + source_module: system process: 'css/preprocess': preprocess_css 'js/preprocess': preprocess_js diff --git a/core/modules/system/migration_templates/system_image.yml b/core/modules/system/migration_templates/system_image.yml index 7bb16b1..1f5612f 100644 --- a/core/modules/system/migration_templates/system_image.yml +++ b/core/modules/system/migration_templates/system_image.yml @@ -7,6 +7,7 @@ source: plugin: variable variables: - image_toolkit + source_module: system process: toolkit: image_toolkit destination: diff --git a/core/modules/system/migration_templates/system_image_gd.yml b/core/modules/system/migration_templates/system_image_gd.yml index 685116e..28e0ab7 100644 --- a/core/modules/system/migration_templates/system_image_gd.yml +++ b/core/modules/system/migration_templates/system_image_gd.yml @@ -7,6 +7,7 @@ source: plugin: variable variables: - image_jpeg_quality + source_module: system process: jpeg_quality: image_jpeg_quality destination: diff --git a/core/modules/system/migration_templates/system_logging.yml b/core/modules/system/migration_templates/system_logging.yml index c1e8114..eea3473 100644 --- a/core/modules/system/migration_templates/system_logging.yml +++ b/core/modules/system/migration_templates/system_logging.yml @@ -7,6 +7,7 @@ source: plugin: variable variables: - error_level + source_module: system process: error_level: plugin: static_map diff --git a/core/modules/system/migration_templates/system_maintenance.yml b/core/modules/system/migration_templates/system_maintenance.yml index b9f6c34..183fa10 100644 --- a/core/modules/system/migration_templates/system_maintenance.yml +++ b/core/modules/system/migration_templates/system_maintenance.yml @@ -7,6 +7,7 @@ source: plugin: variable variables: - site_offline_message + source_module: system process: message: site_offline_message destination: diff --git a/core/modules/system/migration_templates/system_rss.yml b/core/modules/system/migration_templates/system_rss.yml index 92ce45a..d6ff5bc 100644 --- a/core/modules/system/migration_templates/system_rss.yml +++ b/core/modules/system/migration_templates/system_rss.yml @@ -8,6 +8,7 @@ source: variables: - feed_default_items - feed_item_length + source_module: system process: 'items/limit': feed_default_items 'items/view_mode': feed_item_length diff --git a/core/modules/system/migration_templates/system_site.yml b/core/modules/system/migration_templates/system_site.yml index c8fd849..397823c 100644 --- a/core/modules/system/migration_templates/system_site.yml +++ b/core/modules/system/migration_templates/system_site.yml @@ -16,6 +16,7 @@ source: - site_404 - drupal_weight_select_max - admin_compact_mode + source_module: system process: name: site_name mail: site_mail diff --git a/core/modules/system/src/Plugin/migrate/source/Menu.php b/core/modules/system/src/Plugin/migrate/source/Menu.php index c55bc4b..a97878f 100644 --- a/core/modules/system/src/Plugin/migrate/source/Menu.php +++ b/core/modules/system/src/Plugin/migrate/source/Menu.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "menu", - * source_provider = "menu" + * source_module = "menu" * ) */ class Menu extends DrupalSqlBase { diff --git a/core/modules/system/src/Plugin/migrate/source/d7/ThemeSettings.php b/core/modules/system/src/Plugin/migrate/source/d7/ThemeSettings.php index 5561a9a..6ae17be 100644 --- a/core/modules/system/src/Plugin/migrate/source/d7/ThemeSettings.php +++ b/core/modules/system/src/Plugin/migrate/source/d7/ThemeSettings.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "d7_theme_settings", - * source_provider = "system" + * source_module = "system" * ) */ class ThemeSettings extends VariableMultiRow { diff --git a/core/modules/taxonomy/migration_templates/taxonomy_settings.yml b/core/modules/taxonomy/migration_templates/taxonomy_settings.yml index c20372c..28505db 100644 --- a/core/modules/taxonomy/migration_templates/taxonomy_settings.yml +++ b/core/modules/taxonomy/migration_templates/taxonomy_settings.yml @@ -8,6 +8,7 @@ source: variables: - taxonomy_override_selector - taxonomy_terms_per_page_admin + source_module: taxonomy process: override_selector: taxonomy_override_selector terms_per_page_admin: taxonomy_terms_per_page_admin diff --git a/core/modules/taxonomy/src/Plugin/migrate/source/Term.php b/core/modules/taxonomy/src/Plugin/migrate/source/Term.php index 53ca632..9c7443b 100644 --- a/core/modules/taxonomy/src/Plugin/migrate/source/Term.php +++ b/core/modules/taxonomy/src/Plugin/migrate/source/Term.php @@ -12,7 +12,7 @@ * * @MigrateSource( * id = "taxonomy_term", - * source_provider = "taxonomy" + * source_module = "taxonomy" * ) * * @deprecated in Drupal 8.3.0, intended to be removed in Drupal 9.0.0. diff --git a/core/modules/taxonomy/src/Plugin/migrate/source/d6/Term.php b/core/modules/taxonomy/src/Plugin/migrate/source/d6/Term.php index 9170cd8..d43ed16 100644 --- a/core/modules/taxonomy/src/Plugin/migrate/source/d6/Term.php +++ b/core/modules/taxonomy/src/Plugin/migrate/source/d6/Term.php @@ -12,7 +12,7 @@ * * @MigrateSource( * id = "d6_taxonomy_term", - * source_provider = "taxonomy" + * source_module = "taxonomy" * ) */ class Term extends DrupalSqlBase { diff --git a/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermNode.php b/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermNode.php index 2b1c806..4171cce 100644 --- a/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermNode.php +++ b/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermNode.php @@ -10,7 +10,7 @@ * * @MigrateSource( * id = "d6_term_node", - * source_provider = "taxonomy" + * source_module = "taxonomy" * ) */ class TermNode extends DrupalSqlBase { diff --git a/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermNodeRevision.php b/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermNodeRevision.php index 91c133b..96d30d4 100644 --- a/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermNodeRevision.php +++ b/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermNodeRevision.php @@ -6,7 +6,8 @@ * Source returning tids from the term_node table for the non-current revision. * * @MigrateSource( - * id = "d6_term_node_revision" + * id = "d6_term_node_revision", + * source_module = "taxonomy" * ) */ class TermNodeRevision extends TermNode { diff --git a/core/modules/taxonomy/src/Plugin/migrate/source/d6/Vocabulary.php b/core/modules/taxonomy/src/Plugin/migrate/source/d6/Vocabulary.php index 714fa93..a1c2f69 100644 --- a/core/modules/taxonomy/src/Plugin/migrate/source/d6/Vocabulary.php +++ b/core/modules/taxonomy/src/Plugin/migrate/source/d6/Vocabulary.php @@ -11,7 +11,7 @@ * * @MigrateSource( * id = "d6_taxonomy_vocabulary", - * source_provider = "taxonomy" + * source_module = "taxonomy" * ) */ class Vocabulary extends DrupalSqlBase { diff --git a/core/modules/taxonomy/src/Plugin/migrate/source/d6/VocabularyPerType.php b/core/modules/taxonomy/src/Plugin/migrate/source/d6/VocabularyPerType.php index 40a0094..ba736ea 100644 --- a/core/modules/taxonomy/src/Plugin/migrate/source/d6/VocabularyPerType.php +++ b/core/modules/taxonomy/src/Plugin/migrate/source/d6/VocabularyPerType.php @@ -7,7 +7,7 @@ * * @MigrateSource( * id = "d6_taxonomy_vocabulary_per_type", - * source_provider = "taxonomy" + * source_module = "taxonomy" * ) */ class VocabularyPerType extends Vocabulary { diff --git a/core/modules/taxonomy/src/Plugin/migrate/source/d6/VocabularyTranslation.php b/core/modules/taxonomy/src/Plugin/migrate/source/d6/VocabularyTranslation.php index a6edd05..c8f4ef8 100644 --- a/core/modules/taxonomy/src/Plugin/migrate/source/d6/VocabularyTranslation.php +++ b/core/modules/taxonomy/src/Plugin/migrate/source/d6/VocabularyTranslation.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "d6_taxonomy_vocabulary_translation", - * source_provider = "taxonomy" + * source_module = "i18ntaxonomy" * ) */ class VocabularyTranslation extends DrupalSqlBase { diff --git a/core/modules/taxonomy/src/Plugin/migrate/source/d7/Term.php b/core/modules/taxonomy/src/Plugin/migrate/source/d7/Term.php index 518b9f7..a9711a1 100644 --- a/core/modules/taxonomy/src/Plugin/migrate/source/d7/Term.php +++ b/core/modules/taxonomy/src/Plugin/migrate/source/d7/Term.php @@ -12,7 +12,7 @@ * * @MigrateSource( * id = "d7_taxonomy_term", - * source_provider = "taxonomy" + * source_module = "taxonomy" * ) */ class Term extends FieldableEntity { diff --git a/core/modules/taxonomy/src/Plugin/migrate/source/d7/Vocabulary.php b/core/modules/taxonomy/src/Plugin/migrate/source/d7/Vocabulary.php index 31103a8..cc1afa9 100644 --- a/core/modules/taxonomy/src/Plugin/migrate/source/d7/Vocabulary.php +++ b/core/modules/taxonomy/src/Plugin/migrate/source/d7/Vocabulary.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "d7_taxonomy_vocabulary", - * source_provider = "taxonomy" + * source_module = "taxonomy" * ) */ class Vocabulary extends DrupalSqlBase { diff --git a/core/modules/text/migration_templates/text_settings.yml b/core/modules/text/migration_templates/text_settings.yml index 45d426d..a38de85 100644 --- a/core/modules/text/migration_templates/text_settings.yml +++ b/core/modules/text/migration_templates/text_settings.yml @@ -7,6 +7,7 @@ source: plugin: variable variables: - teaser_length + source_module: text process: default_summary_length: teaser_length destination: diff --git a/core/modules/tracker/migration_templates/d7_tracker_settings.yml b/core/modules/tracker/migration_templates/d7_tracker_settings.yml index ce06cbd..ac61d7d 100644 --- a/core/modules/tracker/migration_templates/d7_tracker_settings.yml +++ b/core/modules/tracker/migration_templates/d7_tracker_settings.yml @@ -6,6 +6,7 @@ source: plugin: variable variables: - tracker_batch_size + source_module: tracker process: cron_index_limit: tracker_batch_size destination: diff --git a/core/modules/tracker/src/Plugin/migrate/source/d7/TrackerNode.php b/core/modules/tracker/src/Plugin/migrate/source/d7/TrackerNode.php index ffdc5cd..2805b7d 100644 --- a/core/modules/tracker/src/Plugin/migrate/source/d7/TrackerNode.php +++ b/core/modules/tracker/src/Plugin/migrate/source/d7/TrackerNode.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "d7_tracker_node", - * source_provider = "tracker" + * source_module = "tracker" * ) */ class TrackerNode extends DrupalSqlBase { diff --git a/core/modules/tracker/src/Plugin/migrate/source/d7/TrackerUser.php b/core/modules/tracker/src/Plugin/migrate/source/d7/TrackerUser.php index 9ce3ff3..4991dbe 100644 --- a/core/modules/tracker/src/Plugin/migrate/source/d7/TrackerUser.php +++ b/core/modules/tracker/src/Plugin/migrate/source/d7/TrackerUser.php @@ -9,7 +9,7 @@ * * @MigrateSource( * id = "d7_tracker_user", - * source_provider = "tracker" + * source_module = "tracker" * ) */ class TrackerUser extends DrupalSqlBase { diff --git a/core/modules/update/migration_templates/update_settings.yml b/core/modules/update/migration_templates/update_settings.yml index ad22472..a7adfd7 100644 --- a/core/modules/update/migration_templates/update_settings.yml +++ b/core/modules/update/migration_templates/update_settings.yml @@ -11,6 +11,7 @@ source: - update_notification_threshold - update_notify_emails - update_check_frequency + source_module: update process: 'fetch/max_attempts': update_max_fetch_attempts 'fetch/url': update_fetch_url diff --git a/core/modules/user/migration_templates/d6_user_mail.yml b/core/modules/user/migration_templates/d6_user_mail.yml index b06b6ea..9b25b94 100644 --- a/core/modules/user/migration_templates/d6_user_mail.yml +++ b/core/modules/user/migration_templates/d6_user_mail.yml @@ -19,6 +19,7 @@ source: - user_mail_register_pending_approval_body - user_mail_status_blocked_subject - user_mail_status_blocked_body + source_module: user process: 'status_activated/subject': plugin: convert_tokens diff --git a/core/modules/user/migration_templates/d6_user_settings.yml b/core/modules/user/migration_templates/d6_user_settings.yml index 6e25ece..2dfa946 100644 --- a/core/modules/user/migration_templates/d6_user_settings.yml +++ b/core/modules/user/migration_templates/d6_user_settings.yml @@ -10,6 +10,7 @@ source: - user_email_verification - user_register - anonymous + source_module: user process: 'notify/status_blocked': user_mail_status_blocked_notify 'notify/status_activated': user_mail_status_activated_notify diff --git a/core/modules/user/migration_templates/d7_user_flood.yml b/core/modules/user/migration_templates/d7_user_flood.yml index ae00ce0..db08753 100644 --- a/core/modules/user/migration_templates/d7_user_flood.yml +++ b/core/modules/user/migration_templates/d7_user_flood.yml @@ -10,6 +10,7 @@ source: - user_failed_login_ip_window - user_failed_login_user_window - user_failed_login_user_limit + source_module: user process: uid_only: user_failed_login_identifier_uid_only ip_limit: user_failed_login_ip_limit diff --git a/core/modules/user/migration_templates/d7_user_mail.yml b/core/modules/user/migration_templates/d7_user_mail.yml index 0c5e74c..81051ef 100644 --- a/core/modules/user/migration_templates/d7_user_mail.yml +++ b/core/modules/user/migration_templates/d7_user_mail.yml @@ -19,6 +19,7 @@ source: - user_mail_register_pending_approval_body - user_mail_status_blocked_subject - user_mail_status_blocked_body + source_module: user process: 'status_activated/subject': user_mail_status_activated_subject 'status_activated/body': user_mail_status_activated_body diff --git a/core/modules/user/migration_templates/user_picture_field.yml b/core/modules/user/migration_templates/user_picture_field.yml index ff8bd82..7f7134d 100644 --- a/core/modules/user/migration_templates/user_picture_field.yml +++ b/core/modules/user/migration_templates/user_picture_field.yml @@ -12,6 +12,7 @@ source: type: image name: user_picture cardinality: 1 + source_module: user process: entity_type: 'constants/entity_type' field_name: 'constants/name' diff --git a/core/modules/user/src/Plugin/migrate/source/ProfileField.php b/core/modules/user/src/Plugin/migrate/source/ProfileField.php index 151d501..93a0430 100644 --- a/core/modules/user/src/Plugin/migrate/source/ProfileField.php +++ b/core/modules/user/src/Plugin/migrate/source/ProfileField.php @@ -10,7 +10,7 @@ * * @MigrateSource( * id = "profile_field", - * source_provider = "profile" + * source_module = "profile" * ) */ class ProfileField extends DrupalSqlBase { diff --git a/core/modules/user/src/Plugin/migrate/source/UserPictureInstance.php b/core/modules/user/src/Plugin/migrate/source/UserPictureInstance.php index 441fdc7..1f8e13a 100644 --- a/core/modules/user/src/Plugin/migrate/source/UserPictureInstance.php +++ b/core/modules/user/src/Plugin/migrate/source/UserPictureInstance.php @@ -11,7 +11,8 @@ * @todo Support default picture? * * @MigrateSource( - * id = "user_picture_instance" + * id = "user_picture_instance", + * source_module = "user" * ) */ class UserPictureInstance extends DrupalSqlBase { diff --git a/core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldValues.php b/core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldValues.php index 80db9df..ac49290 100644 --- a/core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldValues.php +++ b/core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldValues.php @@ -10,7 +10,7 @@ * * @MigrateSource( * id = "d6_profile_field_values", - * source_provider = "profile" + * source_module = "profile" * ) */ class ProfileFieldValues extends DrupalSqlBase { diff --git a/core/modules/user/src/Plugin/migrate/source/d6/Role.php b/core/modules/user/src/Plugin/migrate/source/d6/Role.php index 82ad3e9..a809b07 100644 --- a/core/modules/user/src/Plugin/migrate/source/d6/Role.php +++ b/core/modules/user/src/Plugin/migrate/source/d6/Role.php @@ -9,7 +9,8 @@ * Drupal 6 role source from database. * * @MigrateSource( - * id = "d6_user_role" + * id = "d6_user_role", + * source_module = "user" * ) */ class Role extends DrupalSqlBase { diff --git a/core/modules/user/src/Plugin/migrate/source/d6/User.php b/core/modules/user/src/Plugin/migrate/source/d6/User.php index c8e9d19..5213534 100644 --- a/core/modules/user/src/Plugin/migrate/source/d6/User.php +++ b/core/modules/user/src/Plugin/migrate/source/d6/User.php @@ -9,7 +9,8 @@ * Drupal 6 user source from database. * * @MigrateSource( - * id = "d6_user" + * id = "d6_user", + * source_module = "user" * ) */ class User extends DrupalSqlBase { diff --git a/core/modules/user/src/Plugin/migrate/source/d6/UserPicture.php b/core/modules/user/src/Plugin/migrate/source/d6/UserPicture.php index 6b16ad4..0d5bd6b 100644 --- a/core/modules/user/src/Plugin/migrate/source/d6/UserPicture.php +++ b/core/modules/user/src/Plugin/migrate/source/d6/UserPicture.php @@ -10,7 +10,8 @@ * @todo Support default picture? * * @MigrateSource( - * id = "d6_user_picture" + * id = "d6_user_picture", + * source_module = "user" * ) */ class UserPicture extends DrupalSqlBase { diff --git a/core/modules/user/src/Plugin/migrate/source/d6/UserPictureFile.php b/core/modules/user/src/Plugin/migrate/source/d6/UserPictureFile.php index 8952ffd..72d18fd 100644 --- a/core/modules/user/src/Plugin/migrate/source/d6/UserPictureFile.php +++ b/core/modules/user/src/Plugin/migrate/source/d6/UserPictureFile.php @@ -9,7 +9,8 @@ * Drupal 6 user picture source from database. * * @MigrateSource( - * id = "d6_user_picture_file" + * id = "d6_user_picture_file", + * source_module = "user" * ) */ class UserPictureFile extends DrupalSqlBase { diff --git a/core/modules/user/src/Plugin/migrate/source/d7/Role.php b/core/modules/user/src/Plugin/migrate/source/d7/Role.php index 9245aab..7950991 100644 --- a/core/modules/user/src/Plugin/migrate/source/d7/Role.php +++ b/core/modules/user/src/Plugin/migrate/source/d7/Role.php @@ -9,7 +9,8 @@ * Drupal 7 role source from database. * * @MigrateSource( - * id = "d7_user_role" + * id = "d7_user_role", + * source_module = "user" * ) */ class Role extends DrupalSqlBase { diff --git a/core/modules/user/src/Plugin/migrate/source/d7/User.php b/core/modules/user/src/Plugin/migrate/source/d7/User.php index 408d998..41f9ab4 100644 --- a/core/modules/user/src/Plugin/migrate/source/d7/User.php +++ b/core/modules/user/src/Plugin/migrate/source/d7/User.php @@ -9,7 +9,8 @@ * Drupal 7 user source from database. * * @MigrateSource( - * id = "d7_user" + * id = "d7_user", + * source_module = "user" * ) */ class User extends FieldableEntity {