diff --git a/composer.lock b/composer.lock index 56d29498e4..b05d491e92 100644 --- a/composer.lock +++ b/composer.lock @@ -653,7 +653,7 @@ "dist": { "type": "path", "url": "core", - "reference": "66ca895a3149058381e8f2385541f285235c009f" + "reference": "c52542b8ded961942356aae5de373c09f484e4b2" }, "require": { "asm89/stack-cors": "^1.1", @@ -701,6 +701,7 @@ "zendframework/zend-feed": "^2.12" }, "conflict": { + "drupal/pathauto": "<1.6", "drush/drush": "<8.1.10" }, "replace": { diff --git a/core/composer.json b/core/composer.json index cba9024381..822364cf42 100644 --- a/core/composer.json +++ b/core/composer.json @@ -49,6 +49,7 @@ "pear/archive_tar": "^1.4.8" }, "conflict": { + "drupal/pathauto": "<1.6", "drush/drush": "<8.1.10" }, "replace": { diff --git a/core/modules/system/system.install b/core/modules/system/system.install index c7d4aa4bfc..b58889006b 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1095,6 +1095,22 @@ function system_requirements($phase) { ]; } } + if ($phase === 'install' || $phase === 'update') { + + // Prevent installation or update if the pathauto version is less than 1.5. + if (\Drupal::moduleHandler()->moduleExists('pathauto')) { + $info = system_get_info('module', 'pathauto'); + if (version_compare($info['version'], '8.x-1.6') < 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.5 or later.', [ + ':version' => \Drupal::VERSION, + ]), + 'severity' => REQUIREMENT_ERROR, + ]; + } + } + } return $requirements; }