Closed (fixed)
Project:
Drupal core
Version:
8.7.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
12 Mar 2019 at 21:08 UTC
Updated:
11 Apr 2019 at 14:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
morbus iffI'm seeing two messages in this vein, in 8.6.x when running
php ./core/scripts/run-tests.sh --sqlite test.sqlite --url http://localhost:8888/ --browser standard:Comment #3
morbus iffMost immediate fix, like with the recent twig hiccups, is a downgrade:
composer require symfony/psr-http-message-bridge:1.1.1Comment #4
mikelutzI've found that that particular dependency has a requirement of php 7.1, which I didn’t realize when I made the issue yesterday, so it isn’t going to end up in our composer.lock file anytime soon, but it is being installed on my sites when I do composer update on a modern php version.
It's replacement seems to be available in 1.1.0 though, which is currently in the lock file, so perhaps we can start using it. Could it be this easy?
Comment #5
mikelutzHaha, not even close. It's not a direct replacement and requires more packages that do have php7 dependencies, so maybe it's something we can tackle in 8.8
Comment #6
mikelutzOkay, now I'm just being silly. It must be time to go home.
Comment #7
mikelutzWow, I didn't really think that would work. It is good to know if we ever support a minium php version of 7.1 that we can swap out for a psr17 message factory that easily. Back to the issue at hand. Here's a patch showing the deprections if symfony/psr-http-message-bridge is updated to version 1.2. This should cause about 2600 failures. Also is a patch locking the version to 1.1 patch releases, in which the Diactoros message factory is not deprecated. I'm in favor of locking the version until our minimum php version supports a more modern alternative. I think we suppress more than enough deprecation notices right now.
The alternatives to locking the minor version of psr-http-message bridge are to suppress the deprecation notices, or to do nothing, and not update the dependency in the lock file, because 1.2 requires php 7.1. Up to the FMs what to do (if anything).
Comment #9
morbus iffFresh install of 8.6.11 today, with drupal-project defaults, has the 1.2.0 in it, causing most of my attempted tests to fail. Sniff.
Comment #10
mikelutzThat's odd, the composer lock file still has 1.1.0. Composer install should keep it there, but any composer update on php 7 or higher will install the new one.
Comment #11
mikelutzIt definitely broke my builds, until I forced the downgrade in my sites' composer.json. Jenkins runs updates on php 7.3 which was pulling in phmb 1.2, and then the project's phpunit tests were failing.
Comment #12
botrisI don't think composer.lock is shipped in core and should probably not be in the patch.
If you use composer to install / manage Drupal, like through drupal-composer/drupal-project, then the patch also does not apply as the lock file will be outside the docroot/web/www folder.
I can confirm that specifying
symfony/psr-http-message-bridge:1.1.1does fix the problem.Comment #13
mikelutzcomposer.lock is definitly part of the tagged release, and if we are going to upgrade to symfony/psr-http-message-bridge 1.1.1 in 8.8, then it is appropriate to add it to the composer.lock. The patch is made for a Drupal release, not to be applied to existing sites.
Although I've just noticed that 1.1.1 adds a new dev dependency that itself has a dependency of php7.1, so we may be stuck back with 1.1.0 after all. Queuing a test against php 7.0 and seeing if it breaks composer.
Comment #14
jibranLet's fix it in #3039611: Update core PHP dependencies for 8.8.x
Comment #15
jibranThis has been already fixed in #3032693: Update core PHP dependencies before 8.7.0.
Comment #16
mikelutzRespectfully reopening because while we updated psr-http-message-factory to 1.1.1 in that issue, we didn't lock it to <1.2, which is what gets installed if you composer update with php7.0 or higher. The purpose of this issue is to lock it to <1.2 in composer.json or otherwise manage the deprecation errors that come up so sites that do run an update don't break or throw deprecation errors.
If this is truly something we don't want to do then we can close this. I know we technically only guarantee what's in the lock file, but if we know of an issue with a vendor update, we should handle it if we can, and we can here pretty easily.
Comment #17
jibranI agree sorry for missing that. Let's not pin it in composer.json and make it compatible with both versions.
Comment #18
mikelutzI've rather changed my mind from #7 and agree we should just suppress the deprecations after all.
Comment #19
mikelutzComment #20
catchAgreed, let's suppress the deprecations for this one. We should open another issue to discuss how to remove the deprecation suppression though, or is there already one open?
Comment #21
mikelutzI don't think there is one open. Removing the deprecation suppression would mean replacing the message factory with a psr17 message factory once php 7.1 is the minimum supported version, I assume in Drupal 9.
Comment #22
catchTechnically Drupal 8.9 should require at least PHP 7.1, but we are still trying to drop PHP 5.5/5.6 support properly. I think we should open an 8.x issue for the follow-up even if turns out to be unresolvable before 9.x
Comment #23
mikelutzAdded #3043471: Replace the DiactorosFactory message factory in symfony/psr-http-message-bridge with a PSR-17 compliant message factory as a follow up and postponed on changing our minimum supported php version to 7.1
Comment #24
catchCommitted and pushed a3145544ae to 8.8.x and f3241f5402 to 8.7.x. Thanks!
Comment #27
dave reidAny chance this could be cherry-picked to 8.6.x? We're running into this when using the latest 8.6.13 and the "strict" SYMFONY_DEPRECATIONS_HELPER setting.
Comment #28
jibranRE:#27 You can always downgrade the package.
Comment #29
dave reidI'd rather not add a downgrade requirement to each module's composer.json I need for our test system just for 8.6.x. Feels like this is a bug more than a task which means it could be fixed in the latest 8.6.x, but wasn't cherry-picked so I thought I would ask.
Comment #30
morbus iffI'd also love a 8.6.x backport.
Comment #31
mikelutzI'm not even sure that there will be another release in the 8.6 series before 8.7 is released and 8.6 becomes security-fixes only. Nothing has been committed to the 8.6 branch in the week since the 8.6.13 security release, and 8.7 is due in just over a month.
Either way, that backport is at the discretion of the committers.
Comment #32
gambryIssue is now fixed, there is a solution for 8.6 on #27 so I don't think there will be a backport.
However here a reroll for 8.6.x if anyone want to patch while waiting for 8.7.
(Also committed patch misses a fullstop at the end of the comment.)