Repository navigation
fix(deps): revert phpunit to ^11.5 for PHP 8.3 compatibility - #276
Merged
Merged
Conversation
PHPUnit 13 requires PHP >= 8.4.1 and drops doc-comment metadata, which breaks the PHP 8.3 matrix job and the data-provider tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the PHPUnit dependency rollback to ^11.5.
No open issues 🎉
What changed in this PR
Reverts the PHPUnit upgrade from #274 to restore compatibility with MageForge’s supported PHP versions and existing tests.
Changes:
- Changes
phpunit/phpunitfrom^13.4to^11.5, retaining PHP 8.3 support and compatibility with doc-comment test metadata. - Leaves migration to newer PHPUnit versions for a separate follow-up.
| File | Description |
|---|---|
composer.json |
Restores the PHPUnit development dependency to ^11.5. |
Review effort: Balanced
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.
Problem
The PHPUnit workflow has been failing on
mainsince #274 (phpunit/phpunit^11.5→^13.4):composer installfails, because PHPUnit 13 requires PHP >= 8.4.1 while the module supports~8.3.0||~8.4.0||~8.5.0.@dataProvidertests inTemplateCopierTestfail withArgumentCountError. There are also many "no expectations configured" mock deprecations.Fix
Restore
phpunit/phpunitto^11.5, which works on every supported PHP version (the full suite passes locally on 11.5.56).Follow-up (not part of this PR)
A move to PHPUnit 12/13 needs the tests migrated to attributes and the mocks cleaned up. 13 additionally requires dropping PHP 8.3 support. Consider ignoring major
phpunit/phpunitupdates in.github/dependabot.ymluntil then.