diff --git a/automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php b/automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php
index 5a3cb665f56b6b93c5a6b71e41e2d83b822ee178..3c7c20e9e07b6e94358963827e3bae01b39a46a2 100644
--- a/automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php
+++ b/automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php
@@ -64,7 +64,12 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
   protected function setUp(): void {
     parent::setUp();
     $this->setReleaseMetadata(__DIR__ . '/../../fixtures/release-history/semver_test.1.1.xml');
-    $this->drupalLogin($this->rootUser);
+    $user = $this->createUser([
+      'administer site configuration',
+      'administer software updates',
+      'access site in maintenance mode',
+    ]);
+    $this->drupalLogin($user);
     $this->drupalPlaceBlock('local_tasks_block', ['primary' => TRUE]);
   }
 
diff --git a/package_manager/package_manager.install b/package_manager/package_manager.install
index 70482070671508f050b7c6b56a90079c90705be8..c4fb7265e2bef0967057a98dbd6b9fe73f025c3f 100644
--- a/package_manager/package_manager.install
+++ b/package_manager/package_manager.install
@@ -8,7 +8,7 @@
 /**
  * Implements hook_requirements().
  */
-function package_manager_requirements() {
+function package_manager_requirements(string $phase) {
   $requirements = [];
 
   if (!class_exists('PhpTuf\ComposerStager\Domain\Beginner')) {
@@ -18,7 +18,7 @@ function package_manager_requirements() {
       'severity' => REQUIREMENT_ERROR,
     ];
   }
-  if (extension_loaded('xdebug')) {
+  if ($phase === 'runtime' && extension_loaded('xdebug')) {
     $requirements['package_manager_xdebug'] = [
       'title' => 'Xdebug enabled',
       'description' => t('Xdebug is enabled, which may have a negative performance impact on Package Manager and any modules that use it.'),
diff --git a/tests/src/Functional/UpdateLockTest.php b/tests/src/Functional/UpdateLockTest.php
index 07634ed400f00371761e5a4d8d0247aeaee6abac..df5d5ad8ed952468362bd8ffc271df41acb2ea1e 100644
--- a/tests/src/Functional/UpdateLockTest.php
+++ b/tests/src/Functional/UpdateLockTest.php
@@ -31,7 +31,10 @@ class UpdateLockTest extends AutomaticUpdatesFunctionalTestBase {
   protected function setUp(): void {
     parent::setUp();
 
-    $this->drupalLogin($this->rootUser);
+    $user = $this->createUser([
+      'administer site configuration',
+    ]);
+    $this->drupalLogin($user);
     $this->checkForUpdates();
   }
 
diff --git a/tests/src/Functional/UpdaterFormTest.php b/tests/src/Functional/UpdaterFormTest.php
index 01a4346fa2bf0355da49ce3f5b859a5edf4690a7..453ee42a33959e880739803bbcb083be6f52eaae 100644
--- a/tests/src/Functional/UpdaterFormTest.php
+++ b/tests/src/Functional/UpdaterFormTest.php
@@ -50,7 +50,15 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
     parent::setUp();
 
     $this->setReleaseMetadata(__DIR__ . '/../../fixtures/release-history/drupal.9.8.1-security.xml');
-    $this->drupalLogin($this->rootUser);
+    $user = $this->createUser([
+      'administer site configuration',
+      'administer software updates',
+      'access administration pages',
+      'access site in maintenance mode',
+      'administer modules',
+      'access site reports',
+    ]);
+    $this->drupalLogin($user);
     $this->checkForUpdates();
   }
 
@@ -307,7 +315,11 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
 
     // We should get the same error if we log in as another user and try to
     // delete the staged update.
-    $this->drupalLogin($this->rootUser);
+    $user = $this->createUser([
+      'administer software updates',
+      'access site in maintenance mode',
+    ]);
+    $this->drupalLogin($user);
     $this->drupalGet('/admin/reports/updates/automatic-update');
     $assert_session->pageTextContains($conflict_message);
     $page->pressButton('Delete existing update');