diff --git a/core/includes/update.inc b/core/includes/update.inc index 5f0abf6..afe2122 100644 --- a/core/includes/update.inc +++ b/core/includes/update.inc @@ -156,7 +156,7 @@ function update_prepare_d8_bootstrap() { 'description' => 'Please migrate your Drupal 7 installation to a Drupal 8 installation using the Migrate module. Updating directly from Drupal 7 to Drupal 8 is not supported.', ), ); - update_extra_requirements($requirements); + update_migrate_requirements($requirements); } // Moves install_profile from variable to settings. You can't do that in // system.install because _system_rebuild_module_data() needs the profile diff --git a/core/update.php b/core/update.php index a254c17..e346f95 100644 --- a/core/update.php +++ b/core/update.php @@ -297,6 +297,18 @@ function update_extra_requirements($requirements = NULL) { } /** + * Returns and stores migration requirements that apply during the + * update process. + */ +function update_migrate_requirements($requirements = NULL) { + static $migrate_requirements = array(); + if (isset($requirements)) { + $migrate_requirements += $requirements; + } + return $migrate_requirements; +} + +/** * Checks update requirements and reports errors and (optionally) warnings. * * @param $skip_warnings @@ -305,9 +317,13 @@ function update_extra_requirements($requirements = NULL) { * FALSE. */ function update_check_requirements($skip_warnings = FALSE) { - // Check requirements of all loaded modules. - $requirements = \Drupal::moduleHandler()->invokeAll('requirements', array('update')); - $requirements += update_extra_requirements(); + // Upgrading from a 7.x site database should block the update process. + $requirements = update_migrate_requirements(); + if (empty($requirements)) { + // Check requirements of all loaded modules. + $requirements = \Drupal::moduleHandler()->invokeAll('requirements', array('update')); + $requirements += update_extra_requirements(); + } $severity = drupal_requirements_severity($requirements); // If there are errors, always display them. If there are only warnings, skip