Repository navigation
Issue/622 Upgrade PHPUnit to 10 - #632
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
artem-dev2
approved these changes
Oct 29, 2026
This was referenced Oct 29, 2026
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.
Closes #622.
What changed
composer.json:phpunit/phpunitgoes from^9.0to^10.5. It is a development dependency, so applications are not affected.phpunit.xmlis migrated to the PHPUnit 10 schema (verboseandconvertDeprecationsToExceptionsare gone,<coverage>becomes<source>, and the cache directory.phpunit.cache, already in.gitignore, is set).static, as PHPUnit 10 expects (18 deprecations).error_reportinginphpunit.xmlis now-1, as Symfony and Doctrine ORM set it. It was the textE_ALL & ~E_DEPRECATED, which PHP reads as0, so every PHP warning was hidden in the tests on PHPUnit 9. The same setting intests/bootstrap.phpis removed.core:envprinted.env is successfully generatedand tried to copy the file after.env.example file not found: it now stops after the error (src/Console/Commands/EnvCommand.php).flush()of the session adapters calledsession_destroy()with no active session, so calling it twice raised a warning that the error handler turns into an exception (src/Session/Traits/SessionTrait.php).listDirectory()of the Dropbox and Google Drive adapters returnednull, orfalseonly through a caught warning, for a response withoutentriesorfiles. It now returnsfalse, as its contract says.OpenApiCommandTestfixtures had#[OA\Info]and no endpoint, which swagger-php reports asRequired @OA\PathItem() not found; they now have one (test only).Why
PHPUnit 9 is no longer the current line, and PHP 8.1 (#595) made PHPUnit 10 possible. Running the suite on PHPUnit 10 showed 6 tests that PHPUnit 9 passes. They are not caused by PHPUnit 10: the same 6 fail on PHPUnit 9 once
error_reportingis a real number. The setting inphpunit.xmlnever worked, so each of them triggers a real PHP warning that was hidden.Breaking changes
None for applications. A contributor has to run
composer updateto get PHPUnit 10.Testing
--stderr --fail-on-warning --fail-on-risky): 1834 tests with 31 errors, allClass "Redis" not foundorClass "Memcached" not found(the extensions are missing where I ran it, and CI provides them), and 0 PHPUnit deprecations. PHPUnit 9 shows the same 31.QueryIdiormTestfailures from a PDO driver that is missing in that PHP install.composer testwith--coverage-clover, because there is no coverage driver where I ran it, so the Codecov upload is only checked by CI here.ZipAdapterTest::testExtractToFromZipfailure appeared once in a full run and not in the next run or when the class ran alone, so it looks like a flaky file state on Windows.Notes for reviewers
3.1.x.tests/Unit/ErrorReportingTest.php, a guard test added in the sixth commit, is removed in the seventh: PHPUnit 10 lowerserror_reportingitself while it handles errors, so a test cannot read the configured level.