From a48fa3fc3b335df357be7e9c8a376bae2bc0e607 Mon Sep 17 00:00:00 2001
From: Ted Bowman <ted+git@tedbow.com>
Date: Fri, 29 Dec 2023 12:49:21 -0500
Subject: [PATCH] Contrib: allow any version of core in build tests to allow
 gitlab core clone tests -
 https://git.drupalcode.org/project/automatic_updates/-/commit/14e35c62afdc76ee9a79104a5b483918c00f3681

---
 .../tests/src/Build/TemplateProjectTestBase.php               | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php b/core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php
index b9bdc34df0ac..f7127da07694 100644
--- a/core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php
+++ b/core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php
@@ -270,6 +270,10 @@ protected function createTestProject(string $template): void {
     // Allow pre-release versions of dependencies.
     $this->runComposer('composer config minimum-stability dev', $template_dir);
 
+    // Allow any version of Drupal core as in test using a git clone on Gitlab
+    // core will be checked out at a specific commit hash.
+    $this->runComposer("composer require --no-update drupal/core:'*'", "composer/Metapackage/CoreRecommended");
+
     // Remove the packages.drupal.org entry (and any other custom repository)
     // from the template's repositories section. We have no reliable way of
     // knowing the repositories' names in advance, so we get that information
-- 
GitLab