diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 52a0245078..82fb06aef9 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1095,16 +1095,17 @@ function system_requirements($phase) { ]; } } - if ($phase === 'install' || $phase === 'update') { - // Prevent installation or update if the pathauto version is less than 1.5. + // Prevent installation or update if the Pathauto module is installed and its + // version is less than 1.6. + if ($phase === 'install' || $phase === 'update') { if (\Drupal::moduleHandler()->moduleExists('pathauto')) { - $info = system_get_info('module', 'pathauto'); - if (version_compare($info['version'], '8.x-1.5') < 0) { + $info = \Drupal::service('extension.list.module')->getExtensionInfo('pathauto'); + if (version_compare($info['version'], '8.x-1.5') <= 0) { $requirements['pathauto_module_incompatibility'] = [ 'title' => t('Pathauto'), - 'description' => t('The Pathauto module is not compatible with Drupal core version :version. Please update Pathauto to 8.x-1.6 or later.', [ - ':version' => \Drupal::VERSION, + 'description' => t('The Pathauto module is not compatible with the current version of Drupal core. Update the Pathauto module to 8.x-1.6 or later.', [ + ':url' => 'https://drupal.org/project/pathauto', ]), 'severity' => REQUIREMENT_ERROR, ];