Since #3361983 was committed to Drupal core, psr/http-message needed to be explicitly required for build tests

Created on 23 May 2023, over 1 year ago

Problem/Motivation

📌 Remove psr/http-message from drupal/core-recommended Fixed introduced test failures for build tests of https://www.drupal.org/project/automatic_updates .

A freshly queued test run against 10.1.x suddenly fails, with zero changes having been committed to that module since the last test run: https://www.drupal.org/pift-ci-job/2673631

1) Drupal\Tests\automatic_updates\Build\CoreUpdateTest::testApi
Failed asserting that 'Error: Interface "Psr\Http\Message\UriInterface" not found in include() (line 17 of /tmp/build_workspace_e1dc4f9c9db3e326a986c427d8d30cd1a0xXzJ/project/vendor/guzzlehttp/psr7/src/Uri.php).\n
' contains "Username:".

/var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
/var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:55
/var/www/html/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php:292
/var/www/html/core/tests/Drupal/BuildTests/QuickStart/QuickStartTestBase.php:39
/var/www/html/modules/contrib/automatic_updates/package_manager/tests/src/Build/TemplateProjectTestBase.php:105
/var/www/html/modules/contrib/automatic_updates/package_manager/tests/src/Build/TemplateProjectTestBase.php:288
/var/www/html/modules/contrib/automatic_updates/tests/src/Build/UpdateTestBase.php:21
/var/www/html/modules/contrib/automatic_updates/tests/src/Build/CoreUpdateTest.php:71
/var/www/html/modules/contrib/automatic_updates/tests/src/Build/CoreUpdateTest.php:99
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
/var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:651
/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:144
/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:97

which is triggered by \Drupal\BuildTests\QuickStart\QuickStartTestBase::installQuickStart():

  public function installQuickStart($profile, $working_dir = NULL) {
    $php_finder = new PhpExecutableFinder();
    $install_process = $this->executeCommand($php_finder->find() . ' ./core/scripts/drupal install ' . $profile, $working_dir);
    $this->assertCommandOutputContains('Username:');
…

But core's build tests are not failing! 🤔

I bet this is due to the special copying stuff with specific attention for vendor packages in \Drupal\Tests\package_manager\Build\TemplateProjectTestBase::createTestProject()… maybe because it's now only an indirect dependency that test is now failing? 🤔

Steps to reproduce

Run tests on up-to-date 10.1.x.

Proposed resolution

TBD

Remaining tasks

  1. Investigate why psr/http-message is no longer installed in PM/AU's build tests.
  2. Fix it.

User interface changes

None.

API changes

None.

Data model changes

None.

📌 Task
Status

Needs work

Version

3.0

Component

Package Manager

Created by

🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024