From cd4311144db128e19a3cf07f031af430a8dcaa32 Mon Sep 17 00:00:00 2001
From: Ted Bowman <ted+git@tedbow.com>
Date: Wed, 13 Sep 2023 14:49:49 -0400
Subject: [PATCH] Contrib: for core version spacing -
 https://git.drupalcode.org/project/automatic_updates/-/commit/f6b7ba06aa511a1445372a288496e143ec278007

---
 .../src/Validator/ComposerPluginsValidator.php      |  1 +
 .../tests/src/Build/TemplateProjectTestBase.php     | 13 ++++++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/core/modules/package_manager/src/Validator/ComposerPluginsValidator.php b/core/modules/package_manager/src/Validator/ComposerPluginsValidator.php
index 4cd11ce46719..b584da44c857 100644
--- a/core/modules/package_manager/src/Validator/ComposerPluginsValidator.php
+++ b/core/modules/package_manager/src/Validator/ComposerPluginsValidator.php
@@ -67,6 +67,7 @@ final class ComposerPluginsValidator implements EventSubscriberInterface {
     'cweagans/composer-patches' => '^1.7.3',
     // @see \Drupal\package_manager\PathExcluder\VendorHardeningExcluder
     'drupal/core-vendor-hardening' => '*',
+    'php-http/discovery' => '*',
     // cSpell:enable
   ];
 
diff --git a/core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php b/core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php
index 4f804004a7b0..b8d362047857 100644
--- a/core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php
+++ b/core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php
@@ -316,7 +316,6 @@ protected function createTestProject(string $template): void {
     // of Drupal core.
     $info_files = [
       'core/modules/package_manager/package_manager.info.yml',
-      'core/modules/auto_updates/auto_updates.info.yml',
     ];
     foreach ($info_files as $path) {
       $path = $this->getWebRoot() . $path;
@@ -417,6 +416,7 @@ protected function createVendorRepository(): array {
             'reference' => $reference,
           ],
           'autoload' => $package_info['autoload'] ?? [],
+          'provide' => $package_info['provide'] ?? [],
         ];
         // These polyfills are dependencies of some packages, but for reasons we
         // don't understand, they are not installed in code bases built on PHP
@@ -684,4 +684,15 @@ protected function getPackageManagerTestApiResponse(string $url, array $query_da
     return json_decode($file_contents, TRUE, flags: JSON_THROW_ON_ERROR);
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function copyCodebase(\Iterator $iterator = NULL, $working_dir = NULL) {
+    parent::copyCodebase($iterator, $working_dir);
+
+    // Ensure that we will install Drupal 9.8.0 (a fake version that should
+    // never exist in real life) initially.
+    $this->setUpstreamCoreVersion('9.8.0');
+  }
+
 }
-- 
GitLab