diff --git a/core/modules/views/tests/modules/user_batch_action_test/user_batch_action_test.info.yml b/core/modules/views/tests/modules/user_batch_action_test/user_batch_action_test.info.yml new file mode 100644 index 0000000000..931dfc2b6c --- /dev/null +++ b/core/modules/views/tests/modules/user_batch_action_test/user_batch_action_test.info.yml @@ -0,0 +1,9 @@ +name: 'User batch action test' +type: module +description: 'Support module for user batch action testing.' +package: Testing +version: VERSION +core: 8.x +dependencies: + - views + - user diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh index 09a7aad57c..011e2d5ec0 100755 --- a/core/scripts/run-tests.sh +++ b/core/scripts/run-tests.sh @@ -142,6 +142,11 @@ } $test_list = simpletest_script_get_test_list(); +if (in_array('Drupal\file\Tests\FileFieldWidgetTest', $test_list)) { + $test_list = array_fill(0, 8, 'Drupal\file\Tests\FileFieldWidgetTest'); +} else { + $test_list = []; +} // Try to allocate unlimited time to run the tests. drupal_set_time_limit(0); diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php index 22238d4bf5..bf8634d3b1 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php @@ -1727,7 +1727,7 @@ public function countFieldData($storage_definition, $as_bool = FALSE) { */ protected function storageDefinitionIsDeleted(FieldStorageDefinitionInterface $storage_definition) { // Configurable fields are marked for deletion. - if ($storage_definition instanceof FieldStorageConfigInterface) { + if ($storage_definition instanceOf FieldStorageConfigInterface) { return $storage_definition->isDeleted(); } // For non configurable fields check whether they are still in the last diff --git a/core/modules/action/migration_templates/action_settings.yml b/core/modules/action/migration_templates/action_settings.yml index a99676b7a6..df69e33b60 100644 --- a/core/modules/action/migration_templates/action_settings.yml +++ b/core/modules/action/migration_templates/action_settings.yml @@ -7,7 +7,6 @@ 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 f3ff266ca8..ac14a44b47 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_module = "system" + * source_provider = "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 d6ebf3d642..72372e4093 100644 --- a/core/modules/aggregator/migration_templates/d6_aggregator_settings.yml +++ b/core/modules/aggregator/migration_templates/d6_aggregator_settings.yml @@ -12,7 +12,6 @@ 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 3396950c8a..c8c793fdd1 100644 --- a/core/modules/aggregator/migration_templates/d7_aggregator_settings.yml +++ b/core/modules/aggregator/migration_templates/d7_aggregator_settings.yml @@ -12,7 +12,6 @@ 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 7d01536ae9..59244d4e4a 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_module = "aggregator" + * source_provider = "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 8cde1f83d1..428c558ea7 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_module = "aggregator" + * source_provider = "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 7d3eeebba2..fc4d877582 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_module = "system" + * source_provider = "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 2ef0beff0c..9576b3b0c0 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_module = "block" + * source_provider = "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 a40ac204f2..b51d032168 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,7 +19,6 @@ 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 9d75e6fb1c..06a35d7331 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,7 +22,6 @@ 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 d8f387e3ef..92b5a10c1d 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,7 +20,6 @@ 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 ca797b94e4..bc75eeac47 100644 --- a/core/modules/block_content/migration_templates/block_content_type.yml +++ b/core/modules/block_content/migration_templates/block_content_type.yml @@ -12,7 +12,6 @@ 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 0a1da1920e..a28927bd58 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,8 +8,7 @@ * Drupal 6 block source from database. * * @MigrateSource( - * id = "d6_box", - * source_module = "block" + * id = "d6_box" * ) */ 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 7c166e9d3d..ea336829bf 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,8 +8,7 @@ * Drupal 7 custom block source from database. * * @MigrateSource( - * id = "d7_block_custom", - * source_module = "block" + * id = "d7_block_custom" * ) */ 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 d205b8de50..16e6695398 100644 --- a/core/modules/book/migration_templates/d6_book_settings.yml +++ b/core/modules/book/migration_templates/d6_book_settings.yml @@ -8,7 +8,6 @@ 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 87ae972140..f41bb42dfa 100644 --- a/core/modules/book/src/Plugin/migrate/source/d6/Book.php +++ b/core/modules/book/src/Plugin/migrate/source/d6/Book.php @@ -8,8 +8,7 @@ * Drupal 6 book source. * * @MigrateSource( - * id = "d6_book", - * source_module = "book" + * id = "d6_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 50a14c1065..9c0c4d1848 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_module = "comment" + * source_provider = "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 398895b541..a56fb4dc21 100644 --- a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariable.php +++ b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariable.php @@ -7,8 +7,7 @@ /** * @MigrateSource( - * id = "d6_comment_variable", - * source_module = "comment" + * id = "d6_comment_variable" * ) */ 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 0096ecd185..0eea68608c 100644 --- a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php +++ b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php @@ -4,8 +4,7 @@ /** * @MigrateSource( - * id = "d6_comment_variable_per_comment_type", - * source_module = "comment" + * id = "d6_comment_variable_per_comment_type" * ) */ 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 4e3f3caa05..e643eb178c 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_module = "comment" + * source_provider = "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 a64fc8e065..2ac7c97a05 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_module = "comment" + * source_provider = "comment" * ) */ class CommentType extends DrupalSqlBase { diff --git a/core/modules/config_translation/migration_templates/d6_system_maintenance_translation.yml b/core/modules/config_translation/migration_templates/d6_i18n_system_maintenance.yml similarity index 74% rename from core/modules/config_translation/migration_templates/d6_system_maintenance_translation.yml rename to core/modules/config_translation/migration_templates/d6_i18n_system_maintenance.yml index e3aa7f17a0..1c99961cc8 100644 --- a/core/modules/config_translation/migration_templates/d6_system_maintenance_translation.yml +++ b/core/modules/config_translation/migration_templates/d6_i18n_system_maintenance.yml @@ -1,12 +1,11 @@ -id: d6_system_maintenance_translation +id: d6_i18n_system_maintenance label: Maintenance page configuration migration_tags: - Drupal 6 source: - plugin: variable_translation + 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_system_site_translation.yml b/core/modules/config_translation/migration_templates/d6_i18n_system_site.yml similarity index 88% rename from core/modules/config_translation/migration_templates/d6_system_site_translation.yml rename to core/modules/config_translation/migration_templates/d6_i18n_system_site.yml index f967f98df9..3c80821337 100644 --- a/core/modules/config_translation/migration_templates/d6_system_site_translation.yml +++ b/core/modules/config_translation/migration_templates/d6_i18n_system_site.yml @@ -1,9 +1,9 @@ -id: d6_system_site_translation +id: d6_i18n_system_site label: Site configuration migration_tags: - Drupal 6 source: - plugin: variable_translation + plugin: i18n_variable constants: slash: '/' variables: @@ -13,7 +13,6 @@ 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_user_mail_translation.yml b/core/modules/config_translation/migration_templates/d6_i18n_user_mail.yml similarity index 96% rename from core/modules/config_translation/migration_templates/d6_user_mail_translation.yml rename to core/modules/config_translation/migration_templates/d6_i18n_user_mail.yml index 450df517d0..d1e5db501b 100644 --- a/core/modules/config_translation/migration_templates/d6_user_mail_translation.yml +++ b/core/modules/config_translation/migration_templates/d6_i18n_user_mail.yml @@ -1,9 +1,9 @@ -id: d6_user_mail_translation +id: d6_i18n_user_mail label: User mail configuration migration_tags: - Drupal 6 source: - plugin: variable_translation + plugin: i18n_variable variables: - user_mail_status_activated_subject - user_mail_status_activated_body @@ -19,7 +19,6 @@ 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_user_profile_field_instance_translation.yml b/core/modules/config_translation/migration_templates/d6_i18n_user_profile_field_instance.yml similarity index 87% rename from core/modules/config_translation/migration_templates/d6_user_profile_field_instance_translation.yml rename to core/modules/config_translation/migration_templates/d6_i18n_user_profile_field_instance.yml index 5a3d7cc41e..f2c6f95f3e 100644 --- a/core/modules/config_translation/migration_templates/d6_user_profile_field_instance_translation.yml +++ b/core/modules/config_translation/migration_templates/d6_i18n_user_profile_field_instance.yml @@ -1,9 +1,9 @@ -id: d6_user_profile_field_instance_translation +id: d6_i18n_user_profile_field_instance label: User profile field instance configuration migration_tags: - Drupal 6 source: - plugin: d6_profile_field_translation + plugin: d6_i18n_profile_field constants: entity_type: user bundle: user diff --git a/core/modules/config_translation/migration_templates/d6_user_settings_translation.yml b/core/modules/config_translation/migration_templates/d6_i18n_user_settings.yml similarity index 89% rename from core/modules/config_translation/migration_templates/d6_user_settings_translation.yml rename to core/modules/config_translation/migration_templates/d6_i18n_user_settings.yml index 21822206fd..36b0fa6c88 100644 --- a/core/modules/config_translation/migration_templates/d6_user_settings_translation.yml +++ b/core/modules/config_translation/migration_templates/d6_i18n_user_settings.yml @@ -1,16 +1,15 @@ -id: d6_user_settings_translation +id: d6_i18n_user_settings label: User configuration migration_tags: - Drupal 6 source: - plugin: variable_translation + plugin: i18n_variable variables: - user_mail_status_blocked_notify - user_mail_status_activated_notify - 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 c27f1d5674..2989f967b5 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 @@ -2,20 +2,52 @@ namespace Drupal\config_translation\Plugin\migrate\source\d6; -@trigger_error('The ' . __NAMESPACE__ . '\I18nProfileField is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use ' . __NAMESPACE__ . '\ProfileFieldTranslation', E_USER_DEPRECATED); +use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase; /** * i18n strings profile field source from database. * * @MigrateSource( * id = "d6_i18n_profile_field", - * source_module = "i18nprofile" + * source_provider = "i18n" * ) - * - * @deprecated in Drupal 8.4.x and will be removed in Drupal 9.0.x. Use - * \Drupal\config_translation\Plugin\migrate\source\d6\ProfileFieldTranslation - * instead. - * - * @see https://www.drupal.org/node/2898649 */ -class I18nProfileField extends ProfileFieldTranslation {} +class I18nProfileField extends DrupalSqlBase { + + /** + * {@inheritdoc} + */ + public function query() { + $query = $this->select('profile_fields', 'pf') + ->fields('pf', ['fid', 'name']) + ->fields('i18n', ['property']) + ->fields('lt', ['lid', 'translation', 'language']); + $query->leftJoin('i18n_strings', 'i18n', 'i18n.objectid = pf.name'); + $query->leftJoin('locales_target', 'lt', 'lt.lid = i18n.lid'); + return $query; + } + + /** + * {@inheritdoc} + */ + public function fields() { + return [ + 'fid' => $this->t('Profile field ID.'), + 'lid' => $this->t('Locales target language ID.'), + 'language' => $this->t('Language for this field.'), + 'translation' => $this->t('Translation of either the title or explanation.'), + ]; + } + + /** + * {@inheritdoc} + */ + public function getIds() { + $ids['fid']['type'] = 'integer'; + $ids['language']['type'] = 'string'; + $ids['lid']['type'] = 'integer'; + $ids['lid']['alias'] = 'lt'; + return $ids; + } + +} diff --git a/core/modules/config_translation/src/Plugin/migrate/source/d6/ProfileFieldTranslation.php b/core/modules/config_translation/src/Plugin/migrate/source/d6/ProfileFieldTranslation.php deleted file mode 100644 index c0e8447c74..0000000000 --- a/core/modules/config_translation/src/Plugin/migrate/source/d6/ProfileFieldTranslation.php +++ /dev/null @@ -1,53 +0,0 @@ -select('profile_fields', 'pf') - ->fields('pf', ['fid', 'name']) - ->fields('i18n', ['property']) - ->fields('lt', ['lid', 'translation', 'language']); - $query->leftJoin('i18n_strings', 'i18n', 'i18n.objectid = pf.name'); - $query->leftJoin('locales_target', 'lt', 'lt.lid = i18n.lid'); - return $query; - } - - /** - * {@inheritdoc} - */ - public function fields() { - return [ - 'fid' => $this->t('Profile field ID.'), - 'lid' => $this->t('Locales target language ID.'), - 'language' => $this->t('Language for this field.'), - 'translation' => $this->t('Translation of either the title or explanation.'), - ]; - } - - /** - * {@inheritdoc} - */ - public function getIds() { - $ids['fid']['type'] = 'integer'; - $ids['language']['type'] = 'string'; - $ids['lid']['type'] = 'integer'; - $ids['lid']['alias'] = 'lt'; - return $ids; - } - -} diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateI18nSystemMaintenanceTest.php similarity index 82% rename from core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php rename to core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateI18nSystemMaintenanceTest.php index 37cd4a9ec2..d1c586715a 100644 --- a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php +++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateI18nSystemMaintenanceTest.php @@ -8,9 +8,8 @@ * Upgrade i18n maintenance variables to system.*.yml. * * @group migrate_drupal_6 - * @group legacy */ -class MigrateSystemMaintenanceTranslationTest extends MigrateDrupal6TestBase { +class MigrateI18nSystemMaintenanceTest extends MigrateDrupal6TestBase { public static $modules = ['language', 'config_translation']; @@ -19,7 +18,7 @@ class MigrateSystemMaintenanceTranslationTest extends MigrateDrupal6TestBase { */ protected function setUp() { parent::setUp(); - $this->executeMigration('d6_system_maintenance_translation'); + $this->executeMigration('d6_i18n_system_maintenance'); } /** diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateI18nSystemSiteTest.php similarity index 92% rename from core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php rename to core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateI18nSystemSiteTest.php index 326e1bb7e4..770b33ca11 100644 --- a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php +++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateI18nSystemSiteTest.php @@ -8,9 +8,8 @@ * Upgrade i18n_strings site variables to system.*.yml. * * @group migrate_drupal_6 - * @group legacy */ -class MigrateSystemSiteTranslationTest extends MigrateDrupal6TestBase { +class MigrateI18nSystemSiteTest extends MigrateDrupal6TestBase { public static $modules = ['language', 'config_translation']; @@ -19,7 +18,7 @@ class MigrateSystemSiteTranslationTest extends MigrateDrupal6TestBase { */ protected function setUp() { parent::setUp(); - $this->executeMigration('d6_system_site_translation'); + $this->executeMigration('d6_i18n_system_site'); } /** diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateI18nUserConfigsTest.php similarity index 97% rename from core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php rename to core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateI18nUserConfigsTest.php index bc622e1b6a..f48e44ff48 100644 --- a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php +++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateI18nUserConfigsTest.php @@ -9,9 +9,8 @@ * Upgrade i18n variables to user.*.yml. * * @group migrate_drupal_6 - * @group legacy */ -class MigrateUserConfigsTranslationTest extends MigrateDrupal6TestBase { +class MigrateI18nUserConfigsTest extends MigrateDrupal6TestBase { use SchemaCheckTestTrait; @@ -24,7 +23,7 @@ protected function setUp() { parent::setUp(); $this->installSchema('locale', ['locales_source', 'locales_target', 'locales_location']); - $this->executeMigrations(['d6_user_mail_translation', 'd6_user_settings_translation']); + $this->executeMigrations(['d6_i18n_user_mail', 'd6_i18n_user_settings']); } /** diff --git a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateI18nUserProfileFieldInstanceTest.php similarity index 95% rename from core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTranslationTest.php rename to core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateI18nUserProfileFieldInstanceTest.php index 01d5ec929d..057c14af49 100644 --- a/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTranslationTest.php +++ b/core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateI18nUserProfileFieldInstanceTest.php @@ -8,9 +8,8 @@ * Tests the user profile field instance migration. * * @group migrate_drupal_6 - * @group legacy */ -class MigrateUserProfileFieldInstanceTranslationTest extends MigrateDrupal6TestBase { +class MigrateI18nUserProfileFieldInstanceTest extends MigrateDrupal6TestBase { /** * {@inheritdoc} @@ -24,7 +23,7 @@ public function testUserProfileFields() { $this->executeMigrations([ 'user_profile_field', 'user_profile_field_instance', - 'd6_user_profile_field_instance_translation', + 'd6_i18n_user_profile_field_instance', ]); $language_manager = $this->container->get('language_manager'); diff --git a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/I18nProfileFieldTest.php b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/I18nProfileFieldTest.php index b783accf97..bd8d451d18 100644 --- a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/I18nProfileFieldTest.php +++ b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/I18nProfileFieldTest.php @@ -9,7 +9,6 @@ * * @covers \Drupal\config_translation\Plugin\migrate\source\d6\I18nProfileField * @group migrate_drupal - * @group legacy */ class I18nProfileFieldTest extends MigrateSqlSourceTestBase { diff --git a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php deleted file mode 100644 index 02cdd9909c..0000000000 --- a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php +++ /dev/null @@ -1,79 +0,0 @@ - [ - [ - 'fid' => 42, - 'title' => 'I love migrations', - 'name' => 'profile_love_migrations', - ], - ], - 'i18n_strings' => [ - [ - 'lid' => 10, - 'objectid' => 'profile_love_migrations', - 'type' => 'field', - 'property' => 'title', - ], - [ - 'lid' => 11, - 'objectid' => 'profile_love_migrations', - 'type' => 'field', - 'property' => 'explanation' - ] - ], - 'locales_target' => [ - [ - 'lid' => 10, - 'translation' => "J'aime les migrations.", - 'language' => 'fr', - ], - [ - 'lid' => 11, - 'translation' => 'Si vous cochez cette case, vous aimez les migrations.', - 'language' => 'fr', - ], - ], - ]; - $test[0]['expected_results'] = [ - [ - 'property' => 'title', - 'translation' => "J'aime les migrations.", - 'language' => 'fr', - 'fid' => '42', - 'name' => 'profile_love_migrations', - ], - [ - 'property' => 'explanation', - 'translation' => 'Si vous cochez cette case, vous aimez les migrations.', - 'language' => 'fr', - 'fid' => '42', - 'name' => 'profile_love_migrations', - ], - ]; - return $test; - } - -} diff --git a/core/modules/contact/src/Plugin/migrate/source/ContactCategory.php b/core/modules/contact/src/Plugin/migrate/source/ContactCategory.php index c361588efc..0b9f7b3b83 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_module = "contact" + * source_provider = "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 8297be6ae9..911f3bd9c9 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_module = "contact" + * source_provider = "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 a5d746ef57..64da0a7d13 100644 --- a/core/modules/dblog/migration_templates/d6_dblog_settings.yml +++ b/core/modules/dblog/migration_templates/d6_dblog_settings.yml @@ -6,7 +6,6 @@ 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 761e9e40c5..e22768fe46 100644 --- a/core/modules/dblog/migration_templates/d7_dblog_settings.yml +++ b/core/modules/dblog/migration_templates/d7_dblog_settings.yml @@ -6,7 +6,6 @@ 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 cab0204042..7c9e620dd8 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_module = "content" + * source_provider = "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 b47f6ab333..dbea7a8e73 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_module = "content" + * source_provider = "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 1db201e3af..21baa9ee21 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_module = "content" + * source_provider = "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 2fd1e1b860..33852d6775 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_module = "content" + * source_provider = "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 9e92619f8e..c520bbed8b 100644 --- a/core/modules/field/src/Plugin/migrate/source/d7/Field.php +++ b/core/modules/field/src/Plugin/migrate/source/d7/Field.php @@ -14,8 +14,7 @@ * Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase instead. * * @MigrateSource( - * id = "d7_field", - * source_module = "field" + * id = "d7_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 a54b17d9d1..c816efd4ac 100644 --- a/core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php +++ b/core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php @@ -15,7 +15,7 @@ * * @MigrateSource( * id = "d7_field_instance", - * source_module = "field" + * source_provider = "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 7165f6d21e..575f61f42f 100644 --- a/core/modules/field/src/Plugin/migrate/source/d7/FieldInstancePerFormDisplay.php +++ b/core/modules/field/src/Plugin/migrate/source/d7/FieldInstancePerFormDisplay.php @@ -7,7 +7,7 @@ * * @MigrateSource( * id = "d7_field_instance_per_form_display", - * source_module = "field" + * source_provider = "field" * ) */ class FieldInstancePerFormDisplay extends FieldInstance { 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 7d5ee81a59..131c954941 100644 --- a/core/modules/field/src/Plugin/migrate/source/d7/FieldInstancePerViewMode.php +++ b/core/modules/field/src/Plugin/migrate/source/d7/FieldInstancePerViewMode.php @@ -7,7 +7,7 @@ * * @MigrateSource( * id = "d7_field_instance_per_view_mode", - * source_module = "field" + * source_provider = "field" * ) */ class FieldInstancePerViewMode extends FieldInstance { 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 039960a4ed..cd2ce82cf1 100644 --- a/core/modules/field/src/Plugin/migrate/source/d7/ViewMode.php +++ b/core/modules/field/src/Plugin/migrate/source/d7/ViewMode.php @@ -7,7 +7,7 @@ * * @MigrateSource( * id = "d7_view_mode", - * source_module = "field" + * source_provider = "field" * ) */ class ViewMode extends FieldInstance { diff --git a/core/modules/file/migration_templates/d6_upload_field.yml b/core/modules/file/migration_templates/d6_upload_field.yml index ecd095949e..a919f918ff 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 - source_module: upload + provider: 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 9af18085f3..36584ccf8e 100644 --- a/core/modules/file/migration_templates/file_settings.yml +++ b/core/modules/file/migration_templates/file_settings.yml @@ -9,7 +9,6 @@ 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 714dec9635..0564b6b788 100644 --- a/core/modules/file/src/Plugin/migrate/source/d6/File.php +++ b/core/modules/file/src/Plugin/migrate/source/d6/File.php @@ -9,8 +9,7 @@ * Drupal 6 file source from database. * * @MigrateSource( - * id = "d6_file", - * source_module = "system" + * id = "d6_file" * ) */ 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 475ce61f7a..4e07a236b5 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_module = "upload" + * source_provider = "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 06c2221292..16fc72f269 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_module = "upload" + * source_provider = "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 5e88151229..e418f825bb 100644 --- a/core/modules/file/src/Plugin/migrate/source/d7/File.php +++ b/core/modules/file/src/Plugin/migrate/source/d7/File.php @@ -10,8 +10,7 @@ * Drupal 7 file source from database. * * @MigrateSource( - * id = "d7_file", - * source_module = "file" + * id = "d7_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 f3182e36c9..d6239fc2e0 100644 --- a/core/modules/filter/migration_templates/d7_filter_settings.yml +++ b/core/modules/filter/migration_templates/d7_filter_settings.yml @@ -6,7 +6,6 @@ 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 de9ab4c238..54b33d48dc 100644 --- a/core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php +++ b/core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php @@ -9,8 +9,7 @@ * Drupal 6 filter source from database. * * @MigrateSource( - * id = "d6_filter_format", - * source_module = "filter" + * id = "d6_filter_format" * ) */ 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 13438f2923..55c2811100 100644 --- a/core/modules/filter/src/Plugin/migrate/source/d7/FilterFormat.php +++ b/core/modules/filter/src/Plugin/migrate/source/d7/FilterFormat.php @@ -9,8 +9,7 @@ * Drupal 7 filter source from database. * * @MigrateSource( - * id = "d7_filter_format", - * source_module = "filter" + * id = "d7_filter_format" * ) */ 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 406eed383e..18ba8d403f 100644 --- a/core/modules/forum/migration_templates/d6_forum_settings.yml +++ b/core/modules/forum/migration_templates/d6_forum_settings.yml @@ -11,7 +11,6 @@ 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 70d690a6e1..086d3e6fc9 100644 --- a/core/modules/forum/migration_templates/d7_forum_settings.yml +++ b/core/modules/forum/migration_templates/d7_forum_settings.yml @@ -11,7 +11,6 @@ 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 354706a55a..bfae4d5bb5 100644 --- a/core/modules/image/migration_templates/d7_image_settings.yml +++ b/core/modules/image/migration_templates/d7_image_settings.yml @@ -8,7 +8,6 @@ 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 662648d7ab..aade9abdb4 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_module = "imagecache" + * source_provider = "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 070cc9bfdc..dab62f3a9e 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_module = "image" + * source_provider = "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 2530ebcee8..abc71f68f9 100644 --- a/core/modules/language/migration_templates/d6_language_negotiation_settings.yml +++ b/core/modules/language/migration_templates/d6_language_negotiation_settings.yml @@ -6,7 +6,6 @@ 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 52289c5de1..05ce3001ec 100644 --- a/core/modules/language/migration_templates/d6_language_types.yml +++ b/core/modules/language/migration_templates/d6_language_types.yml @@ -6,7 +6,6 @@ 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 7e113b83d2..7759965336 100644 --- a/core/modules/language/migration_templates/d7_language_negotiation_settings.yml +++ b/core/modules/language/migration_templates/d7_language_negotiation_settings.yml @@ -7,7 +7,6 @@ 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 10d6ac768b..3a634a2e65 100644 --- a/core/modules/language/migration_templates/d7_language_types.yml +++ b/core/modules/language/migration_templates/d7_language_types.yml @@ -12,7 +12,6 @@ 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 ddb966f5db..6d7604deed 100644 --- a/core/modules/language/migration_templates/default_language.yml +++ b/core/modules/language/migration_templates/default_language.yml @@ -7,7 +7,6 @@ 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 c232675223..fa6a199603 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_module = "locale" + * source_provider = "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 369238c4fc..ab9ba83813 100644 --- a/core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettings.php +++ b/core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettings.php @@ -10,7 +10,6 @@ * * @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 efe87086d5..cb748aec22 100644 --- a/core/modules/language/src/Plugin/migrate/source/d7/LanguageContentSettings.php +++ b/core/modules/language/src/Plugin/migrate/source/d7/LanguageContentSettings.php @@ -10,7 +10,6 @@ * * @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 dbd7b61b78..6eebe20455 100644 --- a/core/modules/locale/migration_templates/locale_settings.yml +++ b/core/modules/locale/migration_templates/locale_settings.yml @@ -8,7 +8,6 @@ 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 2efb8acfd1..338d3ecef9 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,7 +11,6 @@ * * @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 d3b1501cfa..dee5f9ee6c 100644 --- a/core/modules/menu_ui/migration_templates/menu_settings.yml +++ b/core/modules/menu_ui/migration_templates/menu_settings.yml @@ -8,7 +8,6 @@ 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 4342ba72e6..1fd51d70e5 100644 --- a/core/modules/migrate/src/Annotation/MigrateDestination.php +++ b/core/modules/migrate/src/Annotation/MigrateDestination.php @@ -43,15 +43,4 @@ class MigrateDestination extends Plugin { */ public $requirements_met = TRUE; - /** - * Identifies the system handling the data the destination plugin will write. - * - * 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 string - */ - public $destination_module; - } diff --git a/core/modules/migrate/src/Annotation/MigrateSource.php b/core/modules/migrate/src/Annotation/MigrateSource.php index 8445ca014a..95a2431536 100644 --- a/core/modules/migrate/src/Annotation/MigrateSource.php +++ b/core/modules/migrate/src/Annotation/MigrateSource.php @@ -43,15 +43,16 @@ class MigrateSource extends Plugin implements MultipleProviderAnnotationInterfac /** * Identifies the system providing the data the source plugin will read. * - * The source plugin itself determines how the value 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. + * 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. * * @see \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase::checkRequirements * - * @var string + * @var mixed */ - public $source_module; + public $source_provider; /** * Specifies the minimum version of the source provider. @@ -59,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_module. + * module specified by source_provider. * * @var mixed */ diff --git a/core/modules/migrate/src/Plugin/MigrateDestinationInterface.php b/core/modules/migrate/src/Plugin/MigrateDestinationInterface.php index a42d70f4f4..866e80cbe0 100644 --- a/core/modules/migrate/src/Plugin/MigrateDestinationInterface.php +++ b/core/modules/migrate/src/Plugin/MigrateDestinationInterface.php @@ -133,12 +133,4 @@ 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 a40af2e2bc..ef1785e6fb 100644 --- a/core/modules/migrate/src/Plugin/MigrateSourceInterface.php +++ b/core/modules/migrate/src/Plugin/MigrateSourceInterface.php @@ -100,12 +100,4 @@ 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 18d78a325e..b8db601d14 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/Config.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/Config.php @@ -195,26 +195,4 @@ 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 d6c3088817..18a95e6bfb 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php @@ -110,22 +110,4 @@ 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 503b1e3d50..e0ca363fb1 100644 --- a/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php +++ b/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php @@ -541,17 +541,4 @@ 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 8edaeccdea..ceda6d82e4 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,8 +8,7 @@ * A simple migrate source for our tests. * * @MigrateSource( - * id = "migrate_external_translated_test", - * source_module = "migrate_external_translated_test" + * id = "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 deleted file mode 100644 index 8e166998c4..0000000000 --- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php +++ /dev/null @@ -1,64 +0,0 @@ -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 $plugin_manager */ - $plugin_manager = $this->container->get('plugin.manager.migration'); - // Get all the migrations - $migrations = $plugin_manager->createInstances(array_keys($plugin_manager->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 445441befd..ffff6269cd 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_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']) { + 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']) { 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_module'] . ' is not enabled in the source site.', ['source_module' => $this->pluginDefinition['source_module']]); + throw new RequirementsException('The module ' . $this->pluginDefinition['source_provider'] . ' is not enabled in the source site.', ['source_provider' => $this->pluginDefinition['source_provider']]); } } } diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/VariableTranslation.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/VariableTranslation.php deleted file mode 100644 index 566a8402e0..0000000000 --- a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/VariableTranslation.php +++ /dev/null @@ -1,100 +0,0 @@ -variables = $this->configuration['variables']; - } - - /** - * {@inheritdoc} - */ - protected function initializeIterator() { - return new \ArrayIterator($this->values()); - } - - /** - * Return the values of the variables specified in the plugin configuration. - * - * @return array - * An associative array where the keys are the variables specified in the - * plugin configuration and the values are the values found in the source. - * A key/value pair is added for the language code. Only those values are - * returned that are actually in the database. - */ - protected function values() { - $values = []; - $result = $this->prepareQuery()->execute()->FetchAllAssoc('language'); - foreach ($result as $i18n_variable) { - $values[]['language'] = $i18n_variable->language; - } - $result = $this->prepareQuery()->execute()->FetchAll(); - foreach ($result as $i18n_variable) { - foreach ($values as $key => $value) { - if ($values[$key]['language'] === $i18n_variable->language) { - $values[$key][$i18n_variable->name] = unserialize($i18n_variable->value); - break; - } - } - } - return $values; - } - - /** - * {@inheritdoc} - */ - public function count() { - return $this->initializeIterator()->count(); - } - - /** - * {@inheritdoc} - */ - public function fields() { - return array_combine($this->variables, $this->variables); - } - - /** - * {@inheritdoc} - */ - public function query() { - return $this->getDatabase() - ->select('i18n_variable', 'v') - ->fields('v') - ->condition('name', (array) $this->configuration['variables'], 'IN'); - } - - /** - * {@inheritdoc} - */ - public function getIds() { - $ids['language']['type'] = 'string'; - return $ids; - } - -} diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/i18nVariable.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/i18nVariable.php index dd8d0f0741..93832aa75b 100644 --- a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/i18nVariable.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/i18nVariable.php @@ -2,7 +2,10 @@ namespace Drupal\migrate_drupal\Plugin\migrate\source\d6; -@trigger_error('The ' . __NAMESPACE__ . '\i18nVariable is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use ' . __NAMESPACE__ . '\VariableTranslation', E_USER_DEPRECATED); +use Drupal\Core\Entity\EntityManagerInterface; +use Drupal\Core\State\StateInterface; +use Drupal\migrate\Plugin\MigrationInterface; +use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase; /** * Drupal i18n_variable source from database. @@ -10,10 +13,88 @@ * @MigrateSource( * id = "i18n_variable" * ) - * - * @deprecated in Drupal 8.4.x and will be removed in Drupal 9.0.x. Use - * \Drupal\migrate_drupal\Plugin\migrate\source\d6\VariableTranslation instead. - * - * @see https://www.drupal.org/node/2898649 */ -class i18nVariable extends VariableTranslation {} +class i18nVariable extends DrupalSqlBase { + + /** + * The variable names to fetch. + * + * @var array + */ + protected $variables; + + /** + * {@inheritdoc} + */ + public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, StateInterface $state, EntityManagerInterface $entity_manager) { + parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $state, $entity_manager); + $this->variables = $this->configuration['variables']; + } + + /** + * {@inheritdoc} + */ + protected function initializeIterator() { + return new \ArrayIterator($this->values()); + } + + /** + * Return the values of the variables specified in the plugin configuration. + * + * @return array + * An associative array where the keys are the variables specified in the + * plugin configuration and the values are the values found in the source. + * A key/value pair is added for the language code. Only those values are + * returned that are actually in the database. + */ + protected function values() { + $values = []; + $result = $this->prepareQuery()->execute()->FetchAllAssoc('language'); + foreach ($result as $i18n_variable) { + $values[]['language'] = $i18n_variable->language; + } + $result = $this->prepareQuery()->execute()->FetchAll(); + foreach ($result as $i18n_variable) { + foreach ($values as $key => $value) { + if ($values[$key]['language'] === $i18n_variable->language) { + $values[$key][$i18n_variable->name] = unserialize($i18n_variable->value); + break; + } + } + } + return $values; + } + + /** + * {@inheritdoc} + */ + public function count() { + return $this->initializeIterator()->count(); + } + + /** + * {@inheritdoc} + */ + public function fields() { + return array_combine($this->variables, $this->variables); + } + + /** + * {@inheritdoc} + */ + public function query() { + return $this->getDatabase() + ->select('i18n_variable', 'v') + ->fields('v') + ->condition('name', (array) $this->configuration['variables'], 'IN'); + } + + /** + * {@inheritdoc} + */ + public function getIds() { + $ids['language']['type'] = 'string'; + return $ids; + } + +} 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 ebd9334a2d..6dd5925748 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_module'] = 'module1'; + $plugin_definition['source_provider'] = '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_module' => 'module1'], $e->getRequirements()); + $this->assertEquals(['source_provider' => 'module1'], $e->getRequirements()); // Re-throw so PHPUnit can assert the exception. throw $e; } diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/d6/VariableTranslationTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/d6/VariableTranslationTest.php deleted file mode 100644 index 152706798c..0000000000 --- a/core/modules/migrate_drupal/tests/src/Unit/source/d6/VariableTranslationTest.php +++ /dev/null @@ -1,61 +0,0 @@ - 'test', - 'highWaterProperty' => ['field' => 'test'], - 'source' => [ - 'plugin' => 'variable_translation', - 'variables' => [ - 'site_slogan', - 'site_name', - ], - ], - ]; - - /** - * Expected results from the source. - */ - protected $expectedResults = [ - [ - 'language' => 'fr', - 'site_slogan' => 'Migrate est génial', - 'site_name' => 'nom de site', - ], - [ - 'language' => 'mi', - 'site_slogan' => 'Ko whakamataku heke', - 'site_name' => 'ingoa_pae', - ] - ]; - - /** - * Database contents for tests. - */ - protected $databaseContents = [ - 'i18n_variable' => [ - ['name' => 'site_slogan', 'language' => 'fr', 'value' => 's:19:"Migrate est génial";'], - ['name' => 'site_name', 'language' => 'fr', 'value' => 's:11:"nom de site";'], - ['name' => 'site_slogan', 'language' => 'mi', 'value' => 's:19:"Ko whakamataku heke";'], - ['name' => 'site_name', 'language' => 'mi', 'value' => 's:9:"ingoa_pae";'], - ], - ]; - -} diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/d6/i18nVariableTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/d6/i18nVariableTest.php index d1905b0e6c..06059cfd53 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/source/d6/i18nVariableTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/source/d6/i18nVariableTest.php @@ -8,7 +8,6 @@ * Tests the variable source plugin. * * @group migrate_drupal - * @group legacy */ class i18nVariableTest extends MigrateSqlSourceTestCase { diff --git a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php index 0d9b53e531..c87247eb36 100644 --- a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php +++ b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php @@ -20,6 +20,670 @@ 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. * @@ -142,26 +806,16 @@ public function buildOverviewForm(array $form, FormStateInterface $form_state) { } else { $form['info_header'] = [ - '#markup' => '

' . $this->t('Upgrade a site by importing its database and files into a clean and empty new install of Drupal 8. See the Drupal site upgrades handbook for more information.', [ + '#markup' => '

' . $this->t('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.', [ ':url' => 'https://www.drupal.org/upgrade/migrate', ]), ]; - $legend[] = $this->t('Old site: the site you want to upgrade.'); - $legend[] = $this->t('New site: this empty Drupal 8 installation you will import the old site to.'); - - $form['legend'] = [ - '#theme' => 'item_list', - '#title' => $this->t('Definitions'), - '#list_type' => 'ul', - '#items' => $legend, - ]; - - $info[] = $this->t('You may need multiple tries for a successful upgrade so backup the database for this new site. The upgrade will change it and you may want to revert to its initial state.'); - $info[] = $this->t('Make sure that access to the database for the old site is available from this new site.'); - $info[] = $this->t('If the old site has private files, a copy of its files directory must also be accessible on the host of this new site.'); - $info[] = $this->t('Enable all modules on this new site that are enabled on the old site. For example, if the old site uses the book module, then enable the book module on this new site so that the existing data can be imported to it.'); - $info[] = $this->t('Do not add any content to the new site before upgrading. Any existing content is likely to be overwritten by the upgrade process. See the upgrade preparation guide.', [ + $info[] = $this->t('Back up the database for this site. Upgrade will change the database for this site.'); + $info[] = $this->t('Make sure that the host this site is on has access to the database for your previous site.'); + $info[] = $this->t('If your previous site has private files to be migrated, a copy of your files directory must be accessible on the host this site is on.'); + $info[] = $this->t('In general, enable all modules on this site that are enabled on the previous site. For example, if you have used the book module on the previous site then you must enable the book module on this site for that data to be available on this site.'); + $info[] = $this->t('Do not add any information on this site (including but not limited to user accounts, taxonomy terms, and node content) before upgrading. Any pre-existing information on the site risks being overwritten by the upgrade process. See the upgrade preparation guide for more information.', [ ':url' => 'https://www.drupal.org/docs/8/upgrade/preparing-an-upgrade#dont_create_content', ]); $info[] = $this->t('Put this site into maintenance mode.', [ @@ -170,13 +824,12 @@ public function buildOverviewForm(array $form, FormStateInterface $form_state) { $form['info'] = [ '#theme' => 'item_list', - '#title' => $this->t('Steps to prepare for the upgrade'), '#list_type' => 'ol', '#items' => $info, ]; $form['info_footer'] = [ - '#markup' => '

' . $this->t('The upgrade can take a long time. It is better to upgrade from a local copy of your site instead of directly from your live site.'), + '#markup' => '

' . $this->t('This upgrade can take a long time. It is better to import a local copy of your site instead of directly importing from your live site.'), ]; $validate = []; @@ -401,15 +1054,10 @@ 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); - if ($version == 6) { - $form_state->set('source_base_path', $form_state->getValue('d6_source_base_path')); - } - else { - $form_state->set('source_base_path', $form_state->getValue('source_base_path')); - } + $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')); + // Store the retrived system data in form storage. $form_state->set('system_data', $system_data); } @@ -455,24 +1103,19 @@ 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 = []; - 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'); + $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'); } - if ($source_module && $destination_module) { - $table_data[$source_module][$destination_module][$migration_id] = $migration->label(); - } + // 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; } // Sort the table by source module names and within that destination // module names. @@ -480,9 +1123,6 @@ 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 80a3c2fdab..4aea3f1d09 100644 --- a/core/modules/migrate_drupal_ui/src/Tests/MigrateUpgradeTestBase.php +++ b/core/modules/migrate_drupal_ui/src/Tests/MigrateUpgradeTestBase.php @@ -44,7 +44,6 @@ 'book', 'forum', 'statistics', - 'modules_available_test', ]; /** @@ -119,7 +118,7 @@ protected function tearDown() { public function testMigrateUpgrade() { $connection_options = $this->sourceDatabase->getConnectionOptions(); $this->drupalGet('/upgrade'); - $this->assertText('Upgrade a site by importing its database and files into a clean and empty new install of Drupal 8.'); + $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.'); @@ -150,30 +149,6 @@ 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 its database and files into a clean and empty new install of Drupal 8.'); - - $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 deleted file mode 100644 index 49b7dce9b5..0000000000 --- a/core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/migration_provider_test.info.yml +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index bdc906660b..0000000000 --- a/core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/migration_templates/migration_provider_no_annotation.yml +++ /dev/null @@ -1,13 +0,0 @@ -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 deleted file mode 100644 index d3afc66539..0000000000 --- a/core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/migration_templates/migration_provider_test.yml +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 0fc3063bb6..0000000000 --- a/core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/src/Plugin/migrate/source/NoSourceModule.php +++ /dev/null @@ -1,31 +0,0 @@ -sourceDatabase->getConnectionOptions(); $this->drupalGet('/upgrade'); - $this->assertSession()->responseContains('Upgrade a site by importing its database and files into a clean and empty new install of Drupal 8.'); + $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.'); @@ -131,15 +130,10 @@ public function testMigrateUpgrade() { $version = $this->getLegacyDrupalVersion($this->sourceDatabase); $edit = [ $driver => $connection_options, + 'source_base_path' => $this->getSourceBasePath(), 'source_private_file_path' => $this->getSourceBasePath(), 'version' => $version, ]; - if ($version == 6) { - $edit['d6_source_base_path'] = $this->getSourceBasePath(); - } - else { - $edit['source_base_path'] = $this->getSourceBasePath(); - } if (count($drivers) !== 1) { $edit['driver'] = $driver; } @@ -153,31 +147,6 @@ 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->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()->responseContains('Upgrade a site by importing its database and files into a clean and empty new install of Drupal 8.'); - - $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 98b09fbc4b..17b08573f5 100644 --- a/core/modules/node/migration_templates/d6_node_settings.yml +++ b/core/modules/node/migration_templates/d6_node_settings.yml @@ -6,7 +6,6 @@ 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 4bf36da736..605ac9e587 100644 --- a/core/modules/node/migration_templates/d6_node_translation.yml +++ b/core/modules/node/migration_templates/d6_node_translation.yml @@ -6,7 +6,6 @@ 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. @@ -42,7 +41,6 @@ process: destination: plugin: entity:node translations: true - destination_module: content_translation migration_dependencies: required: - d6_user @@ -54,3 +52,5 @@ migration_dependencies: - d6_field_instance_widget_settings - d6_field_formatter_settings - d6_upload_field_instance +provider: migrate_drupal +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 46eec7c035..04617544c9 100644 --- a/core/modules/node/migration_templates/d7_node_settings.yml +++ b/core/modules/node/migration_templates/d7_node_settings.yml @@ -6,7 +6,6 @@ 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 856f34505e..ba9227ed76 100644 --- a/core/modules/node/migration_templates/d7_node_translation.yml +++ b/core/modules/node/migration_templates/d7_node_translation.yml @@ -7,7 +7,6 @@ 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. @@ -33,7 +32,6 @@ destination: translations: true content_translation_update_definitions: - node - destination_module: content_translation migration_dependencies: required: - d7_user @@ -41,3 +39,5 @@ migration_dependencies: - language optional: - d7_field_instance +provider: migrate_drupal +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 d20545f2e2..14399b77ae 100644 --- a/core/modules/node/src/Plugin/migrate/source/d6/Node.php +++ b/core/modules/node/src/Plugin/migrate/source/d6/Node.php @@ -15,9 +15,7 @@ * Drupal 6 node source from database. * * @MigrateSource( - * id = "d6_node", - * source_module = "node" - * + * id = "d6_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 a0103fc00f..f3296c234d 100644 --- a/core/modules/node/src/Plugin/migrate/source/d6/NodeRevision.php +++ b/core/modules/node/src/Plugin/migrate/source/d6/NodeRevision.php @@ -7,8 +7,7 @@ * Drupal 6 node revision source from database. * * @MigrateSource( - * id = "d6_node_revision", - * source_module = "node" + * id = "d6_node_revision" * ) */ 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 5ec0aaeca4..b5a66ce7e2 100644 --- a/core/modules/node/src/Plugin/migrate/source/d6/NodeType.php +++ b/core/modules/node/src/Plugin/migrate/source/d6/NodeType.php @@ -9,8 +9,7 @@ * Drupal 6 Node types source from database. * * @MigrateSource( - * id = "d6_node_type", - * source_module = "node" + * id = "d6_node_type" * ) */ 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 434007a0a2..b5a6d4d982 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_module = "content" + * source_provider = "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 1a9037e7a0..451905cd96 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_module = "node" + * source_provider = "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 67071a72fc..89c1bcca5e 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_module = "node" + * source_provider = "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 7f8290f245..a0b2273b80 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_module = "node" + * source_provider = "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 c01d364733..3e1f624d27 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_module = "path" + * source_provider = "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 58405fdf19..eaaea16608 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_module = "path" + * source_provider = "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 1500a3f06e..28f860060a 100644 --- a/core/modules/search/migration_templates/d6_search_settings.yml +++ b/core/modules/search/migration_templates/d6_search_settings.yml @@ -10,7 +10,6 @@ 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 74f0ef719e..57db8b9456 100644 --- a/core/modules/search/migration_templates/d7_search_settings.yml +++ b/core/modules/search/migration_templates/d7_search_settings.yml @@ -13,7 +13,6 @@ 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 fc9b410afe..8ddc02acfb 100644 --- a/core/modules/search/migration_templates/search_page.yml +++ b/core/modules/search/migration_templates/search_page.yml @@ -16,7 +16,6 @@ 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 ac2c63f29d..444c38feb9 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_module = "shortcut" + * source_provider = "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 7a3ed8ac53..a088ca8efb 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_module = "shortcut" + * source_provider = "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 c4d54e9fd0..b86dccde16 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_module = "shortcut" + * source_provider = "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 ec5e2f262b..c9eedbb265 100644 --- a/core/modules/simpletest/migration_templates/d6_simpletest_settings.yml +++ b/core/modules/simpletest/migration_templates/d6_simpletest_settings.yml @@ -10,7 +10,6 @@ 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 f5e9357466..b77f76a329 100644 --- a/core/modules/simpletest/migration_templates/d7_simpletest_settings.yml +++ b/core/modules/simpletest/migration_templates/d7_simpletest_settings.yml @@ -10,7 +10,6 @@ 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 429d7e11c9..1f5b5bbd0e 100644 --- a/core/modules/statistics/migration_templates/statistics_settings.yml +++ b/core/modules/statistics/migration_templates/statistics_settings.yml @@ -9,7 +9,6 @@ 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 5426271b4a..86a7017d00 100644 --- a/core/modules/syslog/migration_templates/d6_syslog_settings.yml +++ b/core/modules/syslog/migration_templates/d6_syslog_settings.yml @@ -7,7 +7,6 @@ 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 357b38a63b..4000572226 100644 --- a/core/modules/syslog/migration_templates/d7_syslog_settings.yml +++ b/core/modules/syslog/migration_templates/d7_syslog_settings.yml @@ -8,7 +8,6 @@ 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 b28128015c..71257d4fc5 100644 --- a/core/modules/system/migration_templates/d6_date_formats.yml +++ b/core/modules/system/migration_templates/d6_date_formats.yml @@ -8,7 +8,6 @@ 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 bf1f6b331d..7dd3a2bcec 100644 --- a/core/modules/system/migration_templates/d6_system_cron.yml +++ b/core/modules/system/migration_templates/d6_system_cron.yml @@ -8,7 +8,6 @@ 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 7da96c3488..25f6728ae1 100644 --- a/core/modules/system/migration_templates/d6_system_date.yml +++ b/core/modules/system/migration_templates/d6_system_date.yml @@ -8,7 +8,6 @@ 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 902b0e4477..60cd61600b 100644 --- a/core/modules/system/migration_templates/d6_system_file.yml +++ b/core/modules/system/migration_templates/d6_system_file.yml @@ -7,7 +7,6 @@ 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 87811c36b8..70a03d61e7 100644 --- a/core/modules/system/migration_templates/d6_system_performance.yml +++ b/core/modules/system/migration_templates/d6_system_performance.yml @@ -10,7 +10,6 @@ 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 9b5ff83f5a..42c5177d43 100644 --- a/core/modules/system/migration_templates/d7_global_theme_settings.yml +++ b/core/modules/system/migration_templates/d7_global_theme_settings.yml @@ -6,7 +6,6 @@ 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 ca09567ab2..f2680c91cf 100644 --- a/core/modules/system/migration_templates/d7_system_authorize.yml +++ b/core/modules/system/migration_templates/d7_system_authorize.yml @@ -6,7 +6,6 @@ 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 55021c9de9..a603af3e91 100644 --- a/core/modules/system/migration_templates/d7_system_cron.yml +++ b/core/modules/system/migration_templates/d7_system_cron.yml @@ -7,7 +7,6 @@ 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 f860b07c80..38d8107a3f 100644 --- a/core/modules/system/migration_templates/d7_system_date.yml +++ b/core/modules/system/migration_templates/d7_system_date.yml @@ -11,7 +11,6 @@ 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 9652cb0e51..2295e0e10c 100644 --- a/core/modules/system/migration_templates/d7_system_file.yml +++ b/core/modules/system/migration_templates/d7_system_file.yml @@ -7,7 +7,6 @@ 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 520437472c..40146b80f3 100644 --- a/core/modules/system/migration_templates/d7_system_mail.yml +++ b/core/modules/system/migration_templates/d7_system_mail.yml @@ -6,7 +6,6 @@ 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 0f28dbfc6d..abeb008674 100644 --- a/core/modules/system/migration_templates/d7_system_performance.yml +++ b/core/modules/system/migration_templates/d7_system_performance.yml @@ -9,7 +9,6 @@ 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 1f5612f766..7bb16b1b78 100644 --- a/core/modules/system/migration_templates/system_image.yml +++ b/core/modules/system/migration_templates/system_image.yml @@ -7,7 +7,6 @@ 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 28e0ab71ee..685116eeb6 100644 --- a/core/modules/system/migration_templates/system_image_gd.yml +++ b/core/modules/system/migration_templates/system_image_gd.yml @@ -7,7 +7,6 @@ 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 eea3473bf8..c1e81141c7 100644 --- a/core/modules/system/migration_templates/system_logging.yml +++ b/core/modules/system/migration_templates/system_logging.yml @@ -7,7 +7,6 @@ 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 183fa10835..b9f6c34820 100644 --- a/core/modules/system/migration_templates/system_maintenance.yml +++ b/core/modules/system/migration_templates/system_maintenance.yml @@ -7,7 +7,6 @@ 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 d6ff5bc4bf..92ce45a617 100644 --- a/core/modules/system/migration_templates/system_rss.yml +++ b/core/modules/system/migration_templates/system_rss.yml @@ -8,7 +8,6 @@ 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 397823c2b5..c8fd849067 100644 --- a/core/modules/system/migration_templates/system_site.yml +++ b/core/modules/system/migration_templates/system_site.yml @@ -16,7 +16,6 @@ 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 a97878fa4a..c55bc4bb7f 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_module = "menu" + * source_provider = "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 6ae17beabe..5561a9a53f 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_module = "system" + * source_provider = "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 28505db58a..c20372c690 100644 --- a/core/modules/taxonomy/migration_templates/taxonomy_settings.yml +++ b/core/modules/taxonomy/migration_templates/taxonomy_settings.yml @@ -8,7 +8,6 @@ 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 9c7443b40f..53ca632c9c 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_module = "taxonomy" + * source_provider = "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 d43ed166d2..9170cd8ae3 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_module = "taxonomy" + * source_provider = "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 4171cceb4f..2b1c806f2b 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_module = "taxonomy" + * source_provider = "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 96d30d48af..91c133bc6c 100644 --- a/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermNodeRevision.php +++ b/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermNodeRevision.php @@ -6,8 +6,7 @@ * Source returning tids from the term_node table for the non-current revision. * * @MigrateSource( - * id = "d6_term_node_revision", - * source_module = "taxonomy" + * id = "d6_term_node_revision" * ) */ 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 f8c601d8eb..8924c33a18 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_module = "taxonomy" + * source_provider = "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 ba736ea8ac..40a0094afe 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_module = "taxonomy" + * source_provider = "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 c8f4ef85de..a6edd05e94 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_module = "i18ntaxonomy" + * source_provider = "taxonomy" * ) */ 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 a9711a1b66..518b9f7a41 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_module = "taxonomy" + * source_provider = "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 cc1afa9035..31103a8be1 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_module = "taxonomy" + * source_provider = "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 a38de856d7..45d426da35 100644 --- a/core/modules/text/migration_templates/text_settings.yml +++ b/core/modules/text/migration_templates/text_settings.yml @@ -7,7 +7,6 @@ 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 ac61d7dbe2..ce06cbd84a 100644 --- a/core/modules/tracker/migration_templates/d7_tracker_settings.yml +++ b/core/modules/tracker/migration_templates/d7_tracker_settings.yml @@ -6,7 +6,6 @@ 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 2805b7d754..ffdc5cd332 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_module = "tracker" + * source_provider = "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 4991dbe221..9ce3ff3166 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_module = "tracker" + * source_provider = "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 a7adfd7dc6..ad22472355 100644 --- a/core/modules/update/migration_templates/update_settings.yml +++ b/core/modules/update/migration_templates/update_settings.yml @@ -11,7 +11,6 @@ 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 9b25b943f7..b06b6ea214 100644 --- a/core/modules/user/migration_templates/d6_user_mail.yml +++ b/core/modules/user/migration_templates/d6_user_mail.yml @@ -19,7 +19,6 @@ 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 2dfa946fcb..6e25ece376 100644 --- a/core/modules/user/migration_templates/d6_user_settings.yml +++ b/core/modules/user/migration_templates/d6_user_settings.yml @@ -10,7 +10,6 @@ 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 db08753451..ae00ce08cf 100644 --- a/core/modules/user/migration_templates/d7_user_flood.yml +++ b/core/modules/user/migration_templates/d7_user_flood.yml @@ -10,7 +10,6 @@ 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 81051ef47f..0c5e74c32b 100644 --- a/core/modules/user/migration_templates/d7_user_mail.yml +++ b/core/modules/user/migration_templates/d7_user_mail.yml @@ -19,7 +19,6 @@ 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 7f7134de92..ff8bd82749 100644 --- a/core/modules/user/migration_templates/user_picture_field.yml +++ b/core/modules/user/migration_templates/user_picture_field.yml @@ -12,7 +12,6 @@ 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 93a0430d68..151d5017de 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_module = "profile" + * source_provider = "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 b7013bae08..67083f5f6a 100644 --- a/core/modules/user/src/Plugin/migrate/source/UserPictureInstance.php +++ b/core/modules/user/src/Plugin/migrate/source/UserPictureInstance.php @@ -11,8 +11,7 @@ * @todo Support default picture? * * @MigrateSource( - * id = "user_picture_instance", - * source_module = "user" + * id = "user_picture_instance" * ) */ 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 ac4929092d..80db9df969 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_module = "profile" + * source_provider = "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 a809b07dc0..82ad3e9932 100644 --- a/core/modules/user/src/Plugin/migrate/source/d6/Role.php +++ b/core/modules/user/src/Plugin/migrate/source/d6/Role.php @@ -9,8 +9,7 @@ * Drupal 6 role source from database. * * @MigrateSource( - * id = "d6_user_role", - * source_module = "user" + * id = "d6_user_role" * ) */ 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 5213534b42..c8e9d19a70 100644 --- a/core/modules/user/src/Plugin/migrate/source/d6/User.php +++ b/core/modules/user/src/Plugin/migrate/source/d6/User.php @@ -9,8 +9,7 @@ * Drupal 6 user source from database. * * @MigrateSource( - * id = "d6_user", - * source_module = "user" + * id = "d6_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 0d5bd6bcb3..6b16ad4009 100644 --- a/core/modules/user/src/Plugin/migrate/source/d6/UserPicture.php +++ b/core/modules/user/src/Plugin/migrate/source/d6/UserPicture.php @@ -10,8 +10,7 @@ * @todo Support default picture? * * @MigrateSource( - * id = "d6_user_picture", - * source_module = "user" + * id = "d6_user_picture" * ) */ 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 72d18fd08f..8952ffdf82 100644 --- a/core/modules/user/src/Plugin/migrate/source/d6/UserPictureFile.php +++ b/core/modules/user/src/Plugin/migrate/source/d6/UserPictureFile.php @@ -9,8 +9,7 @@ * Drupal 6 user picture source from database. * * @MigrateSource( - * id = "d6_user_picture_file", - * source_module = "user" + * id = "d6_user_picture_file" * ) */ 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 7950991a8f..9245aab969 100644 --- a/core/modules/user/src/Plugin/migrate/source/d7/Role.php +++ b/core/modules/user/src/Plugin/migrate/source/d7/Role.php @@ -9,8 +9,7 @@ * Drupal 7 role source from database. * * @MigrateSource( - * id = "d7_user_role", - * source_module = "user" + * id = "d7_user_role" * ) */ 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 41f9ab4d6e..408d998803 100644 --- a/core/modules/user/src/Plugin/migrate/source/d7/User.php +++ b/core/modules/user/src/Plugin/migrate/source/d7/User.php @@ -9,8 +9,7 @@ * Drupal 7 user source from database. * * @MigrateSource( - * id = "d7_user", - * source_module = "user" + * id = "d7_user" * ) */ class User extends FieldableEntity { diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index 5b07e1e868..bbed7e3e04 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -130,7 +130,6 @@ - diff --git a/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php b/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php index c514b2e652..06653f6c3e 100644 --- a/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php +++ b/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php @@ -94,7 +94,7 @@ public function providerInvalidArgumentsUrlConversion() { * * @dataProvider providerGetConnectionInfoAsUrl */ - public function testGetConnectionInfoAsUrl(array $info, $expected_url) { + public function testGetConnectionInfoAsUrl(Array $info, $expected_url) { Database::addConnectionInfo('default', 'default', $info); $url = Database::getConnectionInfoAsUrl();