Problem/Motivation
Following from #3291553-21: [META] Check and update dependencies for PHP 8.2 compatibility without this upgrade test run stuck and CI exists by timeout
Steps to reproduce
See #3295821-55: Ignore: patch testing issue for PHP 8.2 attributes
Test Drupal\BuildTests\Composer\Template\ComposerProjectTemplatesTest
fails because of stability https://dispatcher.drupalci.org/job/drupal_patches/139371/testReport/jun...
Proposed resolution
- require to version > 1.6.11 to be sure that core compatible with PHP 8.2
see commits
- https://github.com/bovigo/vfsStream/commit/17b0f39b4a767bf950066dbad1a9a...
- https://github.com/bovigo/vfsStream/commit/17d16a85e6c26ce1f3e2fa9ceeacd...
Remaining tasks
patch/review/commit
User interface changes
no
API changes
no
Data model changes
no
Release notes snippet
TBD
Comment | File | Size | Author |
---|---|---|---|
#15 | 3299213-d95-15.patch | 3.49 KB | Spokje |
#9 | 3299213-9.patch | 3.47 KB | andypost |
Comments
Comment #2
andypostThe patch, will need follow-up for RTBC if we keep stability alpha
Comment #3
andypostComment #4
andypostComment #5
andypostComment #6
catchOpened #3299662: [upstream] Ensure 10.0.0 is on stable versions of dependencies before release.
Comment #7
andypostThank you, added @todo to follow-up
Comment #8
andypostClosing as https://github.com/bovigo/vfsStream/releases/tag/v1.6.11 stable is out
Will get upgrade in #3295520: Update dependencies for Drupal 10.0 and 9.5
Comment #9
andypostRe-purpose the issue to bump requirement
Comment #10
catchCan probably be needs review?
Comment #11
longwaveRTBC for 10.0.x and 10.1.x, will need a separate patch if we are to do this in 9.5.x as well.
Comment #13
catchCommitted/pushed to 10.1.x and cherry-picked to 10.0.x.
Even though we might not get to 100% PHP 8.2 support in 9.5.x, it's worth backporting the dependency update in its own right, so moving there.
Comment #14
longwaveI think you mean "...and cherry-picked to 10.0.x.".
Comment #15
SpokjeComment #16
SpokjeComment #17
andypostThank you, could get one run after composer update new php82 CI jpb
Comment #18
neclimdulYAY!
Comment #20
catchJust a patch update for 9.5.x which is good.
Committed/pushed to 9.5.x, thanks!
Comment #21
alexpottHow come we're updating the constraint here? We're still compatible with 1.6.8 - upping how constraints all the time makes us less compatible - I think we should only update these when we move to a new minor / there is a security release. I don't think it matters so much with dev dependencies but it's the precedent that it sets that is worrying to me. If you want dependencies locked to what Drupal is using on DrupalCI then we already have a composer meta package for you.
Comment #22
longwaveIt is tricky because it depends on PHP version. PHP 8.1 is fine with 1.6.8, but for PHP 8.2 we need 1.6.11. In an ideal world
mikey179/vfsstream
would not declare compatibility with PHP versions until they are released, but in practice this does not happen; it has always simply requiredphp >=5.3.0
. Should we be declaring the lowest that works with any version or the lowest that works with all versions?Comment #23
longwaveIt would be good if package owners could mark old versions as incompatible on Packagist, so mikey179 could retrospectively flag 1.6.10 and earlier as incompatible with PHP 8.2 even though it wasn't declared when those versions were released, and Composer would later respect that - but in practice I'm sure this would have a ton of side effects that mean this isn't feasible.
Comment #24
andypost+1 to #22-23 - most of packages does not rely on PHP version by setting only minimal supported version as PHP is moving and nobody knows which version will come next 9.0 or 8.3...
Comment #25
catchThis also isn't an ideal world - we've had packages that were compatible in practice, but didn't add the version or tag a release, so we couldn't update them.
Comment #26
alexpottThe lowest that works with any version. In most cases it should be composer's job to work this out. Adding further restrictions makes it harder for everyone. The robustness principle applies here. We should be as liberal as we can be and work in the widest range of situations without getting in people's way - whilst using our lock file to be as strict as we can be on what we use. We go one step further because if you want to limit yourself to using the exact versions Drupal uses we supply a composer project to do just that.
Comment #27
catchWe can't have it both ways:
- if a dependency declares an upper bound for PHP version compatibility, then composer will show an incompatibility if you try to install it on PHP 8.2 - but we end up in a laminas situation (#3180207: Update laminas-diactoros, laminas-escaper and laminas-feed for PHP 8 compatibility) which is a complete pain for Drupal PHP compatibility overall.
- if a dependency doesn't declare an upper-bound, then composer will happily continue to install the older version on PHP 8.2, so we either decide that's fine and people can update it when they get an error, or we should increase the constraint to one that works with all supported PHP versions.