Problem/Motivation
- Drupal 10.0 used
psr/http-message1.x. Drupal 10.1 supports either 1.x or 2.x and composer.lock uses 2.x, which meansdrupal/core-recommendedpins to 2.x. Therefore, if sites have other dependencies that haven't yet been made compatible with psr/http-message 2.x, they can't upgrade from 10.0 to 10.1 without switching off of drupal/core-recommended. - psr/http-messages does not contain any code other than interfaces, so I don't think there's much safety value created by drupal/core-recommended pinning to a major/minor version.
- 10.1's drupal/core-recommended also increases the major version of
doctrine/lexerandegulias/email-validator, so those might also present upgrade problems from 10.0 to 10.1, but those packages have implementation code in them so their presence in drupal/core-recommended has value. Therefore, this issue is scoped to only psr/http-message.
Steps to reproduce
Proposed resolution
Remove psr/http-message from drupal/core-recommended. This means sites using drupal/core-recommended will potentially get new minor versions of psr/http-message, including versions not tested on DrupalCI, when they come out, but this seems low risk considering that package only defines interfaces and does not have any implementation code.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | unpin-http-message.patch | 1.55 KB | effulgentsia |
Comments
Comment #2
effulgentsia commentedComment #3
effulgentsia commentedComment #4
smustgrave commentedTiming couldn't be more perfect. Was updating to D10.1 and hit #3360754: Upgrade dependencies for Drupal 10.1 compatibility, use zipstream-php 3.0
Going to mark as I assume tests will pass. (none have failed from. checking console output).
Comment #6
catchGood plan. Committed/pushed to 11.x and 10.1x., thanks!
Comment #9
wim leersThis introduced test failures for build tests of https://www.drupal.org/project/automatic_updates.
A freshly queued test run against
10.1.xsuddenly fails, with zero changes having been committed to that module since the last test run: https://www.drupal.org/pift-ci-job/2673631which is triggered by
\Drupal\BuildTests\QuickStart\QuickStartTestBase::installQuickStart():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? 🤔Created #3362110: Since #3361983 was committed to Drupal core, psr/http-message needed to be explicitly required for build tests for investigating on the contrib module side.
Comment #10
kevinquillen commentedThis was committed, but I still get a test failure here:
https://www.drupal.org/pift-ci-job/2675934
Do I need to change anything? AFAIK this error stems from the original issue.
Comment #11
effulgentsia commentedThis issue is about drupal/core-recommended, whereas I think #10 is unrelated to drupal/core-recommended, but is a good question about DrupalCI. I opened #3362781: How to allow DrupalCI to downgrade packages from core's composer.lock versions when installing the contrib project under test? for that.