From 6293c8e0e7624d606f47cac68fca3a192280565c Mon Sep 17 00:00:00 2001
From: catch <catch@35733.no-reply.drupal.org>
Date: Thu, 9 May 2024 13:17:50 +0100
Subject: [PATCH] Issue #3445211 by catch, longwave, benjifisher, drumm,
 tobiasb: Composer tests fail because of invalid Drupal version

---
 core/includes/install.core.inc | 17 ++++++++++-------
 core/lib/Drupal.php            |  2 +-
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index fd3958d4af18..f3e47042fcb2 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -1485,7 +1485,7 @@ function install_check_localization_server($uri) {
 }
 
 /**
- * Extracts version information from a drupal core version string.
+ * Extracts version information from a Drupal core version string.
  *
  * @param string $version
  *   Version info string (e.g., 8.0.0, 8.1.0, 8.0.0-dev, 8.0.0-unstable1,
@@ -1495,10 +1495,10 @@ function install_check_localization_server($uri) {
  *   Associative array of version info:
  *   - major: Major version (e.g., "8").
  *   - minor: Minor version (e.g., "0").
- *   - patch: Patch version (e.g., "0").
- *   - extra: Extra version info (e.g., "alpha2").
- *   - extra_text: The text part of "extra" (e.g., "alpha").
- *   - extra_number: The number part of "extra" (e.g., "2").
+ *   - (optional) patch: Patch version (e.g., "0").
+ *   - (optional) extra: Extra version info (e.g., "alpha2").
+ *   - (optional) extra_text: The text part of "extra" (e.g., "alpha").
+ *   - (optional) extra_number: The number part of "extra" (e.g., "2").
  */
 function _install_get_version_info($version) {
   preg_match('/
@@ -1506,8 +1506,11 @@ function _install_get_version_info($version) {
       (?P<major>[0-9]+)    # Major release number.
       \.          # .
       (?P<minor>[0-9]+)    # Minor release number.
-      \.          # .
-      (?P<patch>[0-9]+|x)  # Patch release number.
+      (
+        \.        # .
+        (?P<patch>[0-9]+|x) # Patch release number.
+        |         # OR no patch release.
+      )
     )             #
     (             #
       -           # - separator for "extra" version information.
diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php
index 8ee0cc377275..ceb4c53d5ec9 100644
--- a/core/lib/Drupal.php
+++ b/core/lib/Drupal.php
@@ -75,7 +75,7 @@ class Drupal {
   /**
    * The current system version.
    */
-  const VERSION = '11.0.0-dev';
+  const VERSION = '11.0-dev';
 
   /**
    * Core API compatibility.
-- 
GitLab