diff --git a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php index ca5a51326f..04da0f588c 100644 --- a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php +++ b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php @@ -95,6 +95,7 @@ class MigrateUpgradeForm extends ConfirmFormBase { 'date_tools', 'datepicker', 'ddblock', + 'event', 'fieldgroup', 'filefield_meta', 'help', @@ -122,7 +123,6 @@ class MigrateUpgradeForm extends ConfirmFormBase { ], '7' => [ 'blog', - 'book', 'bulk_export', 'contextual', 'ctools', @@ -142,6 +142,7 @@ class MigrateUpgradeForm extends ConfirmFormBase { 'entity', 'entity_feature', 'entity_token', + 'entityreference', 'field_ui', 'help', 'openid', @@ -255,9 +256,6 @@ public function submitForm(array &$form, FormStateInterface $form_state) { public function buildOverviewForm(array $form, FormStateInterface $form_state) { $form['#title'] = $this->t('Upgrade'); - // Add the no upgrade path array to the form state so it can be altered. - $form_state->set('no_upgrade_paths', $this->noUpgradePaths); - if ($date_performed = $this->state->get('migrate_drupal_ui.performed')) { // @todo Add back support for rollbacks and incremental migrations. // https://www.drupal.org/node/2687843 @@ -773,8 +771,7 @@ 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 $extension) { + foreach ($this->noUpgradePaths[$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.info.yml b/core/modules/migrate_drupal_ui/tests/modules/upgrade_form_alter_test/upgrade_form_alter_test.info.yml deleted file mode 100644 index c6b66cdb34..0000000000 --- a/core/modules/migrate_drupal_ui/tests/modules/upgrade_form_alter_test/upgrade_form_alter_test.info.yml +++ /dev/null @@ -1,6 +0,0 @@ -name: 'Upgrade form alter test' -type: module -description: 'Tests that contrib modules can alter the upgrade form.' -package: Testing -version: VERSION -core: 8.x 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 deleted file mode 100644 index 8855721dc3..0000000000 --- a/core/modules/migrate_drupal_ui/tests/modules/upgrade_form_alter_test/upgrade_form_alter_test.module +++ /dev/null @@ -1,18 +0,0 @@ -get('no_upgrade_paths'); - $no_upgrade_paths['6'][] = 'event'; - $no_upgrade_paths['7'][] = 'book'; - $form_state->set('no_upgrade_paths', $no_upgrade_paths); -} diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6ReviewPageTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6ReviewPageTest.php index ddcbc713e7..22669f9267 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6ReviewPageTest.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6ReviewPageTest.php @@ -2,6 +2,7 @@ namespace Drupal\Tests\migrate_drupal_ui\Functional\d6; +use Drupal\migrate_drupal_ui\Form\MigrateUpgradeForm; use Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeReviewPageTestBase; /** @@ -35,7 +36,6 @@ protected function getAvailablePaths() { 'aggregator', 'block', 'book', - 'color', 'comment', 'contact', 'content', @@ -72,6 +72,7 @@ protected function getAvailablePaths() { 'blog', 'blogapi', 'calendarsignup', + 'color', 'content_copy', 'content_multigroup', 'content_permissions', @@ -84,6 +85,7 @@ protected function getAvailablePaths() { 'date_tools', 'datepicker', 'ddblock', + 'event', 'fieldgroup', 'filefield_meta', 'help', @@ -119,7 +121,6 @@ protected function getMissingPaths() { 'devel', 'devel_generate', 'devel_node_access', - 'event', 'i18nblocks', 'i18ncck', 'i18ncontent', 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 dfdf5623db..474a9a9897 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 @@ -29,7 +29,6 @@ class MigrateUpgrade6Test extends MigrateUpgradeExecuteTestBase { 'forum', 'statistics', 'migration_provider_test', - 'upgrade_form_alter_test', ]; /** @@ -139,6 +138,7 @@ protected function getAvailablePaths() { // in MigrateUpgradeForm. 'date_api', 'date_timezone', + 'event', 'i18n', 'i18nstrings', 'imageapi', @@ -146,10 +146,6 @@ protected function getAvailablePaths() { 'php', 'profile', '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(). - 'event', ]; } @@ -158,9 +154,6 @@ protected function getAvailablePaths() { */ 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(). 'i18nblocks', 'i18ncck', 'i18ncontent', diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7ReviewPageTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7ReviewPageTest.php index 2c2181aad2..b8ea52b43f 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7ReviewPageTest.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7ReviewPageTest.php @@ -69,7 +69,6 @@ protected function getAvailablePaths() { // Include modules that do not have an upgrade path, defined in the // $noUpgradePath property in MigrateUpgradeForm. 'blog', - 'book', 'bulk_export', 'contextual', 'ctools', @@ -103,8 +102,8 @@ protected function getAvailablePaths() { 'simpletest', 'stylizer', 'term_depth', - 'translation', 'toolbar', + 'translation', 'trigger', 'views_content', 'views_ui', @@ -116,9 +115,7 @@ protected function getAvailablePaths() { */ 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', 'color', 'rdf', 'views', 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 4955acbd24..2b31a7990b 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 @@ -30,7 +30,6 @@ class MigrateUpgrade7Test extends MigrateUpgradeExecuteTestBase { 'forum', 'statistics', 'migration_provider_test', - 'upgrade_form_alter_test', ]; /** @@ -147,10 +146,6 @@ protected function getAvailablePaths() { 'toolbar', 'translation', '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(). - 'book', ]; } @@ -159,9 +154,7 @@ protected function getAvailablePaths() { */ 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', 'color', 'rdf', // These modules are in the missing path list because they are installed