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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andypost created an issue. See original summary.

andypost’s picture

The patch, will need follow-up for RTBC if we keep stability alpha

andypost’s picture

Issue summary: View changes
andypost’s picture

Issue summary: View changes
andypost’s picture

Issue tags: +Needs followup
andypost’s picture

andypost’s picture

Status: Needs review » Closed (duplicate)
Related issues: +#3295520: Update dependencies for Drupal 10.0 and 9.5
andypost’s picture

Title: Upgrade mikey179/vfsstream to 1.6.11-alpha.0 to allow tests running on PHP 8.2 » Require mikey179/vfsstream ^1.6.11 to allow tests running on PHP 8.2
Issue summary: View changes
Status: Closed (duplicate) » Needs work
FileSize
3.47 KB

Re-purpose the issue to bump requirement

catch’s picture

Status: Needs work » Needs review

Can probably be needs review?

longwave’s picture

Status: Needs review » Reviewed & tested by the community

RTBC 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.

  • catch committed 6ff7042 on 10.0.x
    Issue #3299213 by andypost: Require mikey179/vfsstream ^1.6.11 to allow...
  • catch committed 373a960 on 10.1.x
    Issue #3299213 by andypost: Require mikey179/vfsstream ^1.6.11 to allow...
catch’s picture

Version: 10.0.x-dev » 9.5.x-dev
Status: Reviewed & tested by the community » Needs work

Committed/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.

longwave’s picture

I think you mean "...and cherry-picked to 10.0.x.".

Spokje’s picture

Spokje’s picture

Status: Needs work » Needs review
andypost’s picture

Status: Needs review » Reviewed & tested by the community

Thank you, could get one run after composer update new php82 CI jpb

neclimdul’s picture

YAY!

  • catch committed 8fe9dae on 9.5.x
    Issue #3299213 by andypost, Spokje, catch: Require mikey179/vfsstream ^1...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Just a patch update for 9.5.x which is good.

Committed/pushed to 9.5.x, thanks!

alexpott’s picture

+++ b/composer.json
@@ -21,7 +21,7 @@
-        "mikey179/vfsstream": "^1.6.8",
+        "mikey179/vfsstream": "^1.6.11",

How 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.

longwave’s picture

It 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 required php >=5.3.0. Should we be declaring the lowest that works with any version or the lowest that works with all versions?

longwave’s picture

It 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.

andypost’s picture

+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...

catch’s picture

In an ideal world mikey179/vfsstream would not declare compatibility with PHP versions until they are released

This 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.

alexpott’s picture

Should we be declaring the lowest that works with any version or the lowest that works with all versions?

The 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.

catch’s picture

The lowest that works with any version. In most cases it should be composer's job to work this out.

We 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.