diff --git a/core/modules/system/system.install b/core/modules/system/system.install index f5d7c40f22f3fc1e0f72058f587be2a9c43a1a02..317304ba09b68bbba599376ff2d49143df57e47c 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1106,14 +1106,16 @@ function system_requirements($phase) { } } - // If system.module is in the list then only show a specific message for - // Drupal core, otherwise show a more generic message for each module. - if (isset($module_list['system'])) { + // If system or workspaces is in the list then only show a specific message + // for Drupal core. + if (isset($module_list['system']) || isset($module_list['workspaces'])) { $requirements['system_update_last_removed'] = [ 'title' => t('The version of Drupal you are trying to update from is too old'), 'description' => t('Updating to Drupal @current_major is only supported from Drupal version @required_min_version or higher. If you are trying to update from an older version, first update to the latest version of Drupal @previous_major. (<a href=":url">Drupal 9 upgrade guide</a>)', [ '@current_major' => 9, - '@required_min_version' => '8.8.0', + // Workspaces is special cased due to updates being removed after + // 8.8.0. + '@required_min_version' => isset($module_list['workspaces']) ? '8.8.2' : '8.8.0', '@previous_major' => 8, ':url' => 'https://www.drupal.org/docs/9/how-to-prepare-your-drupal-7-or-8-site-for-drupal-9/upgrading-a-drupal-8-site-to-drupal-9', ]), diff --git a/core/modules/workspaces/workspaces.install b/core/modules/workspaces/workspaces.install index 273239b93c9c8de45a4788f7323ab71050df589b..75185603c1b7d1d3fb8fb60163049bf2fc589f3b 100644 --- a/core/modules/workspaces/workspaces.install +++ b/core/modules/workspaces/workspaces.install @@ -5,7 +5,6 @@ * Contains install, update and uninstall functions for the Workspaces module. */ -use Drupal\Core\Entity\ContentEntityNullStorage; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\workspaces\Entity\Workspace; @@ -125,25 +124,5 @@ function workspaces_schema() { * Implements hook_update_last_removed(). */ function workspaces_update_last_removed() { - return 8802; -} - -/** - * Remove the Workspace Association entity storage if necessary. - */ -function workspaces_update_8803() { - $entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager(); - $entity_type = $entity_definition_update_manager->getEntityType('workspace_association'); - - // We can't migrate the workspace association data if the entity type is not - // using its default storage. - // @see workspaces_post_update_move_association_data() - if ($entity_type && $entity_type->getHandlerClasses()['storage'] === 'Drupal\workspaces\WorkspaceAssociationStorage') { - \Drupal::state()->set('workspaces_update_8803.tables', [ - 'base_table' => $entity_type->getBaseTable(), - 'revision_table' => $entity_type->getRevisionTable(), - ]); - $entity_type->setStorageClass(ContentEntityNullStorage::class); - $entity_definition_update_manager->uninstallEntityType($entity_type); - } + return 8803; }