Allow PHP 8.4 (CI + Composer constraint) - #17
Merged
Conversation
Remove the hard upper bound on the PHP constraint and include 8.4 in the QA matrix so this package can be installed and tested on modern runtimes.
Widen require-dev constraints so Composer can resolve on PHP 8.4 (Psalm 6 / PHPUnit 11) while still supporting older runtimes via Psalm 5 / PHPUnit 9. Suppress Psalm 6 rules that would force BC breaks or PHP 8.3-only attributes.
Keep runtime support for PHP 7.4+, but make Composer installable on 8.4 by allowing Psalm 6 / PHPUnit 11. Run Psalm only on PHP 8.1+ (where Psalm 6 resolves), mark WpContext final for Psalm 6, and suppress MissingOverrideAttribute until the package can require 8.3+.
Psalm 6 wants ClassMustBeFinal; suppress that instead of sealing the class so existing subclasses keep working.
Chrico
approved these changes
Aug 12, 2026
Chrico
left a comment
Member
There was a problem hiding this comment.
Thanks a lot for putting effort into this 👍🏻 Psalm can stay as you changed it. We need to move this library to PHPStan at some point, but this is a different issue. ;-)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the hard
php: < 8.4Composer ceiling so the library can be installed on PHP 8.4. No runtime API changes.This package currently blocks Composer installs on PHP 8.4 even though the code itself is fine there. We hit that while upgrading a WordPress stack and kept the change intentionally small for upstream.
What changed
composer.json:phprequirement is now>=7.4(still covers 7.4+).qa.yml):psalm.xml: suppress Psalm 6-only findings that would otherwise force BC breaks (MissingOverrideAttribute,ClassMustBeFinal).#[\Override]and sealingWpContextwere deliberately not applied so PHP 7.4 and existing subclasses stay supported.Why reviewers can trust this
Notes for maintainers
WpContextnon-final; factory methods are alreadyfinal.<x.yceiling that blocks early adopters.Test plan
composer updatesucceeds on PHP 8.4