From e2258e264c033b0aaae9cf949e6d3c7131bfa817 Mon Sep 17 00:00:00 2001
From: catch <catch@35733.no-reply.drupal.org>
Date: Tue, 22 Oct 2019 17:13:37 +0100
Subject: [PATCH] Issue #3085062 by jibran, amateescu, larowlan, xjm, Berdir:
 Declare a conflict on pathauto versions that aren't compatible with 8.8.0

---
 composer.lock                      |  3 ++-
 core/composer.json                 |  1 +
 core/modules/system/system.install | 17 +++++++++++++++++
 3 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/composer.lock b/composer.lock
index 8c73a4f6ad4e..e30fe37532da 100644
--- a/composer.lock
+++ b/composer.lock
@@ -653,7 +653,7 @@
             "dist": {
                 "type": "path",
                 "url": "core",
-                "reference": "8830b3c971fde18c39a7818d1722fbcab385641a"
+                "reference": "98e264668acbc33027a30953a7e194715b3ce33f"
             },
             "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 8e4b04ca579c..d0f8f39a1cf7 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 c7d4aa4bfc6b..82fb06aef937 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -1096,6 +1096,23 @@ function system_requirements($phase) {
     }
   }
 
+  // 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 = \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 the current version of Drupal core. Update the <a href=":url">Pathauto</a> module to 8.x-1.6 or later.', [
+            ':url' => 'https://drupal.org/project/pathauto',
+          ]),
+          'severity' => REQUIREMENT_ERROR,
+        ];
+      }
+    }
+  }
+
   return $requirements;
 }
 
-- 
GitLab