diff --git a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php index 810e02a..6e27268 100644 --- a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php +++ b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php @@ -69,7 +69,13 @@ class MigrateUpgradeForm extends ConfirmFormBase { protected $moduleHandler; /** - * List of modules that do not need an upgrade path. + * List of extensions that do not need an upgrade path. + * + * This property is an array where the keys are the version of Drupal from + * which we are upgrading and the values are arrays of extensions that do not + * need an upgrade path. + * + * @var array[] */ protected $noUpgradePaths = [ '6' => [ @@ -725,9 +731,9 @@ public function buildConfirmForm(array $form, FormStateInterface $form_state) { // Add source_module and destination_module for modules that do not need an // upgrade path and are enabled on the source site. $no_upgrade_paths = $form_state->get('no_upgrade_paths'); - foreach ($no_upgrade_paths[$version] as $no_upgrade_path) { - if ($system_data['module'][$no_upgrade_path]['status']) { - $table_data[$no_upgrade_path]['core'][$no_upgrade_path] = $no_upgrade_path; + foreach ($no_upgrade_paths[$version] as $extension) { + if ($system_data['module'][$extension]['status']) { + $table_data[$extension]['core'][$extension] = $extension; } } diff --git a/core/modules/migrate_drupal_ui/tests/modules/upgrade_form_alter_test/upgrade_form_alter_test.module b/core/modules/migrate_drupal_ui/tests/modules/upgrade_form_alter_test/upgrade_form_alter_test.module index 36878fc..8855721 100644 --- a/core/modules/migrate_drupal_ui/tests/modules/upgrade_form_alter_test/upgrade_form_alter_test.module +++ b/core/modules/migrate_drupal_ui/tests/modules/upgrade_form_alter_test/upgrade_form_alter_test.module @@ -10,7 +10,7 @@ /** * Implements hook_form_FORM_ID_alter(). */ -function upgrade_form_alter_test_form_migrate_drupal_ui_form_alter(&$form, FormStateInterface $form_state, $form_id) { +function upgrade_form_alter_test_form_migrate_drupal_ui_form_alter(array &$form, FormStateInterface $form_state, $form_id) { $no_upgrade_paths = $form_state->get('no_upgrade_paths'); $no_upgrade_paths['6'][] = 'event'; $no_upgrade_paths['7'][] = 'book'; diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php index 5e3b83c..d8773e2 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php @@ -130,7 +130,7 @@ protected function getAvailablePaths() { 'variable_admin', // To test that contrib modules can alter this list, Event is added here // by a hook_form_alter(). - // See upgrade_form_alter_test_form_migrate_drupal_ui_form_alter(). + // @see upgrade_form_alter_test_form_migrate_drupal_ui_form_alter(). 'event', ]; } @@ -142,8 +142,7 @@ protected function getMissingPaths() { return [ // To test that contrib modules can alter this list, Event is removed from // here by a hook_form_alter(). - // See upgrade_form_alter_test_form_migrate_drupal_ui_form_alter(). - // 'event', + // @see upgrade_form_alter_test_form_migrate_drupal_ui_form_alter(). 'i18nblocks', 'i18ncck', 'i18ncontent', diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7Test.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7Test.php index 0cbd239..c344c88 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7Test.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7Test.php @@ -136,7 +136,7 @@ protected function getAvailablePaths() { 'trigger', // To test that contrib modules can alter this list, Book is added here // by a hook_form_alter(). - // See upgrade_form_alter_test_form_migrate_drupal_ui_form_alter(). + // @see upgrade_form_alter_test_form_migrate_drupal_ui_form_alter(). 'book', ]; } @@ -148,8 +148,7 @@ protected function getMissingPaths() { return [ // To test that contrib modules can alter this list, Book is removed from // here by a hook_form_alter(). - // See upgrade_form_alter_test_form_migrate_drupal_ui_form_alter(). - // 'book', + // @see upgrade_form_alter_test_form_migrate_drupal_ui_form_alter(). 'color', 'rdf', ];