Repository navigation
Allow PHPUnit 13 - #12
Merged
Merged
Conversation
Add ^13.0 to the phpunit/phpunit constraint. PHPUnit 13 is the latest stable major; Codeception supports it from 5.3.5. PHPUnit 13 requires PHP >= 8.4.1, so drop --ignore-platform-reqs from the PHP 8.3 and 8.4 CI jobs. Otherwise PHP 8.3 would install a PHPUnit version it cannot run. Without the flag, Composer resolves 12.5 there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compare the failure message against "\n" instead of PHP_EOL, because PHPUnit always joins the message with "\n". This fixes 2 failures on Windows. Use createStub() for ModuleContainer, which has no expectations. This removes the PHPUnit notices reported since PHPUnit 12. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the literal line break added in the previous commit with an escaped newline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MockServer 9 reports a request found more times than expected as "Request found 1 time but should have been found exactly 0 times". The test only accepted the older "Request not found exactly 0 times" wording, so it failed in CI, where the unpinned mockserver/mockserver image now resolves to 9.2.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
^13.0to thephpunit/phpunitconstraint. PHPUnit 13.4.6 is the latest stable release; 14 only exists asdev-main(14.0-dev) and Codeception 5.3.7 caps at^13.0, so it is not included.--ignore-platform-reqsfrom the PHP 8.3 and 8.4 CI jobs. PHPUnit 13 requires PHP >= 8.4.1, so with the flag the PHP 8.3 job would install a version it cannot run.No changes in
src/: the PHPUnit classes it uses (Assert,AssertionFailedError,ExpectationFailedException) work with PHPUnit 13.Resolved versions
Codeception supports PHPUnit 13 from 5.3.5. Resolution only for 8.2, 8.3 and 8.5; tests were run on 8.4.
Test plan
Run locally on Windows with PHP 8.4.27 and MockServer 5.15.0 (jar, not the Docker image):
mainon PHPUnit 12.5.43: the same 2 tests fail, so they are not caused by this change.PHP_EOLbeing\r\non Windows. With\nin a temporary copy, all 13 pass on PHPUnit 13.4.6.experimental, so a failure there won't fail the workflow.Notes (not addressed here)
executionOrder="depends", andphpunit.xmluses a deprecated schema. Migrating it would conflict with the older PHPUnit versions still allowed.createMock()without expectations.🤖 Generated with Claude Code