From cbd27c97a808397ecaee0d0d045dd87dc230bccc Mon Sep 17 00:00:00 2001
From: Lauri Eskola <lauri.eskola@acquia.com>
Date: Fri, 17 Mar 2023 09:24:10 +0200
Subject: [PATCH] Issue #3188689 by tedbow, dww: Document why
 CORE_COMPATIBILITY is still 8.x in higher branches

(cherry picked from commit 639b1299bb60f9d614968e4c17f3ee7dec037164)
---
 core/lib/Drupal.php | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php
index c71aae3d8dfb..46b9d70c4a85 100644
--- a/core/lib/Drupal.php
+++ b/core/lib/Drupal.php
@@ -79,6 +79,16 @@ class Drupal {
 
   /**
    * Core API compatibility.
+   *
+   * This constant is set to '8.x' to provide legacy compatibility with
+   * extensions that use the '8.x-' prefix to denote Drupal core major version
+   * compatibility, for example '8.x-1.0'. These extensions can specify
+   * compatibility with multiple major versions of Drupal core by setting the
+   * version constraint in 'core_version_requirement'. Drupal does not support
+   * using this core major version number prefix with versions greater than 8.
+   * For example '9.x-' prefixed extensions are not supported.
+   *
+   * @todo Remove or rename this constant in https://www.drupal.org/i/3085662
    */
   const CORE_COMPATIBILITY = '8.x';
 
-- 
GitLab