Skip to content

CS: start using PHPCompatibility 10#183

Merged
gmazzap merged 1 commit intomasterfrom
feature/upgrade-phpcompatibility
Feb 9, 2026
Merged

CS: start using PHPCompatibility 10#183
gmazzap merged 1 commit intomasterfrom
feature/upgrade-phpcompatibility

Conversation

@jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Feb 9, 2026

Long anticipated, finally here: PHPCompatibility 10.0.0-alpha1/alpha2 🎉

PHPCompatibility 10.0.0 brings huge improvements in both what is being detected (> 50 new sniffs), as well as the detection accuracy for pre-existing sniffs.

Even though still "unstable", it is stable enough for our purposes and the advantages of using it outweigh the disadvantage of it being an unstable version. By setting the minimum-stability and prefer-stable settings in the composer.json, we can ensure that we don't get the dev-develop branch, but rather get a 10.0.0 tag, unstable or not.

And what with the improved detection, a number of php incompatibilities previously not flagged, are now flagged, even though we already handle them correctly via conditions. So this commit also adds a few selective ignore comments for those few situations where they are needed.

Includes adding one ignore annotation.

Ref:

Long anticipated, finally here: PHPCompatibility 10.0.0-alpha1/alpha2 🎉

PHPCompatibility 10.0.0 brings huge improvements in both what is being detected (> 50 new sniffs), as well as the detection accuracy for pre-existing sniffs.

Even though still "unstable", it is stable enough for our purposes and the advantages of using it outweigh the disadvantage of it being an unstable version. By setting the `minimum-stability` and `prefer-stable` settings in the `composer.json`, we can ensure that we don't get the `dev-develop` branch, but rather get a `10.0.0` tag, unstable or not.

And what with the improved detection, a number of php incompatibilities previously not flagged, are now flagged, even though we already handle them correctly via conditions. So this commit also adds a few selective ignore comments for those few situations where they are needed.

Includes adding one ignore annotation.

Ref:
* https://github.com/PHPCompatibility/PHPCompatibility/wiki/Upgrading-to-PHPCompatibility-10.0
* https://github.com/PHPCompatibility/PHPCompatibility/releases/tag/10.0.0-alpha1
* https://github.com/PHPCompatibility/PHPCompatibility/releases/tag/10.0.0-alpha2
@jrfnl jrfnl added this to the 2.8.0 milestone Feb 9, 2026
@jrfnl jrfnl added the dependencies Pull requests that update a dependency file label Feb 9, 2026
@gmazzap
Copy link
Contributor

gmazzap commented Feb 9, 2026

Thanks @jrfnl!

@gmazzap gmazzap merged commit 789a8b0 into master Feb 9, 2026
52 checks passed
@gmazzap gmazzap deleted the feature/upgrade-phpcompatibility branch February 9, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants