All notable changes of the PHPUnit 9.6 release series are documented in this file using the Keep a CHANGELOG principles.
9.6.33 - 2026-01-27
- To prevent Poisoned Pipeline Execution (PPE) attacks using prepared
.coveragefiles in pull requests, a PHPT test will no longer be run if the temporary file for writing code coverage information already exists before the test runs
9.6.32 - 2026-01-24
PHPUnit\Framework\MockObjectexceptions are now subtypes ofPHPUnit\Exception
9.6.31 - 2025-12-06
- No changes;
phpunit.pharrebuilt with PHP 8.4 to work around PHP-Scoper issue #1139
9.6.30 - 2025-12-01
- Updated list of deprecated PHP configuration settings for PHP 8.4, PHP 8.5, and PHP 8.6
9.6.29 - 2025-09-24
- No changes;
phpunit.pharrebuilt with updated dependencies
9.6.28 - 2025-09-23
- No changes;
phpunit.pharrebuilt with updated dependencies
9.6.27 - 2025-09-14
- #6366: Exclude
__sleep()and__wakeup()from test double code generation on PHP >= 8.5
9.6.26 - 2025-09-11
- Implement
__serialize()in addition to__sleep()(which will be deprecated in PHP 8.5)
9.6.25 - 2025-08-20
- Do not configure
report_memleakssetting (which will be deprecated in PHP 8.5) for PHPT processes
9.6.24 - 2025-08-10
- Do not use
ReflectionProperty::setAccessible()with PHP >= 8.1 - Do not use
SplObjectStoragemethods that will be deprecated in PHP 8.5
9.6.23 - 2025-05-02
- #5956: Improved handling of deprecated
E_STRICTconstant - Improved message when test is considered risky for printing unexpected output
9.6.22 - 2024-12-05
- #6071: PHP Archives (PHARs) of PHPUnit 8.5 and PHPUnit 9.6 bundle outdated versions of Prophecy
9.6.21 - 2024-09-19
- #5956: Deprecation of the
E_STRICTconstant in PHP 8.4 - Removed
.phpstorm.meta.phpfile as methods such asTestCase::createStub()use generics / template types for their return types and PhpStorm, for example, uses that information
9.6.20 - 2024-07-10
- Updated dependencies (so that users that install using Composer's
--prefer-lowestCLI option also get recent versions)
9.6.19 - 2024-04-05
- The namespaces of dependencies are now prefixed with
PHPUnitPHARinstead of justPHPUnitfor the PHAR distribution of PHPUnit
9.6.18 - 2024-03-21
- #5763: Release nullable type changes for PHPUnit 9.6
9.6.17 - 2024-02-23
- Improve output of
--check-versionCLI option - Improve description of
--check-versionCLI option - Show help for
--manifest,--sbom, and--composer-lockwhen the PHAR is used
- #5712: Update dependencies for PHAR distribution of PHPUnit 9.6
9.6.16 - 2024-01-19
- Make PHAR build reproducible (the only remaining differences were in the timestamps for the files in the PHAR)
- #5516: Assertions that use the
LogicalNotconstraint (assertNotEquals(),assertStringNotContainsString(), ...) can generate confusing failure messages - #5666:
--no-extensionsCLI option does not work - #5673: Confusing error message when migration of a configuration is requested that does not need to be migrated
9.6.15 - 2023-12-01
- #5596:
PHPUnit\Framework\TestCasehas@internalannotation in PHAR
9.6.14 - 2023-12-01
- #5577:
--composer-lockCLI option for PHAR binary that displays thecomposer.lockused to build the PHAR
9.6.13 - 2023-09-19
- The child processes used for process isolation now use temporary files to communicate their result to the parent process
9.6.12 - 2023-09-12
- #5508: Generate code coverage report in PHP format as first in list to avoid serializing cache data
9.6.11 - 2023-08-19
- #5478:
assertObjectHasProperty()andassertObjectNotHasProperty()
9.6.10 - 2023-07-10
- #5419: Allow empty
<extensions>element in XML configuration
9.6.9 - 2023-06-11
- #5405: XML configuration migration does not migrate
whitelist/fileelements - Always use
X.Y.Zversion number (and not justX.Y) of PHPUnit's version when checking whether a PHAR-distributed extension is compatible
9.6.8 - 2023-05-11
- #5345: No stack trace shown for previous exceptions during bootstrap
9.6.7 - 2023-04-14
- Tests that have
@doesNotPerformAssertionsdo not contribute to code coverage
9.6.6 - 2023-03-27
- #5270:
GlobalState::getIniSettingsAsString()generates code that triggers warnings
9.6.5 - 2023-03-09
- Backported the HTML and CSS improvements made to the
--testdox-htmlfrom PHPUnit 10
- #5205: Wrong default value for optional parameter of
PHPUnit\Util\Test::parseTestMethodAnnotations()causesReflectionException
9.6.4 - 2023-02-27
- #5186: SBOM does not validate
9.6.3 - 2023-02-04
- #5164:
markTestSkipped()not handled correctly when called in "before first test" method
9.6.2 - 2023-02-04
- #4618: Support for generators in
assertCount()etc. is not marked as deprecated in PHPUnit 9.6
9.6.1 - 2023-02-03
- #5073:
--no-extensionsCLI option only prevents extension PHARs from being loaded - #5160: Deprecate
assertClassHasAttribute(),assertClassNotHasAttribute(),assertClassHasStaticAttribute(),assertClassNotHasStaticAttribute(),assertObjectHasAttribute(),assertObjectNotHasAttribute(),classHasAttribute(),classHasStaticAttribute(), andobjectHasAttribute()
9.6.0 - 2023-02-03
- #5062: Deprecate
expectDeprecation(),expectDeprecationMessage(),expectDeprecationMessageMatches(),expectError(),expectErrorMessage(),expectErrorMessageMatches(),expectNotice(),expectNoticeMessage(),expectNoticeMessageMatches(),expectWarning(),expectWarningMessage(), andexpectWarningMessageMatches() - #5063: Deprecate
withConsecutive() - #5064: Deprecate
PHPUnit\Framework\TestCase::getMockClass() - #5132: Deprecate
Testsuffix for abstract test case classes