diff --git a/core/modules/system/src/Form/ModulesListForm.php b/core/modules/system/src/Form/ModulesListForm.php index 7831c38..742aa9a 100644 --- a/core/modules/system/src/Form/ModulesListForm.php +++ b/core/modules/system/src/Form/ModulesListForm.php @@ -9,6 +9,7 @@ use Drupal\Core\Extension\Extension; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Extension\ModuleInstallerInterface; +use Drupal\Core\Extension\VersionChecker; use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface; @@ -306,7 +307,7 @@ protected function buildRow(array $modules, Extension $module, $distribution) { $name = $modules[$dependency]->info['name']; // Disable the module's checkbox if it is incompatible with the // dependency's version. - if ($incompatible_version = drupal_check_incompatibility($version, str_replace(\Drupal::CORE_COMPATIBILITY . '-', '', $modules[$dependency]->info['version']))) { + if ($incompatible_version = VersionChecker::checkIncompatibility($version, str_replace(\Drupal::CORE_COMPATIBILITY . '-', '', $modules[$dependency]->info['version']))) { $row['#requires'][$dependency] = $this->t('@module (incompatible with version @version)', array( '@module' => $name . $incompatible_version, '@version' => $modules[$dependency]->info['version'], diff --git a/core/modules/system/system.install b/core/modules/system/system.install index cdaeba6..d7d43e4 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -7,6 +7,7 @@ use Drupal\Component\Utility\Crypt; use Drupal\Component\Utility\Environment; +use Drupal\Core\Extension\VersionChecker; use Drupal\Core\Path\AliasStorage; use Drupal\Core\Url; use Drupal\Core\Database\Database; @@ -728,7 +729,7 @@ function system_requirements($phase) { $required_file = $files[$required_module]; $required_name = $required_file->info['name']; $version = str_replace(\Drupal::CORE_COMPATIBILITY . '-', '', $required_file->info['version']); - $compatibility = drupal_check_incompatibility($requirement, $version); + $compatibility = VersionChecker::checkIncompatibility($requirement, $version); if ($compatibility) { $compatibility = rtrim(substr($compatibility, 2), ')'); $requirements["$module-$required_module"] = array(