All notable changes of the PHPUnit 10.5 release series are documented in this file using the Keep a CHANGELOG principles.
--debug outputstring cannot be used in customized TestDox outputSourceMapper to scan all <source/> filesTest\AfterLastTestMethodErrored, Test\AfterTestMethodErrored, Test\BeforeTestMethodErrored, Test\PostConditionErrored, and Test\PreConditionErrored eventssystem-out element in JUnit XML logfileassertArrayHasKey(), assertArrayNotHasKey(), arrayHasKey(), and ArrayHasKey::__construct() do not support all possible key types--migrate-configuration does not remove beStrictAboutTodoAnnotatedTests attribute from XML configuration fileDefaultResultCache::mergeWith() for merging result cache instancesStringMatchesFormatDescription constraint to be consistent with PHP's run-tests.phpPHPUnit\Framework\Exception does not handle string error codes (PDOException with error code 'HY000', for example)E_STRICT constant in PHP 8.4trim()med when it contains $ charactername property on <testsuites> element in JUnit XML logfileCallback throws a TypeError when checking a callable has variadic parametersassertJsonStringEqualsJsonString() considers objects with sequential numeric keys equal to be arraysCallback constraint does not handle variadic arguments correctly when used for mock object expectations$ at the beginning gets truncated when used with a data providerfailOnPhpunitDeprecation attribute on the <phpunit> element of the XML configuration file and --fail-on-phpunit-deprecation CLI option for controlling whether PHPUnit deprecations should be considered when determining the test runner's shell exit code (default: do not consider)displayDetailsOnPhpunitDeprecations attribute on the <phpunit> element of the XML configuration file and --display-phpunit-deprecations CLI option for controlling whether details on PHPUnit deprecations should be displayed (default: do not display)--fail-on-phpunit-deprecation CLI option or the failOnPhpunitDeprecation="true" attribute on the <phpunit> element of the XML configuration file.--display-phpunit-deprecations CLI option or the displayDetailsOnPhpunitDeprecations attribute on the <phpunit> element of the XML configuration file.name property on <testsuites> element in JUnit XML logfile.phpstorm.meta.php file as methods such as TestCase::createStub() use generics / template types for their return types and PhpStorm, for example, uses that information@ operator--list-tests and --list-tests-xml CLI options do not report error when data provider method throws exceptionTest\Passed event is not emitted for PHPT tests--coverage-filter CLI option could not be used multiple times--prefer-lowest CLI option also get recent versions)phpunit.xml are not handled correctly when --generate-configuration is used--only-summary-for-coverage-text CLI option to reduce the code coverage report in text format to a summary--show-uncovered-for-coverage-text CLI option to expand the code coverage report in text format to include a list of uncovered filesarray_pop() instead of array_shift() for processing Test objects in TestSuite::run() and optimize TestSuite::isEmpty()TestCase objects early that use a data providerdebug_backtrace()TestCase object after its test was runmethod() on a test stub created using createStubForIntersectionOfInterfaces() throws an unexpected exception@testWith annotation may generate PHP Warning: Uninitialized string offset 0PHPUnitPHAR instead of just PHPUnit for the PHAR distribution of PHPUnitproc_open() if not really neededGroups::groups()NamePrettifier::prettifyTestMethodName()NamePrettifier::prettifyTestMethodName() once againNamePrettifier::prettifyTestMethodName()NamePrettifier::prettifyTestMethodName()TestRunner::runTestWithTimeout()Telemetry\System::snapshot()ExecutionOrderDependency::getTarget() callNamePrettifier::prettifyTestMethodName()-d CLI option multiple times triggers warningHRTime::duration() throws InvalidArgumentException--fail-on-empty-test-suite CLI option is not documented in --help output#[CoversClass] and #[UsesClass] attributes are used with the name of an interface--debug CLI option is used--check-version CLI option--check-version CLI option--log-events-text and --log-events-verbose-text require the destination file to exit--manifest, --sbom, and --composer-lock when the PHAR is usedset_error_handler() in bootstrap scriptctype extension is not loaded but a polyfill for it was installed--debug CLI option as an alias for --no-output --log-events-text php://stdoutwillReturnCallback() does not pass unknown named variadic arguments to callbackLogicalNot constraint (assertNotEquals(), assertStringNotContainsString(), ...) can generate confusing failure messages--log-events-text and --log-events-verbose-text CLI options do not handle absolute and relative pathsTestSuite value object returned by TestSuite\Filtered::testSuite() contains all tests instead of only the filtered testserror_get_last() usage in testsE_USER_ERROR does not abort test execution<coverage> element in XML configuration after migrating configurationTest\AssertionFailed and Test\AssertionSucceeded eventsPHPUnit\Runner\Extension\Facade::requireExportOfObjects() and PHPUnit\Runner\Extension\Facade::requiresExportOfObjects()registerMockObjectsFromTestArgumentsRecursively attribute on the <phpunit> element of the XML configuration filePHPUnit\TextUI\Configuration\Configuration::registerMockObjectsFromTestArgumentsRecursively()static return type declaration when used recursivelyPHPUnit\Framework\TestCase has @internal annotation in PHAR#[IgnoreDeprecations] attribute to ignore E_(USER_)DEPRECATED issues on test class and test method levelwillReturnMap()--composer-lock CLI option for PHAR binary that displays the composer.lock used to build the PHARMockBuilder::disableAutoReturnValueGeneration() and MockBuilder::enableAutoReturnValueGeneration() are no longer deprecatedcreateMockForIntersectionOfInterfaces() does not automatically register mock object for expectation verification