The baseline generated using --generate-baseline contains an issue once for each time it was triggered, for instance once for each data set of a test that uses a data provider, instead of once
A baseline is not applied to the issues that are triggered in a file that is not located in the directory of the baseline, or in a directory below it, for instance when the baseline is located in build/baseline.xml and the file in src
When --log-junit php://stdout is used, or php://stdout is configured for the JUnit XML logfile in the XML configuration file, and the test runner prints its regular output, the test runner ends with An error occurred inside PHPUnit after the JUnit XML was printed: the test results are not printed, code coverage reports and the baseline are not written, and the shell exit code is 255
When --log-junit php://stdout is used together with --stderr, the JUnit XML is printed to the standard error stream
When no test is run, --compact only prints No tests executed! and not why, for instance the PHPUnit error for the invalid data provider of the only test, or the test runner warning for a test class without tests
Learn how to install or update PHPUnit 13.4 in the documentation.
When an order is configured on the command line, for instance using --order-by random, defects configured using the executionOrder attribute in the XML configuration file is still applied, and vice versa
Using default together with an order for --order-by or the executionOrder XML configuration attribute, for instance default,random, triggers a deprecation for using more than one order, although default resets the order instead of selecting one
--fail-on-skipped does not make the test runner exit with a shell exit code that indicates failure when a test class is skipped, for instance because its before-first-test method calls markTestSkipped(), although its tests are counted as skipped
--stop-on-skipped does not stop the test run when a test class is skipped, for instance because its before-first-test method calls markTestSkipped()
When coverage contribution is required, a test is considered risky because it does not contribute to code coverage although it executed covered code, when the code coverage driver collects hit counts and each covered line that the test executed was executed more than once
When PHPUnit is installed using Composer, code units in the PHPUnit\ or SebastianBergmann\ namespace that do not belong to PHPUnit or one of its dependencies are preloaded on startup, which leads to a fatal error when such a code unit depends on code that is not available
Code from sebastian/file-filter and sebastian/git-state is not treated like code from PHPUnit's other dependencies, for instance stack frames from it are not filtered from stack traces
Code from nikic/php-parser and parts of the code from phar-io/manifest are not treated like code from PHPUnit's other dependencies, for instance stack frames from it are not filtered from stack traces
Learn how to install or update PHPUnit 13.4 in the documentation.
Issues whose message refers to an anonymous class could not be ignored using a baseline on PHP 8.6 (as of PHP 8.6, such messages contain the full name of the anonymous class: a NUL byte followed by the file, line, and a counter)
Make PHAR build reproducible across filesystems (files are now added to the PHAR sorted by their path instead of in the order in which the filesystem lists them)
Fixed
When method() is called for a method of a test double that cannot be configured, for instance because it does not exist, every subsequent invocation of a method of that test double fails with Method name is not configured
When a hook method of a test, for instance setUp(), marks the test as incomplete, the hook method is reported as failed
When an "after test" method, for instance tearDown(), marks a successful test as incomplete or skips it, the test is reported as failed
When a before-first-test method, for instance setUpBeforeClass(), calls markTestIncomplete(), each test of the test class is reported as failed instead of the test class being skipped as it is when markTestSkipped() is called
When an after-last-test method, for instance tearDownAfterClass(), calls markTestIncomplete() or markTestSkipped() after the tests of the test class have been run, this is reported as a failure, also for each test of the test class that is run in process isolation
A failed PHP assertion, made using assert(), in a hook method is reported as an error of that method instead of as a failure, and it is counted as an error instead of as a failure when that method is a before-first-test method or an after-last-test method
When an assertion fails in an "after test" method, for instance tearDown(), of a test that already failed, errored, or was marked as incomplete, a failure is reported in addition to the outcome of the test, so the test is counted more than once and onNotSuccessfulTest() is called with the failure from the "after test" method instead of the test's own
When a test fails because of an exception of a registered failure type, an error or a failure in an "after test" method, for instance tearDown(), is reported in addition to the test's failure, so the test is counted more than once
A test that fails because of an exception of a registered failure type is considered risky when it does not perform assertions or, when requireCoverageMetadata="true" is configured, when it does not define a code coverage target, unlike a test that fails because an assertion failed
The TestDox output does not show the failure of a before-first-test method or an after-last-test method, for instance an assertion failure in setUpBeforeClass()
Control characters and ANSI escape sequences in user-supplied strings are not made visible in the output of --debug and in the logfiles written by --log-events-text and --log-events-verbose-text
Groups configured for a test directory or test file using the groups attribute of <directory> or <file> in the XML configuration file are not assigned to PHPT tests, so --group and --exclude-group do not select them and --list-groups and --list-tests-xml report them as being in the default group or not at all
Removed
The library PHAR (phpunit-library-X.Y.Z.phar) is no longer built, it could not be loaded since PHPUnit 9.5.8
Learn how to install or update PHPUnit 13.4 in the documentation.
The static analysis cache directory that is automatically created in the operating system's path used for temporary files when no cache directory is configured is not used when the POSIX extension is not loaded
Learn how to install or update PHPUnit 13.4 in the documentation.
The TeamCity logger writes testSuiteFinished twice for a test class when one of its before-first-test methods errors or fails
The TestDox output shows a less important outcome of a test that has more than one outcome, for instance the failure in tearDown() of a test that errored
When the test run is interrupted by a signal while a test is run in process isolation, the result of the test is discarded and the test is counted as passed, and the TestDox output cannot be printed
When no static analysis cache directory is configured, the cache directory that is automatically created in the operating system's path used for temporary files is also used when it was created by another user or can be written to by other users
The directory in the operating system's path used for temporary files in which the temporary files for collecting code coverage for a PHPT test are created has a fixed name, and is also used when it was created by another user, who can then replace the code of the PHPT test before it is executed
Learn how to install or update PHPUnit 13.4 in the documentation.
The dependencies of a test that are listed after a dependency on a test that does not return a value, or after a dependency on a larger test, were not checked, so the test was run instead of being skipped when one of these dependencies had not passed
Tests could not be run in process isolation when the namespace of the test class begins with a name that the code of the child process imports, for instance CodeCoverage or Facade
A test that is run in process isolation aborts the test run when its data set or a value returned by a test it depends on cannot be serialized, for instance because it is a closure
When a before-first-test method or an after-last-test method errors or fails, the remaining methods of the same kind are still called, and each of them that does not error or fail itself is reported with the exception of the earlier method
When a hook method of a test, for instance a #[Before] method, skips the test, the remaining hook methods of the same kind are still called, so the test is reported as errored instead of skipped when one of them errors
An error or failure in a before-first-test method or an after-last-test method that is called again in the child process of a test that is run in process isolation is reported twice, once for the test class and once for the test
When a before-first-test method errors, the progress output shows one E for the test class instead of one for each of its tests, only one of its tests is counted as run, and the test that is run next is shown as an error
When a before-first-test method fails, the progress output shows nothing for the tests of the test class and only one of them is counted as run
The Open Test Reporting XML logfile has no start for a test that errors before it is prepared, for instance because it depends on a test that does not exist, and no end for the test that is run after a test that is skipped because a test it depends on did not pass or because one of its
requirements is not met
The Open Test Reporting XML logfile has no entry for a test that is marked as incomplete before it is prepared, for instance in setUp(), and reports the test that is run after it as aborted with the message of the incomplete test
The Open Test Reporting XML logfile has no end for the test that is run after a test whose preparation errors, for instance because setUp() raises an exception or the global state cannot be backed up
The Open Test Reporting XML logfile reports a test that has more than one outcome, for instance because tearDown() fails after the test errored, with its last outcome instead of its most severe one, and with more than one end when the preparation of the test errored
The Open Test Reporting XML logfile is not well-formed when a test name, a message, the output of a test, or the string representation of an exception contains ]]>, bytes that are not valid UTF-8, or characters that are not allowed in XML, for instance the escape character of an ANSI
escape sequence
The Open Test Reporting XML logfile reports an issue that is triggered before a test is prepared, for instance in setUp(), with an empty ID before the start of the test
Learn how to install or update PHPUnit 13.4 in the documentation.
#7033: Compact printer is created although an extension replaces the progress output
#7035: Sorting tests by duration recomputes the duration of a test suite for every comparison
Sorting tests by size recomputes the size of a test suite for every comparison
expectUserDeprecationMessage() and expectUserDeprecationMessageMatches() did not see the deprecations triggered by an attempt of a retried test and saw those of the previously run test instead
The status of a test whose mock object raises an exception in its destructor is success although the test is reported as errored, so #[Retry] does not retry the test, --repeat does not skip the remaining repetitions, tearDown() sees the wrong status, and code coverage records the test as successful
Named arguments passed to with() were matched by position instead of by name, so an expectation such as ->with(b: 7) compared the expected value with the first parameter of the method and the parameter named $b was not checked
String keys of the parameter sets passed to withParameterSetsInOrder(), withParameterSetsInAnyOrder(), and withParameterSetsInPartialOrder() were ignored, so a parameter set such as ['b' => 7] compared the expected value with the first parameter of the method and the parameter
named $b was not checked
Learn how to install or update PHPUnit 13.4 in the documentation.
The Software Bill of Materials (SBOM) embedded in the PHAR now uses CycloneDX 1.7 and provides the NTIA minimum elements as well as the data fields that BSI TR-03183-2 (version 2.1.0) requires for logical and identified components, including component creators, original, distribution and effective licences, source code URIs, and the PHP runtime and its extensions as external components
Fixed
#7029: TestSuite::runTests() doubles garbage collector time when zend.exception_ignore_args is off
setUpBeforeClass() and tearDownAfterClass() were run twice for a test class that is the only test class in a test suite of the XML configuration file that has the name of that test class
Tests could not be run in process isolation when the path of the bootstrap script, the test file, or the directory for temporary files contained a single quote
Arguments in the --ARGS-- section of a PHPT test that start with - were interpreted by PHP instead of being passed to the test when the test also has a --STDIN-- section
Recording the tests that passed in a child process copied all tests that had passed so far, which made running many tests in process isolation increasingly slow
Learn how to install or update PHPUnit 13.4 in the documentation.
#6585: executionOrder attribute values and --order-by token lists that spell the order before defects, for example duration-ascending,defects
#6585: pipeline() on the TestSuite\Sorted event for inspecting which reordering stages were applied
#6686: Constraint::negatedToString() and Constraint::negatedFailureDescription() for authoring the description of a constraint that is wrapped in LogicalNot
#6957: Allow ordering tests by the time their source files were last modified
#6958: Select the tests that are in all of several groups
#6960: Record the order in which methods of mock objects are invoked
#6964: #[RequiresClass] attribute to skip a test if a class does not exist
#6995: ChildProcessExtension interface for extensions that need to be bootstrapped in the child process of a test that runs in process isolation
--coverage-jsonl CLI option and <jsonl> element for the XML configuration file to write a code coverage report in JSONL format, one JSON object per line, that reports uncovered code rather than every executable line
--timeout CLI option to limit the wall-clock time of the entire test run
requireCoverageMetadataOnSmallTests, requireCoverageMetadataOnMediumTests, and requireCoverageMetadataOnLargeTests attributes for the XML configuration file to require code coverage metadata depending on the size of a test; these have precedence over requireCoverageMetadata
Changed
Output printed by a test is now shown in the compact output as a --- OUTPUT: record that is attributed to the test instead of being passed through unformatted; the record is omitted when beStrictAboutOutputDuringTests or --disallow-test-output already reports the output as risky
Deprecated
#6585: Writing defects before the order for --order-by and executionOrder, which will change meaning in PHPUnit 14
#6585: depends and no-depends for --order-by and executionOrder
#6585: Configuring more than one order for --order-by and executionOrder
#6585: Unknown values for the executionOrder XML configuration attribute, which are currently ignored
#6686: Constraint::failureDescriptionInContext() and LogicalNot::negate()
#6999: Class-level #[Group], #[Ticket], #[Small], #[Medium], and #[Large] on parent classes of test classes
Fixed
Issues that are listed in the baseline are not ignored for tests that are run in a separate process
A test that is run in process isolation aborts the test run when its result cannot be unserialized, for instance because it returns an object that holds a test double
A test that uses #[DataProviderClosure] errors when it is run in process isolation
Learn how to install or update PHPUnit 13.4 in the documentation.
The first attempt of a test that is retried is reported as attempt 1 of 1 in events, instead of attempt 1 of the configured maximum number of attempts
The class name argument of #[RequiresMethod] is declared as class-string, so static analysis reports an error when it refers to a class that does not exist
A #[RequiresMethod] attribute that refers to a class which cannot be loaded, for instance because its parent class does not exist, aborts the test run instead of skipping the test
Learn how to install or update PHPUnit 13.3 in the documentation.
Control characters and ANSI escape sequences in user-supplied strings such as test names, data set names, and messages are now made visible as \u{NNNN} escape sequences instead of being passed through to the terminal
Control characters in user-supplied strings are now also made visible in the compact output
Line feeds in the name of a test no longer break the header line of a record in the compact output
Learn how to install or update PHPUnit 13.3 in the documentation.
#6965: Temporary file used by SourceMapper may be deleted prematurely
The compact output displays details on PHPUnit deprecations and PHPUnit notices even when --display-phpunit-deprecations and --display-phpunit-notices are not used
The summary line of the compact output does not report the number of PHPUnit deprecations, PHPUnit notices, and PHPUnit warnings
Learn how to install or update PHPUnit 13.3 in the documentation.
Paths of included files are now escaped when generating the code that is executed in a separate process, so that a path containing special characters no longer produces broken code
Tests of a test class that is skipped as a whole are missing from the TestDox output
A test that is skipped or marked incomplete before it started is missing from the TestDox output
A test that is marked incomplete before it started is not counted in the number of tests that ran
No progress is printed for a test that is marked incomplete before it started
Learn how to install or update PHPUnit 13.3 in the documentation.
#6546: Both property hooks can now be configured on test doubles of virtual hooked properties, even when the doubled property only declares one of them
--record-test-run-history and --do-not-record-test-run-history CLI options as well as the recordTestRunHistory attribute for the XML configuration file to control whether the status and duration of each test are recorded for use by --order-by defects and --order-by duration-*
--without-class-view CLI option and classView attribute for the XML configuration file to disable the class-oriented view in the HTML code coverage report
--without-file-view CLI option and fileView attribute for the XML configuration file to disable the file-oriented view in the HTML code coverage report
{PWD} is now substituted with the directory of the PHPT test file in --ENV-- and --INI-- sections of PHPT test files
{TMP} (system directory for temporary files) and {ENV:name} (value of environment variable name) are now substituted in --INI-- sections of PHPT test files
A PHPT test whose --INI-- section references an environment variable that is not set is now skipped
A --SKIPIF-- section of a PHPT test file that prints xfail <reason> now marks the test as expected to fail, as if the PHPT test file had an --XFAIL-- section with that reason
The test runner no longer crashes when an attribute cannot be instantiated
Improved TestDox HTML report
The feature formerly named "test result cache" is now named "test run history"; when a cache directory is configured, the file it is stored in is now named test-run-history instead of test-results
The test runner warns now when ordering by defects or duration is configured but recording of the test run history is disabled
TestCase no longer captures error_log() output for tests that do not use expectErrorLog(), avoiding the cost of setting up error log redirection for every test
error_log() output from tests without an expectation is no longer echoed (date-stripped) to PHPUnit's output; it goes to the configured error log again, as it did before capture was introduced
A test running in process isolation that calls error_log() without expectErrorLog() now produces stderr output in the child process, which the test runner reports as a test error
A PHPT test that is expected to fail (--XFAIL-- section or xfail output from the --SKIPIF-- section) but passes is now considered risky; this usually means the expected-failure marker is stale and should be removed
A PHPT test whose --SKIPIF-- section produces output that is not recognized is now considered risky; this usually means the skip check itself is broken. The keywords understood by PHP's own test runner that have no PHPUnit counterpart (info, warn, xleak, flaky, and nocache) are tolerated and do not make the test risky
PHPT tests now run with additional INI defaults for deterministic output (date.timezone=UTC, display_startup_errors=1, fatal_error_backtraces=Off, ignore_repeated_errors=0, precision=14, serialize_precision=-1), consistent with PHP's own test runner; all of them can be overridden per test using the --INI-- section
Deprecated
--cache-result CLI option, use --record-test-run-history instead
--do-not-cache-result CLI option, use --do-not-record-test-run-history instead
cacheResult XML configuration attribute, use recordTestRunHistory instead
PHPUnit\TextUI\Configuration\Configuration::cacheResult(), use PHPUnit\TextUI\Configuration\Configuration::recordTestRunHistory() instead
PHPUnit\TextUI\Configuration\Configuration::testResultCacheFile(), use PHPUnit\TextUI\Configuration\Configuration::testRunHistoryFile() instead
Fixed
Doubling a class with a property that declares both a final and a non-final hook no longer triggers a fatal error
expectErrorLog() now only considers error_log() output written after it was called; previously, the expectation was also satisfied by output written before expectErrorLog() was called
PHPT test files with an unknown section, a duplicated section, more than one of the --FILE--, --FILEEOF--, and --FILE_EXTERNAL-- sections, or more than one expectation section (--EXPECT--, --EXPECTF--, --EXPECTREGEX--, and their _EXTERNAL variants) are now rejected; previously, misspelled sections were silently ignored and duplicated sections silently overwrote each other
The regular expression from an --EXPECTREGEX-- section must now match the PHPT test's entire output, and . now matches newline characters, consistent with PHP's own test runner; previously, a match on a substring of the output was sufficient for the test to pass
The reason printed by a --SKIPIF-- section of a PHPT test is no longer mangled when it follows the skip <reason> convention used by PHP's own test suite; previously, the first two characters of the reason were stripped unless the skip: <reason> or skip - <reason> convention was used
The test runner no longer aborts with an uncaught PHPUnit\Runner\Phpt\InvalidPhptFileException when a PHPT test file has an empty --FILE-- or --FILEEOF-- section or a --FILE_EXTERNAL-- section that references an empty file; such a file is now rejected while it is parsed and reported as an errored test
PHPUnit\Runner\Phpt\InvalidPhptFileException now has a message that explains why the PHPT test file was rejected
Learn how to install or update PHPUnit 13.3 in the documentation.
Messages for tests that are skipped because of an unsatisfied RequiresPhp, RequiresPhpunit, or RequiresPhpExtension version requirement now include the version that is actually being used
Warning messages about incomplete version requirements as well as version requirements without a version comparison operator, and the error message for invalid version requirements, now include the full version requirement and explain what is expected
Fixed
#6825: Forwarding to previous error handler can result in infinite recursion
#6831: PHPUnit's error handler does not respect @ error suppression and forwards suppressed warnings to previous error handler
#6833: assertArrayHasKey() does not accept ArrayAccess implementations with a specific value type when test code is analysed with PHPStan at level 9
#6854: Deprecation triggered in first-party code is wrongly classified as indirect when the first-party code is called from third-party code
Test classes were not sorted relative to each other when tests were ordered by duration
Learn how to install or update PHPUnit 13.2 in the documentation.
#6681: Comment-aware variants of XML comparison assertions
The executionOrder attribute in the XML configuration file now accepts defects combined with any main order, as well as three-way combinations of depends/no-depends, defects, and a main order (for example, depends,defects,duration-ascending)
--validate-configuration CLI option to validate an XML configuration file for PHPUnit
Report TestDox information in Open Test Reporting XML
Report per-test and per-test-suite resource usage (time, memory usage, peak memory usage) in Open Test Reporting XML
Report number of assertions performed for each test in Open Test Reporting XML
Report structured comparison failure details (expected, actual, diff) in Open Test Reporting XML
Report random order seed in Open Test Reporting XML when test execution order is randomised
#6535: Use sebastian/file-filter in SourceFilter::includes() for issue trigger identification
#6581: Allow #[IgnoreDeprecations] to be repeated
#6609: Skip data providers whose method cannot match --filter
#6685: Generate failure messages for inverse assertions by authoring negations, not by rewriting strings
Only errors and failures are now considered for "defect first" test reordering (tests that triggered deprecations, notices, or warnings as well as incomplete, risky, and skipped tests were previous also considered)
A warning is now emitted when closures are compared for equality using the IsEqual, IsEqualCanonicalizing, IsEqualIgnoringCase, IsEqualWithDelta, and TraversableContainsEqual constraints or the assertEquals(), assertEqualsCanonicalizing(), assertEqualsIgnoringCase(), assertEqualsWithDelta(), and assertContainsEquals() assertions
Deprecated
#6075: --order-by duration CLI option, use --order-by duration-ascending instead
#6075: --order-by size CLI option, use --order-by size-ascending instead
#6075: executionOrder="duration" XML configuration attribute value, use executionOrder="duration-ascending" instead
#6075: executionOrder="size" XML configuration attribute value, use executionOrder="size-ascending" instead
#6560: Soft-deprecate expectExceptionMessage(), use expectExceptionMessageIsOrContains() instead
Fixed
#5845: Error handlers registered before PHPUnit (e.g. via auto_prepend_file) cause false "risky test" warnings
#5851: Output buffer manipulation in tests causes incorrect capture, hangs, and silent failures
#6582: TestSuiteSorter::cmpSize() does not handle TestSuite objects for TestCase classes
Learn how to install or update PHPUnit 13.2 in the documentation.
#6595: Crash when before-class or after-class method fails with assertion failure
#6599: TeamCity logger does not wrap failures in before-test methods with testStarted and testFinished
#6601: Anonymous classes are not rejected with a clear error when creating a test double
#6603: assertArrays*IgnoringOrder() fails on mixed scalar types and on reordered nested associative arrays
MockBuilder::setMockClassName() and TestStubBuilder::setStubClassName() now reject values that are not valid unqualified PHP class identifiers, throwing the new InvalidClassNameException
The regular expression used by Generator::ensureValidMethods() to validate method names passed to MockBuilder::onlyMethods() and addMethods() was not anchored, so any string containing a valid identifier substring (including strings with parentheses, braces, comments, or newlines) was accepted
Learn how to install or update PHPUnit 13.1 in the documentation.
Support for configuring HTML code coverage report options (colors, thresholds, custom CSS) in XML configuration file without requiring an outputDirectory attribute, allowing the output directory to be specified later with the --coverage-html CLI option
Support for configuring dark mode colors, progress bar colors, and breadcrumb colors for HTML code coverage reports in the XML configuration file
Changed
#6557: Improve failure description for StringMatchesFormatDescription constraint which is used by assertFileMatchesFormat(), assertFileMatchesFormatFile(), assertStringMatchesFormat(), assertStringMatchesFormatFile(), and EXPECTF sections of PHPT test files
The HTML code coverage report now uses a more colorblind-friendly blue/amber/orange palette by default
Extracted PHPUnit\Runner\Extension\Facade from a concrete class to an interface and introduced an internal ExtensionFacade implementation, so that extensions only depend on the Facade interface while PHPUnit internally uses the ExtensionFacade class that also provides query methods
Deprecated
#6515: Deprecate the --log-events-verbose-text <file> CLI option
#6537: Soft-deprecate id() and after() for mock object expectations
#4440: Improve error when configured code coverage file list is empty
#6549: Allow to stub both hooks of non-virtual properties
Fixed
#6529: Git "detached HEAD state" in Open Test Reporting (OTR) XML logger not handled properly
#6545: Stubbing a class with set property hook leaves property uninitialized by default
The RegularExpression and StringMatchesFormatDescription did not handle preg_match() errors such as Compilation failed: regular expression is too large
Learn how to install or update PHPUnit 13.0 in the documentation.
#6450: TestCase::invokeTestMethod() method for customizing test method invocation
#6455: withParameterSetsInOrder() and withParameterSetsInAnyOrder() for expecting calls to the same method of a mock object but with different arguments
--test-files-file <file> CLI option to configure a file that contains the paths to the test files to be loaded (one file per line); use this when using CLI arguments is not an option due to argument length limitations
The baseline generated using --generate-baseline contains an issue once for each time it was triggered, for instance once for each data set of a test that uses a data provider, instead of once
A baseline is not applied to the issues that are triggered in a file that is not located in the directory of the baseline, or in a directory below it, for instance when the baseline is located in build/baseline.xml and the file in src
When --log-junit php://stdout is used, or php://stdout is configured for the JUnit XML logfile in the XML configuration file, and the test runner prints its regular output, the test runner ends with An error occurred inside PHPUnit after the JUnit XML was printed: the test results are not printed, code coverage reports and the baseline are not written, and the shell exit code is 255
When --log-junit php://stdout is used together with --stderr, the JUnit XML is printed to the standard error stream
Learn how to install or update PHPUnit 12.5 in the documentation.
When an order is configured on the command line, for instance using --order-by random, defects configured using the executionOrder attribute in the XML configuration file is still applied, and vice versa
--fail-on-skipped does not make the test runner exit with a shell exit code that indicates failure when a test class is skipped, for instance because its before-first-test method calls markTestSkipped(), although its tests are counted as skipped
--stop-on-skipped does not stop the test run when a test class is skipped, for instance because its before-first-test method calls markTestSkipped()
When PHPUnit is installed using Composer, code units in the PHPUnit\ or SebastianBergmann\ namespace that do not belong to PHPUnit or one of its dependencies are preloaded on startup, which leads to a fatal error when such a code unit depends on code that is not available
Code from nikic/php-parser and parts of the code from phar-io/manifest are not treated like code from PHPUnit's other dependencies, for instance stack frames from it are not filtered from stack traces
Learn how to install or update PHPUnit 12.5 in the documentation.
Issues whose message refers to an anonymous class could not be ignored using a baseline on PHP 8.6 (as of PHP 8.6, such messages contain the full name of the anonymous class: a NUL byte followed by the file, line, and a counter)
Make PHAR build reproducible across filesystems (files are now added to the PHAR sorted by their path instead of in the order in which the filesystem lists them)
Fixed
When method() is called for a method of a test double that cannot be configured, for instance because it does not exist, every subsequent invocation of a method of that test double fails with Method name is not configured
When a hook method of a test, for instance setUp(), marks the test as incomplete, the hook method is reported as failed
When an "after test" method, for instance tearDown(), marks a successful test as incomplete or skips it, the test is reported as failed
When a before-first-test method, for instance setUpBeforeClass(), calls markTestIncomplete(), each test of the test class is reported as failed instead of the test class being skipped as it is when markTestSkipped() is called
When an after-last-test method, for instance tearDownAfterClass(), calls markTestIncomplete() or markTestSkipped() after the tests of the test class have been run, this is reported as a failure, also for each test of the test class that is run in process isolation
A failed PHP assertion, made using assert(), in a hook method is reported as an error of that method instead of as a failure, and it is counted as an error instead of as a failure when that method is a before-first-test method or an after-last-test method
When an assertion fails in an "after test" method, for instance tearDown(), of a test that already failed, errored, or was marked as incomplete, a failure is reported in addition to the outcome of the test, so the test is counted more than once and onNotSuccessfulTest() is called with the failure from the "after test" method instead of the test's own
When a test fails because of an exception of a registered failure type, an error or a failure in an "after test" method, for instance tearDown(), is reported in addition to the test's failure, so the test is counted more than once
A test that fails because of an exception of a registered failure type is considered risky when it does not perform assertions or, when requireCoverageMetadata="true" is configured, when it does not define a code coverage target, unlike a test that fails because an assertion failed
The TestDox output does not show the failure of a before-first-test method or an after-last-test method, for instance an assertion failure in setUpBeforeClass()
Control characters and ANSI escape sequences in user-supplied strings are not made visible in the output of --debug and in the logfiles written by --log-events-text and --log-events-verbose-text
Groups configured for a test directory or test file using the groups attribute of <directory> or <file> in the XML configuration file are not assigned to PHPT tests, so --group and --exclude-group do not select them and --list-groups and --list-tests-xml report them as being in the default group or not at all
Removed
The library PHAR (phpunit-library-X.Y.Z.phar) is no longer built, it could not be loaded since PHPUnit 9.5.8
Learn how to install or update PHPUnit 12.5 in the documentation.
The static analysis cache directory that is automatically created in the operating system's path used for temporary files when no cache directory is configured is not used when the POSIX extension is not loaded
Learn how to install or update PHPUnit 12.5 in the documentation.
The TeamCity logger writes testSuiteFinished twice for a test class when one of its before-first-test methods errors or fails
The TestDox output shows a less important outcome of a test that has more than one outcome, for instance the failure in tearDown() of a test that errored
When no static analysis cache directory is configured, the cache directory that is automatically created in the operating system's path used for temporary files is also used when it was created by another user or can be written to by other users
Learn how to install or update PHPUnit 12.5 in the documentation.
The dependencies of a test that are listed after a dependency on a test that does not return a value, or after a dependency on a larger test, were not checked, so the test was run instead of being skipped when one of these dependencies had not passed
Tests could not be run in process isolation when the namespace of the test class begins with a name that the code of the child process imports, for instance CodeCoverage or Facade
A test that is run in process isolation aborts the test run when its data set or a value returned by a test it depends on cannot be serialized, for instance because it is a closure
When a before-first-test method or an after-last-test method errors or fails, the remaining methods of the same kind are still called, and each of them that does not error or fail itself is reported with the exception of the earlier method
When a hook method of a test, for instance a #[Before] method, skips the test, the remaining hook methods of the same kind are still called, so the test is reported as errored instead of skipped when one of them errors
An error or failure in a before-first-test method or an after-last-test method that is called again in the child process of a test that is run in process isolation is reported twice, once for the test class and once for the test
When a before-first-test method errors, the progress output shows one E for the test class instead of one for each of its tests, only one of its tests is counted as run, and the test that is run next is shown as an error
When a before-first-test method fails, the progress output shows nothing for the tests of the test class and only one of them is counted as run
The Open Test Reporting XML logfile has no start for a test that errors before it is prepared, for instance because it depends on a test that does not exist, and no end for the test that is run after a test that is skipped because a test it depends on did not pass or because one of its
requirements is not met
The Open Test Reporting XML logfile has an end without an ID for a test that is marked as incomplete before it is prepared, for instance in setUp(), and no end for the test that is run after it
The Open Test Reporting XML logfile has no end for the test that is run after a test whose preparation errors, for instance because setUp() raises an exception or the global state cannot be backed up
The Open Test Reporting XML logfile has more than one end for a test that has more than one outcome, for instance because tearDown() fails after the test errored
The Open Test Reporting XML logfile is not well-formed when a test name, a message, or the string representation of an exception contains ]]>, bytes that are not valid UTF-8, or characters that are not allowed in XML, for instance the escape character of an ANSI escape sequence
Learn how to install or update PHPUnit 12.5 in the documentation.
#7053: Extensions loaded using -d extension or -d zend_extension are not loaded in child processes
The status of a test whose mock object raises an exception in its destructor is success although the test is reported as errored, so tearDown() sees the wrong status and code coverage records the test as successful
Named arguments passed to with() were matched by position instead of by name, so an expectation such as ->with(b: 7) compared the expected value with the first parameter of the method and the parameter named $b was not checked
When code coverage is collected and no code coverage driver is available in a child process, a test that is run in process isolation errors and a PHPT test fails instead of a warning being emitted
Learn how to install or update PHPUnit 12.5 in the documentation.
The Software Bill of Materials (SBOM) embedded in the PHAR now uses CycloneDX 1.7 and provides the NTIA minimum elements as well as the data fields that BSI TR-03183-2 (version 2.1.0) requires for logical and identified components, including component creators, original, distribution and effective licences, source code URIs, and the PHP runtime and its extensions as external components
Fixed
setUpBeforeClass() and tearDownAfterClass() were run twice for a test class that is the only test class in a test suite of the XML configuration file that has the name of that test class
Tests could not be run in process isolation when the path of the bootstrap script, the test file, or the directory for temporary files contained a single quote
A test that is run in process isolation aborts the test run when its result cannot be unserialized, for instance because it returns an object that holds a test double
Issues that are listed in the baseline are not ignored for tests that are run in a separate process
Arguments in the --ARGS-- section of a PHPT test that start with - were interpreted by PHP instead of being passed to the test when the test also has a --STDIN-- section
Recording the tests that passed in a child process copied all tests that had passed so far, which made running many tests in process isolation increasingly slow
Learn how to install or update PHPUnit 12.5 in the documentation.
The class name argument of #[RequiresMethod] is declared as class-string, so static analysis reports an error when it refers to a class that does not exist
A #[RequiresMethod] attribute that refers to a class which cannot be loaded, for instance because its parent class does not exist, aborts the test run instead of skipping the test
Learn how to install or update PHPUnit 12.5 in the documentation.
Control characters and ANSI escape sequences in user-supplied strings such as test names, data set names, and messages are now made visible as \u{NNNN} escape sequences instead of being passed through to the terminal
Learn how to install or update PHPUnit 12.5 in the documentation.
Paths of included files are now escaped when generating the code that is executed in a separate process, so that a path containing special characters no longer produces broken code
Tests of a test class that is skipped as a whole are missing from the TestDox output
A test that is skipped or marked incomplete before it started is missing from the TestDox output
A test that is marked incomplete before it started is not counted in the number of tests that ran
No progress is printed for a test that is marked incomplete before it started
Learn how to install or update PHPUnit 12.5 in the documentation.
#6596: Backport TestCase::invokeTestMethod() method for customizing test method invocation from PHPUnit 13
Fixed
#6595: Crash when before-class or after-class method fails with assertion failure
#6599: TeamCity logger does not wrap failures in before-test methods with testStarted and testFinished
#6601: Anonymous classes are not rejected with a clear error when creating a test double
MockBuilder::setMockClassName() and TestStubBuilder::setStubClassName() now reject values that are not valid unqualified PHP class identifiers, throwing the new InvalidClassNameException
The regular expression used by Generator::ensureValidMethods() to validate method names passed to MockBuilder::onlyMethods() and addMethods() was not anchored, so any string containing a valid identifier substring (including strings with parentheses, braces, comments, or newlines) was accepted
Learn how to install or update PHPUnit 12.5 in the documentation.
#4440: Improve error when configured code coverage file list is empty
#6549: Allow to stub both hooks of non-virtual properties
Fixed
#6529: Git "detached HEAD state" in Open Test Reporting (OTR) XML logger not handled properly
#6545: Stubbing a class with set property hook leaves property uninitialized by default
The RegularExpression and StringMatchesFormatDescription did not handle preg_match() errors such as Compilation failed: regular expression is too large
Learn how to install or update PHPUnit 12.5 in the documentation.
To prevent Poisoned Pipeline Execution (PPE) attacks using prepared .coverage files 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
Learn how to install or update PHPUnit 12.5 in the documentation.
Attribute #[AllowMockObjectsWithoutExpectations] for excluding tests from the check that emits the notice for test methods that create a mock object but do not configure an expectation for it
Learn how to install or update PHPUnit 12.5 in the documentation.
#6308: Improve output of --check-php-configuration
The version number for the test result cache file has been incremented to reflect that its structure for PHPUnit 12.3 is not compatible with its structure for PHPUnit 8.5 and PHPUnit 9.6
#6304: PHPUnit 11.5.29 hangs when a test runner deprecation is triggered and process isolation is used (this reverts "#[IgnorePhpunitDeprecations] is now considered for test runner deprecations" from PHPUnit 12.3.1)
Learn how to install or update PHPUnit 12.3 in the documentation.
Including information about the Git repository (such as the commit hash and branch name) in the Open Test Reporting XML format is now an opt-in feature that can be enabled via the --include-git-information CLI option or the includeGitInformation attribute in the XML configuration file
#6236: failOnPhpunitWarning attribute on the <phpunit> element of the XML configuration file and --fail-on-phpunit-warning CLI option for controlling whether PHPUnit should fail on PHPUnit warnings (default: true)
PHPUnit has supported reporting test results in the JUnit XML format for a long time. Unfortunately, there has never been a standard schema for the JUnit XML format. Common consumers of Clover XML log files interpret these files differently, which has led to frequent problems.
To address this, the JUnit team started the Open Test Reporting project, creating and maintaining language-agnostic XML and HTML test reporting formats. Unlike JUnit XML, Open Test Reporting's XML formats are extensible.
Logging in the Open Test Reporting XML format is controlled by the new --log-otr CLI option and the new <otr> XML configuration element.
This feature is experimental and the generated XML may change in order to enhance compliance with the Open Test Reporting project's XML schema definitions. The same applies to the XML schema definitions for information that is specific for PHP and PHPUnit. Please note that such changes may occur in bugfix or minor releases and could potentially break backwards compatibility.
Experimental Support for OpenClover XML
PHPUnit has supported reporting code coverage information in the Clover XML format for a long time. Unfortunately, there has never been a standard schema for the Clover XML format. Common consumers of Clover XML log files interpret these files differently, which leads to frequent problems.
The original commercial Clover project has been superseded by the Open Source OpenClover project, which provides an XML schema for its OpenClover XML format. Rather than modifying the existing Clover XML reporter to comply with the OpenClover XML schema, thereby breaking backward compatibility, a new OpenClover XML reporter has been introduced.
This new reporter is controlled by the new CLI option, --coverage-openclover, and the new XML configuration element, <openclover>. This code coverage reporter generates XML documents that validate against the OpenClover project's XML schema definition, with one exception: the <testproject> element is not generated.
The existing Clover XML reporter, controlled by the --coverage-clover CLI option and the <clover> XML configuration element, remains unchanged.
This feature is experimental and the generated XML may change to enhance compliance with the OpenClover XML schema definition. Please note that such changes may occur in bugfix or minor releases and could potentially break backwards compatibility.
Miscellaneous
--with-telemetry CLI option that can be used together with --debug to print debugging information that includes telemetry information
The TestCase::provideAdditionalInformation() method can now be used to emit a Test\AdditionalInformationProvided event
The new Test\AfterLastTestMethodFailed, Test\AfterTestMethodFailed, Test\BeforeFirstTestMethodFailed, Test\BeforeTestMethodFailed, Test\PostConditionFailed, Test\PreConditionFailed events are now emitted instead of Test\AfterLastTestMethodErrored, Test\AfterTestMethodErrored, Test\BeforeFirstTestMethodErrored, Test\BeforeTestMethodErrored, Test\PostConditionErrored, Test\PreConditionErrored when the Throwable extends AssertionFailedError to distinguish between errors and failures triggered in hook methods
The new Test\PreparationErrored event is now emitted instead of Test\PreparationFailed when the Throwable does not extend AssertionFailedError to distinguish between errors and failures triggered during test preparation
Test\PreparationFailed::throwable()
Changed
#6165: Collect deprecations triggered by autoloading while loading/building the test suite
Do not treat warnings differently than other issues in summary section of default output
A warning is now emitted when both #[CoversNothing] and #[Covers*] (or #[Uses*]) are used on a test class
A warning is now emitted when the same #[Covers*] (or #[Uses*]) attribute is used multiple times on a test class
A warning is now emitted when the same code is targeted by both #[Covers*] and #[Uses*] attributes
A warning is now emitted when a hook method such as setUp(), for example has a #[Test] attribute
A warning is now emitted when more than one of #[Small], #[Medium], or #[Large] is used on a test class
A warning is now emitted when a data provider provides data sets that have more values than the test method consumes using arguments
displayDetailsOnAllIssues attribute on the <phpunit> element of the XML configuration file and --display-all-issues CLI option for controlling whether PHPUnit should display details on all issues that are triggered (default: false)
failOnAllIssues attribute on the <phpunit> element of the XML configuration file and --fail-on-all-issues CLI option for controlling whether PHPUnit should fail on all issues that are triggered (default: false)
Changed
#5956: Improved handling of deprecated E_STRICT constant
Fixed
#6192: Positive %a and %A matches are not ignored from diff when EXPECTF fails
When gathering the telemetry information that each event has, the real size of memory allocated from the operating system is no longer used as this is grown by PHP's memory manager in chunks that are so large that small(er) increases in peak memory usage cannot be seen
The peak memory usage returned by memory_get_peak_usage() is now reset immediately before the Test\Prepared event is emitted using memory_reset_peak_usage() so that (memory usage at Test\Finished - memory usage at Test\Prepared) is a better approximation of the memory usage of the test
The string representation of Telemetry\Info now uses peak memory usage instead of memory usage (this affects --log-events-verbose-text)
Fixed
#6173: Output from error_log() is not displayed when test fails
A "Before Test Method Errored" event is no longer emitted when a test is skipped in a "before test" method
#6118: expectErrorLog() for expecting error_log() output
#6126: Attribute #[WithEnvironmentVariable] for setting an environment variable for the duration of a test
The AfterTestMethodCalled, AfterTestMethodErrored, AfterTestMethodFinished, BeforeTestMethodCalled, BeforeTestMethodErrored, BeforeTestMethodFinished, PostConditionCalled, PostConditionErrored, PostConditionFinished, PreConditionCalled, PreConditionErrored, and PreConditionFinished event value objects now have test() method that returns a value object representing the test method for which the hook method was called
Changed
When code coverage processing is requested and no static analysis cache directory has been configured then a cache directory in the operating system's path used for temporary files is automatically created and used
The static analysis of first-party source files required for the code coverage functionality is now performed before the first test is run, if code coverage processing is requested (via the XML configuration file and/or CLI options), all first-party source files are configured to be processed (which is the default), and a static analysis cache directory is available (either explicitly configured or automatically determined, see above). This has the same effect as running phpunit --warm-coverage-cache before running tests.
Deprecated
#6140: The testClassName() method on the AfterTestMethodCalled, AfterTestMethodErrored, AfterTestMethodFinished, BeforeTestMethodCalled, BeforeTestMethodErrored, BeforeTestMethodFinished, PostConditionCalled, PostConditionErrored, PostConditionFinished, PreConditionCalled, PreConditionErrored, and PreConditionFinished event value objects (use test()->className() instead)
TestCase::__construct() is now declared final (it was annotated with @final before and the announced changed from @final to final for PHPUnit 12 was forgotten)
Fixed
#5951: Restore the includeUncoveredFiles configuration option
#6133: Precision loss in aggregated test suite execution time(s) reported by JUnit XML logger
A Test\PreparationFailed event is now emitted in addition to a Test\Errored event when an unexpected exception is triggered in a before-test method
A Test\Passed event is no longer emitted in addition to a Test\Failed or Test\Errored event when an assertion failure or an unexpected exception is triggered in an after-test method
A TestSuite\Finished event is now emitted when a before-first-test method errors
#5872: The default value for shortenArraysForExportThreshold is now 10 (limit export of arrays to 10 levels) instead of 0 (do not limit export of arrays)
Deprecated
#6053: Assert::isType() (was soft-deprecated in PHPUnit 11.5)
#6056: assertContainsOnly() (was soft-deprecated in PHPUnit 11.5)
#6056: assertNotContainsOnly() (was soft-deprecated in PHPUnit 11.5)
#6060: containsOnly() (was soft-deprecated in PHPUnit 11.5)
Issues whose message refers to an anonymous class could not be ignored using a baseline on PHP 8.6 (as of PHP 8.6, such messages contain the full name of the anonymous class: a NUL byte followed by the file, line, and a counter)
Make PHAR build reproducible across filesystems (files are now added to the PHAR sorted by their path instead of in the order in which the filesystem lists them)
Removed
The library PHAR (phpunit-library-X.Y.Z.phar) is no longer built, it could not be loaded since PHPUnit 9.5.8
Learn how to install or update PHPUnit 11.5 in the documentation.
The Software Bill of Materials (SBOM) embedded in the PHAR now uses CycloneDX 1.7 and provides the NTIA minimum elements as well as the data fields that BSI TR-03183-2 (version 2.1.0) requires for logical and identified components, including component creators, original, distribution and effective licences, source code URIs, and the PHP runtime and its extensions as external components
Learn how to install or update PHPUnit 11.5 in the documentation.
To prevent Poisoned Pipeline Execution (PPE) attacks using prepared .coverage files 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
Learn how to install or update PHPUnit 11.5 in the documentation.
#6308: Improve output of --check-php-configuration
The version number for the test result cache file has been incremented to reflect that its structure for PHPUnit 11.5 is not compatible with its structure for PHPUnit 8.5 and PHPUnit 9.6
Fixed
#6281: Exceptions raised in after-test method are not reported for skipped tests
Learn how to install or update PHPUnit 11.5 in the documentation.
#6304: PHPUnit 11.5.29 hangs when a test runner deprecation is triggered and process isolation is used (this reverts "#[IgnorePhpunitDeprecations] is now considered for test runner deprecations" from PHPUnit 11.5.29)
Learn how to install or update PHPUnit 11.5 in the documentation.
#6236: failOnPhpunitWarning attribute on the <phpunit> element of the XML configuration file and --fail-on-phpunit-warning CLI option for controlling whether PHPUnit should fail on PHPUnit warnings (default: true)
displayDetailsOnAllIssues attribute on the <phpunit> element of the XML configuration file and --display-all-issues CLI option for controlling whether PHPUnit should display details on all issues that are triggered (default: false)
failOnAllIssues attribute on the <phpunit> element of the XML configuration file and --fail-on-all-issues CLI option for controlling whether PHPUnit should fail on all issues that are triggered (default: false)
Changed
#5956: Improved handling of deprecated E_STRICT constant
Fixed
#6192: Positive %a and %A matches are not ignored from diff when EXPECTF fails
When gathering the telemetry information that each event has, the real size of memory allocated from the operating system is no longer used as this is grown by PHP's memory manager in chunks that are so large that small(er) increases in peak memory usage cannot be seen
The peak memory usage returned by memory_get_peak_usage() is now reset immediately before the Test\Prepared event is emitted using memory_reset_peak_usage() so that (memory usage at Test\Finished - memory usage at Test\Prepared) is a better approximation of the memory usage of the test
The string representation of Telemetry\Info now uses peak memory usage instead of memory usage (this affects --log-events-verbose-text)
Fixed
A "Before Test Method Errored" event is no longer emitted when a test is skipped in a "before test" method
A Test\PreparationFailed event is now emitted in addition to a Test\Errored event when an unexpected exception is triggered in a before-test method
A Test\Passed event is no longer emitted in addition to a Test\Failed or Test\Errored event when an assertion failure or an unexpected exception is triggered in an after-test method
A TestSuite\Finished event is now emitted when a before-first-test method errors
#5948: Support for Property Hooks in Test Doubles
#5954: Provide a way to stop execution at a particular deprecation
Method assertContainsNotOnlyInstancesOf() in the PHPUnit\Framework\Assert class as the inverse of the assertContainsOnlyInstancesOf() method
Methods assertContainsOnlyArray(), assertContainsOnlyBool(), assertContainsOnlyCallable(), assertContainsOnlyFloat(), assertContainsOnlyInt(), assertContainsOnlyIterable(), assertContainsOnlyNull(), assertContainsOnlyNumeric(), assertContainsOnlyObject(), assertContainsOnlyResource(), assertContainsOnlyClosedResource(), assertContainsOnlyScalar(), and assertContainsOnlyString() in the PHPUnit\Framework\Assert class as specialized alternatives for the generic assertContainsOnly() method
Methods assertContainsNotOnlyArray(), assertContainsNotOnlyBool(), assertContainsNotOnlyCallable(), assertContainsNotOnlyFloat(), assertContainsNotOnlyInt(), assertContainsNotOnlyIterable(), assertContainsNotOnlyNull(), assertContainsNotOnlyNumeric(), assertContainsNotOnlyObject(), assertContainsNotOnlyResource(), assertContainsNotOnlyClosedResource(), assertContainsNotOnlyScalar(), and assertContainsNotOnlyString() in the PHPUnit\Framework\Assert class as specialized alternatives for the generic assertNotContainsOnly() method
Methods containsOnlyArray(), containsOnlyBool(), containsOnlyCallable(), containsOnlyFloat(), containsOnlyInt(), containsOnlyIterable(), containsOnlyNull(), containsOnlyNumeric(), containsOnlyObject(), containsOnlyResource(), containsOnlyClosedResource(), containsOnlyScalar(), and containsOnlyString() in the PHPUnit\Framework\Assert class as specialized alternatives for the generic containsOnly() method
Methods isArray(), isBool(), isCallable(), isFloat(), isInt(), isIterable(), isNumeric(), isObject(), isResource(), isClosedResource(), isScalar(), isString() in the PHPUnit\Framework\Assert class as specialized alternatives for the generic isType() method
TestRunner\ChildProcessStarted and TestRunner\ChildProcessFinished events
Changed
#5998: Do not run SKIPIF section of PHPT test in separate process when it is free of side effects
#5999: Do not run CLEAN section of PHPT test in separate process when it is free of side effects that modify the parent process
#5928: Filter tests based on the PHP extensions they require
#5964: Better error message when data provider is invalid
The XML configuration file generator now references vendor/phpunit/phpunit/phpunit.xsd (instead of https://schema.phpunit.de/X.Y/phpunit.xsd) when PHPUnit was installed using Composer and phpunit --generate-configuration was invoked in the directory where vendor is located
The --migrate-configuration command no longer replaces vendor/phpunit/phpunit/phpunit.xsd with https://schema.phpunit.de/X.Y/phpunit.xsd
The output of --list-groups now shows how many tests a group contains
The output of --list-suites now shows how many tests a test suite contains
#5937: failOnPhpunitDeprecation 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)
Changed
#5937: PHPUnit deprecations will, by default, no longer affect the test runner's shell exit code. This can optionally be turned back on using the --fail-on-phpunit-deprecation CLI option or the failOnPhpunitDeprecation="true" attribute on the <phpunit> element of the XML configuration file.
Details for PHPUnit deprecations will, by default, no longer be displayed. This can optionally be turned back on using the --display-phpunit-deprecations CLI option or the displayDetailsOnPhpunitDeprecations attribute on the <phpunit> element of the XML configuration file.
#5931: name property on <testsuites> element in JUnit XML logfile
Removed .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
Fixed
#5884: TestDox printer does not consider that issues can be suppressed by attribute, baseline, source location, or @ operator
#5869: shortenArraysForExportThreshold attribute on the <phpunit> element of the XML configuration file to limit the export of arrays to a specified number of elements (default: 0 / do not limit the export of arrays)
#5885: Optionally repeat TestDox output for non-successful tests after the regular TestDox output
#5906: --extension CLI option to register a test runner extension
Changed
#5856: When the test runner is configured to fail on deprecations, notices, warnings, incomplete tests, or skipped tests then details for tests that triggered deprecations, notices, or warnings as well as tests that were marked as incomplete or skipped are always shown, respectively
#5869: The configuration file generated using --generate-configuration now limits the export of arrays to 10 elements in order to improve performance
#5857: Mocked methods cannot be called from the original constructor of a partially mocked class
#5859: XML Configuration File Migrator does not remove cacheDirectory attribute from <coverage> element when migrating from PHPUnit 11.1 to PHPUnit 11.2
#5689: Distinguish between self, direct and indirect deprecations
#5696: #[DisableReturnValueGenerationForTestDoubles] attribute for disabling return value generation for test doubles created using createMock(), createMockForIntersectionOfInterfaces(), createPartialMock(), createStub(), and createStubForIntersectionOfInterfaces()
#5175: #[CoversMethod] and #[UsesMethod] attributes for more fine-grained code coverage targeting
#5720: Support filtering using --filter, --exclude-filter, --group, and --exclude-group when listing tests using --list-tests and --list-tests-xml as well as listing groups with --list-groups
#5733: Implicitly include (abstract) parent class(es) with #[CoversClass] and #[UsesClass] attributes
--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 files
Changed
#5689: The XML configuration file generated using --generate-configuration now generates <source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true"> instead of <source restrictDeprecations="true" restrictNotices="true" restrictWarnings="true">
#5708: Allow the --group, --exclude-group, --covers, --uses, and --test-suffix CLI options to be used multiple times
PHPUnit\Framework\TestCase::__construct() is now annotated to be final in preparation for declaring it final in PHPUnit 12
Changed how the DeprecationTriggered, ErrorTriggered, NoticeTriggered, PhpDeprecationTriggered, PhpNoticeTriggered, PhpWarningTriggered, and WarningTriggered events are represented as text
Deprecated
#5689: The restrictDeprecations attribute on the <source> element of the XML configuration file is now deprecated in favor of the ignoreSelfDeprecations, ignoreDirectDeprecations, and ignoreIndirectDeprecations attributes
#5709: Deprecate support for using comma-separated values with the --group, --exclude-group, --covers, --uses, and --test-suffix CLI options
This PR contains the following updates:
| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [phpunit/phpunit](https://phpunit.de/) ([source](https://github.com/sebastianbergmann/phpunit)) | `^10.5.24` → `^13.0.0` |  |  |
---
### Release Notes
<details>
<summary>sebastianbergmann/phpunit (phpunit/phpunit)</summary>
### [`v13.4.8`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.4.8): PHPUnit 13.4.8
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.4.7...13.4.8)
##### Fixed
- The baseline generated using `--generate-baseline` contains an issue once for each time it was triggered, for instance once for each data set of a test that uses a data provider, instead of once
- A baseline is not applied to the issues that are triggered in a file that is not located in the directory of the baseline, or in a directory below it, for instance when the baseline is located in `build/baseline.xml` and the file in `src`
- When `--log-junit php://stdout` is used, or `php://stdout` is configured for the JUnit XML logfile in the XML configuration file, and the test runner prints its regular output, the test runner ends with `An error occurred inside PHPUnit` after the JUnit XML was printed: the test results are not printed, code coverage reports and the baseline are not written, and the shell exit code is `255`
- When `--log-junit php://stdout` is used together with `--stderr`, the JUnit XML is printed to the standard error stream
- When no test is run, `--compact` only prints `No tests executed!` and not why, for instance the PHPUnit error for the invalid data provider of the only test, or the test runner warning for a test class without tests
***
Learn how to install or update PHPUnit 13.4 in the [documentation](https://docs.phpunit.de/en/13.4/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.4.7`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.4.7): PHPUnit 13.4.7
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.4.6...13.4.7)
##### Fixed
- When an order is configured on the command line, for instance using `--order-by random`, `defects` configured using the `executionOrder` attribute in the XML configuration file is still applied, and vice versa
- Using `default` together with an order for `--order-by` or the `executionOrder` XML configuration attribute, for instance `default,random`, triggers a deprecation for using more than one order, although `default` resets the order instead of selecting one
- `--fail-on-skipped` does not make the test runner exit with a shell exit code that indicates failure when a test class is skipped, for instance because its before-first-test method calls `markTestSkipped()`, although its tests are counted as skipped
- `--stop-on-skipped` does not stop the test run when a test class is skipped, for instance because its before-first-test method calls `markTestSkipped()`
- When coverage contribution is required, a test is considered risky because it does not contribute to code coverage although it executed covered code, when the code coverage driver collects hit counts and each covered line that the test executed was executed more than once
- When PHPUnit is installed using Composer, code units in the `PHPUnit\` or `SebastianBergmann\` namespace that do not belong to PHPUnit or one of its dependencies are preloaded on startup, which leads to a fatal error when such a code unit depends on code that is not available
- Code from `sebastian/file-filter` and `sebastian/git-state` is not treated like code from PHPUnit's other dependencies, for instance stack frames from it are not filtered from stack traces
- Code from `nikic/php-parser` and parts of the code from `phar-io/manifest` are not treated like code from PHPUnit's other dependencies, for instance stack frames from it are not filtered from stack traces
***
Learn how to install or update PHPUnit 13.4 in the [documentation](https://docs.phpunit.de/en/13.4/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.4.6`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.4.6): PHPUnit 13.4.6
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.4.5...13.4.6)
##### Changed
- Issues whose message refers to an anonymous class could not be ignored using a baseline on PHP 8.6 (as of PHP 8.6, such messages contain the full name of the anonymous class: a NUL byte followed by the file, line, and a counter)
- Make PHAR build reproducible across filesystems (files are now added to the PHAR sorted by their path instead of in the order in which the filesystem lists them)
##### Fixed
- When `method()` is called for a method of a test double that cannot be configured, for instance because it does not exist, every subsequent invocation of a method of that test double fails with `Method name is not configured`
- When a hook method of a test, for instance `setUp()`, marks the test as incomplete, the hook method is reported as failed
- When an "after test" method, for instance `tearDown()`, marks a successful test as incomplete or skips it, the test is reported as failed
- When a before-first-test method, for instance `setUpBeforeClass()`, calls `markTestIncomplete()`, each test of the test class is reported as failed instead of the test class being skipped as it is when `markTestSkipped()` is called
- When an after-last-test method, for instance `tearDownAfterClass()`, calls `markTestIncomplete()` or `markTestSkipped()` after the tests of the test class have been run, this is reported as a failure, also for each test of the test class that is run in process isolation
- A failed PHP assertion, made using `assert()`, in a hook method is reported as an error of that method instead of as a failure, and it is counted as an error instead of as a failure when that method is a before-first-test method or an after-last-test method
- When an assertion fails in an "after test" method, for instance `tearDown()`, of a test that already failed, errored, or was marked as incomplete, a failure is reported in addition to the outcome of the test, so the test is counted more than once and `onNotSuccessfulTest()` is called with the failure from the "after test" method instead of the test's own
- When a test fails because of an exception of a registered failure type, an error or a failure in an "after test" method, for instance `tearDown()`, is reported in addition to the test's failure, so the test is counted more than once
- A test that fails because of an exception of a registered failure type is considered risky when it does not perform assertions or, when `requireCoverageMetadata="true"` is configured, when it does not define a code coverage target, unlike a test that fails because an assertion failed
- The TestDox output does not show the failure of a before-first-test method or an after-last-test method, for instance an assertion failure in `setUpBeforeClass()`
- Control characters and ANSI escape sequences in user-supplied strings are not made visible in the output of `--debug` and in the logfiles written by `--log-events-text` and `--log-events-verbose-text`
- Groups configured for a test directory or test file using the `groups` attribute of `<directory>` or `<file>` in the XML configuration file are not assigned to PHPT tests, so `--group` and `--exclude-group` do not select them and `--list-groups` and `--list-tests-xml` report them as being in the `default` group or not at all
##### Removed
- The library PHAR (`phpunit-library-X.Y.Z.phar`) is no longer built, it could not be loaded since PHPUnit 9.5.8
***
Learn how to install or update PHPUnit 13.4 in the [documentation](https://docs.phpunit.de/en/13.4/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.4.5`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.4.5): PHPUnit 13.4.5
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.4.4...13.4.5)
##### Fixed
- The static analysis cache directory that is automatically created in the operating system's path used for temporary files when no cache directory is configured is not used when the POSIX extension is not loaded
***
Learn how to install or update PHPUnit 13.4 in the [documentation](https://docs.phpunit.de/en/13.4/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.4.4`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.4.4): PHPUnit 13.4.4
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.4.3...13.4.4)
##### Fixed
- The TeamCity logger writes `testSuiteFinished` twice for a test class when one of its before-first-test methods errors or fails
- The TestDox output shows a less important outcome of a test that has more than one outcome, for instance the failure in `tearDown()` of a test that errored
- When the test run is interrupted by a signal while a test is run in process isolation, the result of the test is discarded and the test is counted as passed, and the TestDox output cannot be printed
- When no static analysis cache directory is configured, the cache directory that is automatically created in the operating system's path used for temporary files is also used when it was created by another user or can be written to by other users
- The directory in the operating system's path used for temporary files in which the temporary files for collecting code coverage for a PHPT test are created has a fixed name, and is also used when it was created by another user, who can then replace the code of the PHPT test before it is executed
***
Learn how to install or update PHPUnit 13.4 in the [documentation](https://docs.phpunit.de/en/13.4/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.4.3`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.4.3): PHPUnit 13.4.3
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.4.2...13.4.3)
##### Fixed
- The dependencies of a test that are listed after a dependency on a test that does not return a value, or after a dependency on a larger test, were not checked, so the test was run instead of being skipped when one of these dependencies had not passed
- Tests could not be run in process isolation when the namespace of the test class begins with a name that the code of the child process imports, for instance `CodeCoverage` or `Facade`
- A test that is run in process isolation aborts the test run when its data set or a value returned by a test it depends on cannot be serialized, for instance because it is a closure
- When a before-first-test method or an after-last-test method errors or fails, the remaining methods of the same kind are still called, and each of them that does not error or fail itself is reported with the exception of the earlier method
- When a hook method of a test, for instance a `#[Before]` method, skips the test, the remaining hook methods of the same kind are still called, so the test is reported as errored instead of skipped when one of them errors
- An error or failure in a before-first-test method or an after-last-test method that is called again in the child process of a test that is run in process isolation is reported twice, once for the test class and once for the test
- When a before-first-test method errors, the progress output shows one `E` for the test class instead of one for each of its tests, only one of its tests is counted as run, and the test that is run next is shown as an error
- When a before-first-test method fails, the progress output shows nothing for the tests of the test class and only one of them is counted as run
- The Open Test Reporting XML logfile has no start for a test that errors before it is prepared, for instance because it depends on a test that does not exist, and no end for the test that is run after a test that is skipped because a test it depends on did not pass or because one of its
requirements is not met
- The Open Test Reporting XML logfile has no entry for a test that is marked as incomplete before it is prepared, for instance in `setUp()`, and reports the test that is run after it as aborted with the message of the incomplete test
- The Open Test Reporting XML logfile has no end for the test that is run after a test whose preparation errors, for instance because `setUp()` raises an exception or the global state cannot be backed up
- The Open Test Reporting XML logfile reports a test that has more than one outcome, for instance because `tearDown()` fails after the test errored, with its last outcome instead of its most severe one, and with more than one end when the preparation of the test errored
- The Open Test Reporting XML logfile is not well-formed when a test name, a message, the output of a test, or the string representation of an exception contains `]]>`, bytes that are not valid UTF-8, or characters that are not allowed in XML, for instance the escape character of an ANSI
escape sequence
- The Open Test Reporting XML logfile reports an issue that is triggered before a test is prepared, for instance in `setUp()`, with an empty ID before the start of the test
***
Learn how to install or update PHPUnit 13.4 in the [documentation](https://docs.phpunit.de/en/13.4/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.4.2`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.4.2): PHPUnit 13.4.2
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.4.1...13.4.2)
##### Fixed
- [#​7033](https://github.com/sebastianbergmann/phpunit/pull/7033): Compact printer is created although an extension replaces the progress output
- [#​7035](https://github.com/sebastianbergmann/phpunit/pull/7035): Sorting tests by duration recomputes the duration of a test suite for every comparison
- Sorting tests by size recomputes the size of a test suite for every comparison
- `expectUserDeprecationMessage()` and `expectUserDeprecationMessageMatches()` did not see the deprecations triggered by an attempt of a retried test and saw those of the previously run test instead
- The status of a test whose mock object raises an exception in its destructor is success although the test is reported as errored, so `#[Retry]` does not retry the test, `--repeat` does not skip the remaining repetitions, `tearDown()` sees the wrong status, and code coverage records the test as successful
- Named arguments passed to `with()` were matched by position instead of by name, so an expectation such as `->with(b: 7)` compared the expected value with the first parameter of the method and the parameter named `$b` was not checked
- String keys of the parameter sets passed to `withParameterSetsInOrder()`, `withParameterSetsInAnyOrder()`, and `withParameterSetsInPartialOrder()` were ignored, so a parameter set such as `['b' => 7]` compared the expected value with the first parameter of the method and the parameter
named `$b` was not checked
***
Learn how to install or update PHPUnit 13.4 in the [documentation](https://docs.phpunit.de/en/13.4/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.4.1`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.4.1): PHPUnit 13.4.1
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.4.0...13.4.1)
##### Changed
- The Software Bill of Materials (SBOM) embedded in the PHAR now uses CycloneDX 1.7 and provides the NTIA minimum elements as well as the data fields that BSI TR-03183-2 (version 2.1.0) requires for logical and identified components, including component creators, original, distribution and effective licences, source code URIs, and the PHP runtime and its extensions as external components
##### Fixed
- [#​7029](https://github.com/sebastianbergmann/phpunit/issues/7029): `TestSuite::runTests()` doubles garbage collector time when `zend.exception_ignore_args` is off
- `setUpBeforeClass()` and `tearDownAfterClass()` were run twice for a test class that is the only test class in a test suite of the XML configuration file that has the name of that test class
- Tests could not be run in process isolation when the path of the bootstrap script, the test file, or the directory for temporary files contained a single quote
- Arguments in the `--ARGS--` section of a PHPT test that start with `-` were interpreted by PHP instead of being passed to the test when the test also has a `--STDIN--` section
- Recording the tests that passed in a child process copied all tests that had passed so far, which made running many tests in process isolation increasingly slow
***
Learn how to install or update PHPUnit 13.4 in the [documentation](https://docs.phpunit.de/en/13.4/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.4.0`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.4.0): PHPUnit 13.4.0
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.3.6...13.4.0)
##### Added
- [#​6585](https://github.com/sebastianbergmann/phpunit/issues/6585): `executionOrder` attribute values and `--order-by` token lists that spell the order before `defects`, for example `duration-ascending,defects`
- [#​6585](https://github.com/sebastianbergmann/phpunit/issues/6585): `pipeline()` on the `TestSuite\Sorted` event for inspecting which reordering stages were applied
- [#​6686](https://github.com/sebastianbergmann/phpunit/issues/6686): `Constraint::negatedToString()` and `Constraint::negatedFailureDescription()` for authoring the description of a constraint that is wrapped in `LogicalNot`
- [#​6863](https://github.com/sebastianbergmann/phpunit/issues/6863): Cache which tests a test file contains
- [#​6957](https://github.com/sebastianbergmann/phpunit/issues/6957): Allow ordering tests by the time their source files were last modified
- [#​6958](https://github.com/sebastianbergmann/phpunit/issues/6958): Select the tests that are in all of several groups
- [#​6960](https://github.com/sebastianbergmann/phpunit/pull/6960): Record the order in which methods of mock objects are invoked
- [#​6964](https://github.com/sebastianbergmann/phpunit/pull/6964): `#[RequiresClass]` attribute to skip a test if a class does not exist
- [#​6995](https://github.com/sebastianbergmann/phpunit/issues/6995): `ChildProcessExtension` interface for extensions that need to be bootstrapped in the child process of a test that runs in process isolation
- `--coverage-jsonl` CLI option and `<jsonl>` element for the XML configuration file to write a code coverage report in JSONL format, one JSON object per line, that reports uncovered code rather than every executable line
- `--timeout` CLI option to limit the wall-clock time of the entire test run
- `requireCoverageMetadataOnSmallTests`, `requireCoverageMetadataOnMediumTests`, and `requireCoverageMetadataOnLargeTests` attributes for the XML configuration file to require code coverage metadata depending on the size of a test; these have precedence over `requireCoverageMetadata`
##### Changed
- Output printed by a test is now shown in the compact output as a `--- OUTPUT:` record that is attributed to the test instead of being passed through unformatted; the record is omitted when `beStrictAboutOutputDuringTests` or `--disallow-test-output` already reports the output as risky
##### Deprecated
- [#​6585](https://github.com/sebastianbergmann/phpunit/issues/6585): Writing `defects` before the order for `--order-by` and `executionOrder`, which will change meaning in PHPUnit 14
- [#​6585](https://github.com/sebastianbergmann/phpunit/issues/6585): `depends` and `no-depends` for `--order-by` and `executionOrder`
- [#​6585](https://github.com/sebastianbergmann/phpunit/issues/6585): Configuring more than one order for `--order-by` and `executionOrder`
- [#​6585](https://github.com/sebastianbergmann/phpunit/issues/6585): Unknown values for the `executionOrder` XML configuration attribute, which are currently ignored
- [#​6686](https://github.com/sebastianbergmann/phpunit/issues/6686): `Constraint::failureDescriptionInContext()` and `LogicalNot::negate()`
- [#​6999](https://github.com/sebastianbergmann/phpunit/issues/6999): Class-level `#[Group]`, `#[Ticket]`, `#[Small]`, `#[Medium]`, and `#[Large]` on parent classes of test classes
##### Fixed
- Issues that are listed in the baseline are not ignored for tests that are run in a separate process
- A test that is run in process isolation aborts the test run when its result cannot be unserialized, for instance because it returns an object that holds a test double
- A test that uses `#[DataProviderClosure]` errors when it is run in process isolation
***
Learn how to install or update PHPUnit 13.4 in the [documentation](https://docs.phpunit.de/en/13.4/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.3.6`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.3.6): PHPUnit 13.3.6
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.3.5...13.3.6)
##### Fixed
- The first attempt of a test that is retried is reported as attempt 1 of 1 in events, instead of attempt 1 of the configured maximum number of attempts
- The class name argument of `#[RequiresMethod]` is declared as `class-string`, so static analysis reports an error when it refers to a class that does not exist
- A `#[RequiresMethod]` attribute that refers to a class which cannot be loaded, for instance because its parent class does not exist, aborts the test run instead of skipping the test
***
Learn how to install or update PHPUnit 13.3 in the [documentation](https://docs.phpunit.de/en/13.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.3.5`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.3.5): PHPUnit 13.3.5
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.3.4...13.3.5)
##### Changed
- Control characters and ANSI escape sequences in user-supplied strings such as test names, data set names, and messages are now made visible as `\u{NNNN}` escape sequences instead of being passed through to the terminal
- Control characters in user-supplied strings are now also made visible in the compact output
- Line feeds in the name of a test no longer break the header line of a record in the compact output
***
Learn how to install or update PHPUnit 13.3 in the [documentation](https://docs.phpunit.de/en/13.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.3.4`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.3.4): PHPUnit 13.3.4
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.3.3...13.3.4)
##### Fixed
- [#​6965](https://github.com/sebastianbergmann/phpunit/issues/6965): Temporary file used by `SourceMapper` may be deleted prematurely
- The compact output displays details on PHPUnit deprecations and PHPUnit notices even when `--display-phpunit-deprecations` and `--display-phpunit-notices` are not used
- The summary line of the compact output does not report the number of PHPUnit deprecations, PHPUnit notices, and PHPUnit warnings
***
Learn how to install or update PHPUnit 13.3 in the [documentation](https://docs.phpunit.de/en/13.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.3.3`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.3.3): PHPUnit 13.3.3
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.3.2...13.3.3)
##### Fixed
- Paths of included files are now escaped when generating the code that is executed in a separate process, so that a path containing special characters no longer produces broken code
- Tests of a test class that is skipped as a whole are missing from the TestDox output
- A test that is skipped or marked incomplete before it started is missing from the TestDox output
- A test that is marked incomplete before it started is not counted in the number of tests that ran
- No progress is printed for a test that is marked incomplete before it started
***
Learn how to install or update PHPUnit 13.3 in the [documentation](https://docs.phpunit.de/en/13.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.3.2`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.3.2): PHPUnit 13.3.2
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.3.1...13.3.2)
##### Fixed
- [#​6904](https://github.com/sebastianbergmann/phpunit/issues/6904): `SourceMap` is built in child process even though `identifyIssueTrigger` is disabled
- [#​6924](https://github.com/sebastianbergmann/phpunit/issues/6924): `#[CoversFile]` attribute is not considered for risky test check
***
Learn how to install or update PHPUnit 13.3 in the [documentation](https://docs.phpunit.de/en/13.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.3.1`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.3.1): PHPUnit 13.3.1
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.3.0...13.3.1)
##### Changed
- Invoking a static hook method such as `setUpBeforeClass()` no longer triggers a deprecation warning on PHP 8.6
***
Learn how to install or update PHPUnit 13.3 in the [documentation](https://docs.phpunit.de/en/13.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.3.0`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.3.0): PHPUnit 13.3.0
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.2.6...13.3.0)
##### Added
- [#​3794](https://github.com/sebastianbergmann/phpunit/issues/3794): Filesystem-based code coverage targeting
- [#​5758](https://github.com/sebastianbergmann/phpunit/issues/5758): Make export of objects customizable
- [#​6546](https://github.com/sebastianbergmann/phpunit/issues/6546): Both property hooks can now be configured on test doubles of virtual hooked properties, even when the doubled property only declares one of them
- [#​6586](https://github.com/sebastianbergmann/phpunit/pull/6586): Custom code coverage driver support
- [#​6591](https://github.com/sebastianbergmann/phpunit/pull/6591): Repeated test execution using `--repeat` CLI option and `#[Repeat]` attribute
- [#​6701](https://github.com/sebastianbergmann/phpunit/pull/6701): Allow `expectOutputString()` and `expectOutputRegex()` to be combined and repeated
- [#​6710](https://github.com/sebastianbergmann/phpunit/pull/6710): Deprecation Filters
- [#​6722](https://github.com/sebastianbergmann/phpunit/issues/6722): Allow `#[CoversNothing]` on methods
- [#​6742](https://github.com/sebastianbergmann/phpunit/pull/6742): Retry failing tests up to N times using `--retry` CLI option `#[Retry]` attribute
- [#​6827](https://github.com/sebastianbergmann/phpunit/pull/6827): Customize which deprecation trigger types fail the test run
- [#​6830](https://github.com/sebastianbergmann/phpunit/issues/6830): Warn when `failOnAllIssues="true"` is combined with an explicitly disabled fine-grained `failOn*` setting
- [#​6832](https://github.com/sebastianbergmann/phpunit/pull/6832): Allow doubling properties that do not declare property hooks
- [#​6853](https://github.com/sebastianbergmann/phpunit/issues/6853): Optionally warn when PHP is not configured for development
- [phpunit/php-code-coverage #​1140](https://github.com/sebastianbergmann/php-code-coverage/pull/1140): Class-oriented HTML report
- [phpunit/php-code-coverage #​1141](https://github.com/sebastianbergmann/php-code-coverage/pull/1141): Improve visualization of branch coverage and path coverage in the HTML report
- [phpunit/php-code-coverage #​1153](https://github.com/sebastianbergmann/php-code-coverage/pull/1153): Filter HTML code coverage report by test size
- `--record-test-run-history` and `--do-not-record-test-run-history` CLI options as well as the `recordTestRunHistory` attribute for the XML configuration file to control whether the status and duration of each test are recorded for use by `--order-by defects` and `--order-by duration-*`
- `--without-class-view` CLI option and `classView` attribute for the XML configuration file to disable the [class-oriented view](https://github.com/sebastianbergmann/php-code-coverage/pull/1140) in the HTML code coverage report
- `--without-file-view` CLI option and `fileView` attribute for the XML configuration file to disable the file-oriented view in the HTML code coverage report
- `{PWD}` is now substituted with the directory of the PHPT test file in `--ENV--` and `--INI--` sections of PHPT test files
- `{TMP}` (system directory for temporary files) and `{ENV:name}` (value of environment variable `name`) are now substituted in `--INI--` sections of PHPT test files
- A PHPT test whose `--INI--` section references an environment variable that is not set is now skipped
- A `--SKIPIF--` section of a PHPT test file that prints `xfail <reason>` now marks the test as expected to fail, as if the PHPT test file had an `--XFAIL--` section with that reason
##### Changed
- [phpunit/php-code-coverage #​1231](https://github.com/sebastianbergmann/php-code-coverage/pull/1231): Identify dead code using static analysis
- [phpunit/php-code-coverage #​1259](https://github.com/sebastianbergmann/php-code-coverage/pull/1259): Degrade gracefully when a source file cannot be parsed
- The test runner no longer crashes when an attribute cannot be instantiated
- Improved TestDox HTML report
- The feature formerly named "test result cache" is now named "test run history"; when a cache directory is configured, the file it is stored in is now named `test-run-history` instead of `test-results`
- The test runner warns now when ordering by defects or duration is configured but recording of the test run history is disabled
- `TestCase` no longer captures `error_log()` output for tests that do not use `expectErrorLog()`, avoiding the cost of setting up error log redirection for every test
- `error_log()` output from tests without an expectation is no longer echoed (date-stripped) to PHPUnit's output; it goes to the configured error log again, as it did before capture was introduced
- A test running in process isolation that calls `error_log()` without `expectErrorLog()` now produces stderr output in the child process, which the test runner reports as a test error
- A PHPT test that is expected to fail (`--XFAIL--` section or `xfail` output from the `--SKIPIF--` section) but passes is now considered risky; this usually means the expected-failure marker is stale and should be removed
- A PHPT test whose `--SKIPIF--` section produces output that is not recognized is now considered risky; this usually means the skip check itself is broken. The keywords understood by PHP's own test runner that have no PHPUnit counterpart (`info`, `warn`, `xleak`, `flaky`, and `nocache`) are tolerated and do not make the test risky
- PHPT tests now run with additional INI defaults for deterministic output (`date.timezone=UTC`, `display_startup_errors=1`, `fatal_error_backtraces=Off`, `ignore_repeated_errors=0`, `precision=14`,
`serialize_precision=-1`), consistent with PHP's own test runner; all of them can be overridden per test using the `--INI--` section
##### Deprecated
- `--cache-result` CLI option, use `--record-test-run-history` instead
- `--do-not-cache-result` CLI option, use `--do-not-record-test-run-history` instead
- `cacheResult` XML configuration attribute, use `recordTestRunHistory` instead
- `PHPUnit\TextUI\Configuration\Configuration::cacheResult()`, use `PHPUnit\TextUI\Configuration\Configuration::recordTestRunHistory()` instead
- `PHPUnit\TextUI\Configuration\Configuration::testResultCacheFile()`, use `PHPUnit\TextUI\Configuration\Configuration::testRunHistoryFile()` instead
##### Fixed
- Doubling a class with a property that declares both a final and a non-final hook no longer triggers a fatal error
- `expectErrorLog()` now only considers `error_log()` output written after it was called; previously, the expectation was also satisfied by output written before `expectErrorLog()` was called
- PHPT test files with an unknown section, a duplicated section, more than one of the `--FILE--`, `--FILEEOF--`, and `--FILE_EXTERNAL--` sections, or more than one expectation section (`--EXPECT--`, `--EXPECTF--`, `--EXPECTREGEX--`, and their `_EXTERNAL` variants) are now rejected; previously, misspelled sections were silently ignored and duplicated sections silently overwrote each other
- The regular expression from an `--EXPECTREGEX--` section must now match the PHPT test's entire output, and `.` now matches newline characters, consistent with PHP's own test runner; previously, a match on a substring of the output was sufficient for the test to pass
- The reason printed by a `--SKIPIF--` section of a PHPT test is no longer mangled when it follows the `skip <reason>` convention used by PHP's own test suite; previously, the first two characters of the reason were stripped unless the `skip: <reason>` or `skip - <reason>` convention was used
- The test runner no longer aborts with an uncaught `PHPUnit\Runner\Phpt\InvalidPhptFileException` when a PHPT test file has an empty `--FILE--` or `--FILEEOF--` section or a `--FILE_EXTERNAL--` section that references an empty file; such a file is now rejected while it is parsed and reported as an errored test
- `PHPUnit\Runner\Phpt\InvalidPhptFileException` now has a message that explains why the PHPT test file was rejected
***
Learn how to install or update PHPUnit 13.3 in the [documentation](https://docs.phpunit.de/en/13.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.2.6`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.2.6): PHPUnit 13.2.6
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.2.5...13.2.6)
##### Fixed
- [#​6861](https://github.com/sebastianbergmann/phpunit/issues/6861): Hook methods run twice when a template method is marked with its corresponding attribute
- Regression that stopped test methods from being sorted by source code location
***
Learn how to install or update PHPUnit 13.2 in the [documentation](https://docs.phpunit.de/en/13.2/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.2.5`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.2.5): PHPUnit 13.2.5
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.2.4...13.2.5)
##### Changed
- Messages for tests that are skipped because of an unsatisfied `RequiresPhp`, `RequiresPhpunit`, or `RequiresPhpExtension` version requirement now include the version that is actually being used
- Warning messages about incomplete version requirements as well as version requirements without a version comparison operator, and the error message for invalid version requirements, now include the full version requirement and explain what is expected
##### Fixed
- [#​6825](https://github.com/sebastianbergmann/phpunit/pull/6825): Forwarding to previous error handler can result in infinite recursion
- [#​6831](https://github.com/sebastianbergmann/issues/pull/6831): PHPUnit's error handler does not respect `@` error suppression and forwards suppressed warnings to previous error handler
- [#​6833](https://github.com/sebastianbergmann/phpunit/issues/6833): `assertArrayHasKey()` does not accept `ArrayAccess` implementations with a specific value type when test code is analysed with PHPStan at level 9
- [#​6854](https://github.com/sebastianbergmann/phpunit/issues/6854): Deprecation triggered in first-party code is wrongly classified as indirect when the first-party code is called from third-party code
- Test classes were not sorted relative to each other when tests were ordered by duration
***
Learn how to install or update PHPUnit 13.2 in the [documentation](https://docs.phpunit.de/en/13.2/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.2.4`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.2.4): PHPUnit 13.2.4
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.2.3...13.2.4)
##### Fixed
- [#​6817](https://github.com/sebastianbergmann/phpunit/issues/6817): Issue is reported even when previously registered error handler turns the error into an exception
- [#​6818](https://github.com/sebastianbergmann/phpunit/issues/6818): Issue is reported when custom error handler checks `error_reporting()` output dynamically
***
Learn how to install or update PHPUnit 13.2 in the [documentation](https://docs.phpunit.de/en/13.2/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.2.3`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.2.3): PHPUnit 13.2.3
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.2.2...13.2.3)
##### Changed
- [#​6797](https://github.com/sebastianbergmann/phpunit/issues/6797): Adapt code generated for test double of interface with constructor for PHP 8.6
***
Learn how to install or update PHPUnit 13.2 in the [documentation](https://docs.phpunit.de/en/13.2/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.2.2`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.2.2): PHPUnit 13.2.2
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.2.1...13.2.2)
##### Fixed
- [#​6768](https://github.com/sebastianbergmann/phpunit/issues/6768): Negative priorities for hook methods are rejected by static analysis
- [#​6778](https://github.com/sebastianbergmann/phpunit/issues/6778): Deprecation triggered outside of tests cannot be ignored
***
Learn how to install or update PHPUnit 13.2 in the [documentation](https://docs.phpunit.de/en/13.2/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.2.1`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.2.1): PHPUnit 13.2.1
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.2.0...13.2.1)
##### Fixed
- [#​6741](https://github.com/sebastianbergmann/phpunit/issues/6741): Test is not run when `--filter` matches the name of a data set but not the name of the test method
- [#​6743](https://github.com/sebastianbergmann/phpunit/issues/6743): Improve error message for invalid version constraint in attribute
- [#​6744](https://github.com/sebastianbergmann/phpunit/issues/6744): Environment variable attributes reject empty-string values since PHPUnit 13.2.0
***
Learn how to install or update PHPUnit 13.2 in the [documentation](https://docs.phpunit.de/en/13.2/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.2.0`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.2.0): PHPUnit 13.2.0
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.1.14...13.2.0)
##### Added
- [#​3387](https://github.com/sebastianbergmann/phpunit/issues/3387): Specify a list of tests to run
- [#​4201](https://github.com/sebastianbergmann/phpunit/issues/4201): Handle interrupts and display current test results
- [#​4501](https://github.com/sebastianbergmann/phpunit/issues/4501): Option to mark test as risky when it does not contribute to code coverage
- [#​5757](https://github.com/sebastianbergmann/phpunit/issues/5757): Add assertions for ignoring whitespace differences in strings
- [#​5810](https://github.com/sebastianbergmann/phpunit/issues/5810): Do not dump arrays and objects in failure messages of `IsTrue`, `IsFalse`, `IsNull`, `IsFinite`, `IsInfinite`, and `IsNan` constraints
- [#​5838](https://github.com/sebastianbergmann/phpunit/issues/5838): Inherit `#[RunTestsInSeparateProcesses]` from parent test classes
- [#​5922](https://github.com/sebastianbergmann/phpunit/issues/5922): `assertContainsEquals()` should use `sebastian/comparator` for element comparison
- [#​6000](https://github.com/sebastianbergmann/phpunit/issues/6000): Report PHPT test as risky when `--SKIPIF--` does not have standard-output side effect
- [#​6075](https://github.com/sebastianbergmann/phpunit/issues/6075): Support test execution order sorted by descending duration
- [#​6346](https://github.com/sebastianbergmann/phpunit/issues/6346): Emit warning when conflicting CLI options are used
- [#​6534](https://github.com/sebastianbergmann/phpunit/issues/6534): Make `$_dataName` available to `#[TestDoxFormatter]` callbacks
- [#​6559](https://github.com/sebastianbergmann/phpunit/issues/6559): Improved API for exception message expectations
- [#​6565](https://github.com/sebastianbergmann/phpunit/pull/6565): Optional `$skipWhenEmpty` parameter for `#[DataProvider]` and `#[DataProviderExternal]`
- [#​6566](https://github.com/sebastianbergmann/phpunit/pull/6566): Allow `--stop-on-defect`, `--stop-on-error`, etc. to accept an optional threshold
- [#​6567](https://github.com/sebastianbergmann/phpunit/issues/6567): Make diff context lines configurable
- [#​6574](https://github.com/sebastianbergmann/phpunit/issues/6574): Improve `willReturnMap()` with constraint support and strict matching
- [#​6575](https://github.com/sebastianbergmann/phpunit/issues/6575): `--list-test-ids` CLI option and enhance `--filter` CLI option to support test ID syntax
- [#​6577](https://github.com/sebastianbergmann/phpunit/issues/6577): `--run-test-id <test-id>` CLI option that accepts a single test ID for exact matching
- [#​6579](https://github.com/sebastianbergmann/phpunit/pull/6579): Properly handle issues triggered outside of tests
- [#​6597](https://github.com/sebastianbergmann/phpunit/pull/6597): Compact output (activated through `--compact` CLI option and `PHPUNIT_COMPACT_OUTPUT=1` environment variable)
- [#​6598](https://github.com/sebastianbergmann/phpunit/pull/6598): `--disable-coverage-targeting` CLI option
- [#​6602](https://github.com/sebastianbergmann/phpunit/pull/6602): Separate configuration for branch coverage from path coverage
- [#​6606](https://github.com/sebastianbergmann/phpunit/pull/6606): Support for partially ordered parameter sets in mock object expectations
- [#​6611](https://github.com/sebastianbergmann/phpunit/pull/6611): Add CPU time to telemetry
- [#​6681](https://github.com/sebastianbergmann/phpunit/pull/6681): Comment-aware variants of XML comparison assertions
- The `executionOrder` attribute in the XML configuration file now accepts `defects` combined with any main order, as well as three-way combinations of `depends`/`no-depends`, `defects`, and a main order (for example, `depends,defects,duration-ascending`)
- `--validate-configuration` CLI option to validate an XML configuration file for PHPUnit
- Report TestDox information in Open Test Reporting XML
- Report per-test and per-test-suite resource usage (time, memory usage, peak memory usage) in Open Test Reporting XML
- Report number of assertions performed for each test in Open Test Reporting XML
- Report structured comparison failure details (expected, actual, diff) in Open Test Reporting XML
- Report random order seed in Open Test Reporting XML when test execution order is randomised
##### Changed
- [#​5873](https://github.com/sebastianbergmann/phpunit/issues/5873): Chain previously registered error handler instead of silently disabling PHPUnit's error handling
- [#​6535](https://github.com/sebastianbergmann/phpunit/pull/6535): Use `sebastian/file-filter` in `SourceFilter::includes()` for issue trigger identification
- [#​6581](https://github.com/sebastianbergmann/phpunit/issues/6581): Allow `#[IgnoreDeprecations]` to be repeated
- [#​6609](https://github.com/sebastianbergmann/phpunit/pull/6609): Skip data providers whose method cannot match `--filter`
- [#​6685](https://github.com/sebastianbergmann/phpunit/pull/6685): Generate failure messages for inverse assertions by authoring negations, not by rewriting strings
- Only errors and failures are now considered for "defect first" test reordering (tests that triggered deprecations, notices, or warnings as well as incomplete, risky, and skipped tests were previous also considered)
- A warning is now emitted when closures are compared for equality using the `IsEqual`, `IsEqualCanonicalizing`, `IsEqualIgnoringCase`, `IsEqualWithDelta`, and `TraversableContainsEqual` constraints or the `assertEquals()`, `assertEqualsCanonicalizing()`, `assertEqualsIgnoringCase()`, `assertEqualsWithDelta()`, and `assertContainsEquals()` assertions
##### Deprecated
- [#​6075](https://github.com/sebastianbergmann/phpunit/issues/6075): `--order-by duration` CLI option, use `--order-by duration-ascending` instead
- [#​6075](https://github.com/sebastianbergmann/phpunit/issues/6075): `--order-by size` CLI option, use `--order-by size-ascending` instead
- [#​6075](https://github.com/sebastianbergmann/phpunit/issues/6075): `executionOrder="duration"` XML configuration attribute value, use `executionOrder="duration-ascending"` instead
- [#​6075](https://github.com/sebastianbergmann/phpunit/issues/6075): `executionOrder="size"` XML configuration attribute value, use `executionOrder="size-ascending"` instead
- [#​6560](https://github.com/sebastianbergmann/phpunit/issues/6560): Soft-deprecate `expectExceptionMessage()`, use `expectExceptionMessageIsOrContains()` instead
##### Fixed
- [#​5845](https://github.com/sebastianbergmann/phpunit/issues/5845): Error handlers registered before PHPUnit (e.g. via `auto_prepend_file`) cause false "risky test" warnings
- [#​5851](https://github.com/sebastianbergmann/phpunit/issues/5851): Output buffer manipulation in tests causes incorrect capture, hangs, and silent failures
- [#​6582](https://github.com/sebastianbergmann/phpunit/issues/6582): `TestSuiteSorter::cmpSize()` does not handle `TestSuite` objects for `TestCase` classes
***
Learn how to install or update PHPUnit 13.2 in the [documentation](https://docs.phpunit.de/en/13.2/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.1.14`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.1.14): PHPUnit 13.1.14
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.1.13...13.1.14)
##### Fixed
- [#​6683](https://github.com/sebastianbergmann/phpunit/issues/6683): `assertNotEquals()` failure message says "is equal to" instead of "is not equal to" when comparing arrays or objects
- [#​6700](https://github.com/sebastianbergmann/phpunit/issues/6700): `expectOutputString()` and `expectOutputRegex()` silently replace themselves and each other
***
Learn how to install or update PHPUnit 13.1 in the [documentation](https://docs.phpunit.de/en/13.1/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.1.13`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.1.13): PHPUnit 13.1.13
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.1.12...13.1.13)
##### Fixed
- [#​6681](https://github.com/sebastianbergmann/phpunit/pull/6681): XML assertions such as `assertXmlStringEqualsXmlString()` regressed into treating comments as significant
***
Learn how to install or update PHPUnit 13.1 in the [documentation](https://docs.phpunit.de/en/13.1/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.1.12`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.1.12): PHPUnit 13.1.12
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.1.11...13.1.12)
##### Fixed
- [#​6673](https://github.com/sebastianbergmann/phpunit/issues/6673): Empty PHP settings from the parent process override per-test `-d` settings forwarded to child processes (breaks PCOV coverage)
***
Learn how to install or update PHPUnit 13.1 in the [documentation](https://docs.phpunit.de/en/13.1/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.1.11`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.1.11): PHPUnit 13.1.11
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.1.10...13.1.11)
##### Fixed
- PHP setting values containing `=` need to be quoted before forwarding via `-d`
***
Learn how to install or update PHPUnit 13.1 in the [documentation](https://docs.phpunit.de/en/13.1/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.1.10`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.1.10): PHPUnit 13.1.10
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.1.9...13.1.10)
##### Changed
- Pass configuration options introduced in sebastian/diff 8.3.0
***
Learn how to install or update PHPUnit 13.1 in the [documentation](https://docs.phpunit.de/en/13.1/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.1.9`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.1.9): PHPUnit 13.1.9
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.1.8...13.1.9)
##### Changed
- A `Test` or `Tests` prefix is no longer stripped from class names when they are processed for TestDox output
##### Fixed
- [#​6605](https://github.com/sebastianbergmann/phpunit/issues/6605): Data set names and provider values containing Unicode bidirectional control characters distort terminal output
- [#​6610](https://github.com/sebastianbergmann/phpunit/issues/6610): Per-testsuite bootstrap script not loaded in process isolation
- TestDox output collapsed separate test classes into a single group when their prettified class names matched
***
Learn how to install or update PHPUnit 13.1 in the [documentation](https://docs.phpunit.de/en/13.1/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.1.8`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.1.8): PHPUnit 13.1.8
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.1.7...13.1.8)
##### Fixed
- [#​6595](https://github.com/sebastianbergmann/phpunit/issues/6595): Crash when before-class or after-class method fails with assertion failure
- [#​6599](https://github.com/sebastianbergmann/phpunit/issues/6599): TeamCity logger does not wrap failures in before-test methods with `testStarted` and `testFinished`
- [#​6601](https://github.com/sebastianbergmann/phpunit/issues/6601): Anonymous classes are not rejected with a clear error when creating a test double
- [#​6603](https://github.com/sebastianbergmann/phpunit/issues/6603): `assertArrays*IgnoringOrder()` fails on mixed scalar types and on reordered nested associative arrays
- `MockBuilder::setMockClassName()` and `TestStubBuilder::setStubClassName()` now reject values that are not valid unqualified PHP class identifiers, throwing the new `InvalidClassNameException`
- The regular expression used by `Generator::ensureValidMethods()` to validate method names passed to `MockBuilder::onlyMethods()` and `addMethods()` was not anchored, so any string containing a valid identifier substring (including strings with parentheses, braces, comments, or newlines) was accepted
***
Learn how to install or update PHPUnit 13.1 in the [documentation](https://docs.phpunit.de/en/13.1/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.1.7`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.1.7): PHPUnit 13.1.7
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.1.6...13.1.7)
##### Changed
- Pass `LIBXML_NONET` when parsing/validating XML configuration files to make explicit that no network I/O is performed
- Verify the result file written by an isolated child process with a random nonce before deserializing it
***
Learn how to install or update PHPUnit 13.1 in the [documentation](https://docs.phpunit.de/en/13.1/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.1.6`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.1.6): PHPUnit 13.1.6
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.1.5...13.1.6)
##### Fixed
- [#​6590](https://github.com/sebastianbergmann/phpunit/issues/6590): Silent failure when configuration file is invalid
- [#​6592](https://github.com/sebastianbergmann/phpunit/pull/6592): INI metacharacters `;` and `"` are not preserved when forwarding settings to child processes
***
Learn how to install or update PHPUnit 13.1 in the [documentation](https://docs.phpunit.de/en/13.1/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.1.5`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.1.5): PHPUnit 13.1.5
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.1.4...13.1.5)
##### Fixed
- [#​5860](https://github.com/sebastianbergmann/phpunit/issues/5860): PHP CLI `-d` settings are not forwarded to child processes for process isolation
- [#​6451](https://github.com/sebastianbergmann/phpunit/issues/6451): Incomplete version in `RequiresPhp` (e.g. `<=8.5`) is compared against full PHP version, causing unexpected skips
- [#​6589](https://github.com/sebastianbergmann/phpunit/issues/6589): `dataSetAsStringWithData()` raises "float is not representable as int" warning for large floats in data sets
***
Learn how to install or update PHPUnit 13.1 in the [documentation](https://docs.phpunit.de/en/13.1/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.1.4`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.1.4): PHPUnit 13.1.4
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.1.3...13.1.4)
##### Fixed
- [#​5993](https://github.com/sebastianbergmann/phpunit/issues/5993): `DefaultJobRunner` deadlocks on child processes that write large amounts of stderr output
- [#​6465](https://github.com/sebastianbergmann/phpunit/issues/6465): SAPI-populated `$_SERVER` entries leak from parent into child process
- [#​6587](https://github.com/sebastianbergmann/phpunit/issues/6587): `failOnEmptyTestSuite="false"` in `phpunit.xml` is ignored when `--group`/`--filter`/`--testsuite` matches no tests
- [#​6588](https://github.com/sebastianbergmann/phpunit/issues/6588): Order of issue baseline entries is not canonicalized
***
Learn how to install or update PHPUnit 13.1 in the [documentation](https://docs.phpunit.de/en/13.1/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.1.3`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.1.3): PHPUnit 13.1.3
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.1.2...13.1.3)
##### Fixed
- Regression in XML configuration migration introduced in PHPUnit 12.5.8
***
Learn how to install or update PHPUnit 13.1 in the [documentation](https://docs.phpunit.de/en/13.1/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.1.2`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.1.2): PHPUnit 13.1.2
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.1.1...13.1.2)
##### Fixed
- [#​4571](https://github.com/sebastianbergmann/phpunit/issues/4571): No warning when `--random-order-seed` is used when test execution order is not random
- [#​4975](https://github.com/sebastianbergmann/phpunit/issues/4975): `--filter` does not work when filter string starts with `#`
- [#​5354](https://github.com/sebastianbergmann/phpunit/issues/5354): JUnit XML logger does not handle `TestSuiteSkipped` event
- [#​6276](https://github.com/sebastianbergmann/phpunit/issues/6276): Exit with non-zero exit code when explicit test selection (`--filter`, `--group`, `--testsuite`) yields no tests
- [#​6583](https://github.com/sebastianbergmann/phpunit/issues/6583): Failing output expectation skips `tearDown()` and handler restoration, causing subsequent tests to be marked as risky
***
Learn how to install or update PHPUnit 13.1 in the [documentation](https://docs.phpunit.de/en/13.1/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.1.1`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.1.1): PHPUnit 13.1.1
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.1.0...13.1.1)
##### Changed
- [#​3676](https://github.com/sebastianbergmann/phpunit/issues/3676): Include class/interface name in mock object expectation failure messages
- [#​4793](https://github.com/sebastianbergmann/phpunit/issues/4793): Exit with non-zero exit code when `exit` was called from some test
##### Fixed
- [#​5881](https://github.com/sebastianbergmann/phpunit/issues/5881): `colors="true"` in XML configuration file does not unconditionally enable colored output
- [#​6019](https://github.com/sebastianbergmann/phpunit/issues/6019): `--migrate-configuration` does not update schema location when XML content already validates against current schema
- [#​6372](https://github.com/sebastianbergmann/phpunit/issues/6372): Assertion failure inside `willReturnCallback()` is silently swallowed when code under test catches exceptions
- [#​6464](https://github.com/sebastianbergmann/phpunit/issues/6464): Process isolation template unconditionally calls `set_include_path()`
- [#​6571](https://github.com/sebastianbergmann/phpunit/issues/6571): Static analysis errors for `TestDoubleBuilder` method chaining
***
Learn how to install or update PHPUnit 13.1 in the [documentation](https://docs.phpunit.de/en/13.1/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.1.0`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.1.0): PHPUnit 13.1.0
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.0.6...13.1.0)
##### Added
- [#​6501](https://github.com/sebastianbergmann/phpunit/issues/6501): Include unexpected output in Open Test Reporting (OTR) XML logfile
- [#​6517](https://github.com/sebastianbergmann/phpunit/issues/6517): `includeInCodeCoverage` attribute for `<directory>` and `<file>` children of `<source>`
- [#​6523](https://github.com/sebastianbergmann/phpunit/issues/6523): Include `#[Group]` information in Open Test Reporting (OTR) XML logfile
- [#​6524](https://github.com/sebastianbergmann/phpunit/pull/6524): Report issues in Open Test Reporting (OTR) XML logfile
- [#​6526](https://github.com/sebastianbergmann/phpunit/pull/6526): Introduce `#[DataProviderClosure]` for static closures
- [#​6530](https://github.com/sebastianbergmann/phpunit/issues/6530): Support for custom issue trigger resolvers that can be configured using `<issueTriggerResolvers>` in the XML configuration file
- [#​6547](https://github.com/sebastianbergmann/phpunit/pull/6547): Support for `%r...%r` in `EXPECTF` section
- Support for configuring HTML code coverage report options (colors, thresholds, custom CSS) in XML configuration file without requiring an `outputDirectory` attribute, allowing the output directory to be specified later with the `--coverage-html` CLI option
- Support for configuring dark mode colors, progress bar colors, and breadcrumb colors for HTML code coverage reports in the XML configuration file
##### Changed
- [#​6557](https://github.com/sebastianbergmann/phpunit/pull/6557): Improve failure description for `StringMatchesFormatDescription` constraint which is used by `assertFileMatchesFormat()`, `assertFileMatchesFormatFile()`, `assertStringMatchesFormat()`, `assertStringMatchesFormatFile()`, and `EXPECTF` sections of PHPT test files
- The HTML code coverage report now uses a more colorblind-friendly blue/amber/orange palette by default
- Extracted `PHPUnit\Runner\Extension\Facade` from a concrete class to an interface and introduced an internal `ExtensionFacade` implementation, so that extensions only depend on the `Facade` interface while PHPUnit internally uses the `ExtensionFacade` class that also provides query methods
##### Deprecated
- [#​6515](https://github.com/sebastianbergmann/phpunit/issues/6515): Deprecate the `--log-events-verbose-text <file>` CLI option
- [#​6537](https://github.com/sebastianbergmann/phpunit/issues/6537): Soft-deprecate `id()` and `after()` for mock object expectations
##### Fixed
- [#​6025](https://github.com/sebastianbergmann/phpunit/issues/6025): `FILE_EXTERNAL` breaks `__DIR__`
- [#​6351](https://github.com/sebastianbergmann/phpunit/issues/6351): No warning when the same test runner extension is configured more than once
- [#​6433](https://github.com/sebastianbergmann/phpunit/issues/6433): Logic in `TestSuiteLoader` is brittle and causes "Class FooTest not found" even for valid tests in valid filenames
- [#​6463](https://github.com/sebastianbergmann/phpunit/issues/6463): Process Isolation fails on non-serializable globals and quietly ignore closures
***
Learn how to install or update PHPUnit 13.1 in the [documentation](https://docs.phpunit.de/en/13.1/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.0.6`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.0.6): PHPUnit 13.0.6
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.0.5...13.0.6)
##### Changed
- [#​4440](https://github.com/sebastianbergmann/phpunit/issues/4440): Improve error when configured code coverage file list is empty
- [#​6549](https://github.com/sebastianbergmann/phpunit/pull/6549): Allow to stub both hooks of non-virtual properties
##### Fixed
- [#​6529](https://github.com/sebastianbergmann/phpunit/pull/6529): Git "detached HEAD state" in Open Test Reporting (OTR) XML logger not handled properly
- [#​6545](https://github.com/sebastianbergmann/phpunit/issues/6545): Stubbing a class with set property hook leaves property uninitialized by default
- The `RegularExpression` and `StringMatchesFormatDescription` did not handle `preg_match()` errors such as `Compilation failed: regular expression is too large`
***
Learn how to install or update PHPUnit 13.0 in the [documentation](https://docs.phpunit.de/en/13.0/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.0.5`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.0.5): PHPUnit 13.0.5
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.0.4...13.0.5)
##### Fixed
- [#​6521](https://github.com/sebastianbergmann/phpunit/issues/6521): Performance regression in PHPUnit 11.5.54, PHPUnit 12.5.13, and PHPUnit 13.0.4
***
Learn how to install or update PHPUnit 13.0 in the [documentation](https://docs.phpunit.de/en/13.0/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.0.4`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.0.4): PHPUnit 13.0.4
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.0.3...13.0.4)
##### Fixed
- [#​6489](https://github.com/sebastianbergmann/phpunit/pull/6489): Classification of self/direct/indirect deprecation triggers is not aligned with Symfony's bridge for PHPUnit
***
Learn how to install or update PHPUnit 13.0 in the [documentation](https://docs.phpunit.de/en/13.0/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.0.3`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.0.3): PHPUnit 13.0.3
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.0.2...13.0.3)
##### Fixed
- [#​6511](https://github.com/sebastianbergmann/phpunit/issues/6511): TestDox variables out of order with named arguments
- [#​6514](https://github.com/sebastianbergmann/phpunit/issues/6514): `<ini />` can silently fail
***
Learn how to install or update PHPUnit 13.0 in the [documentation](https://docs.phpunit.de/en/13.0/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.0.2`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.0.2): PHPUnit 13.0.2
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.0.1...13.0.2)
##### Deprecated
- [#​6505](https://github.com/sebastianbergmann/phpunit/issues/6505): Calling `atLeast()` with an argument that is not positive
- [#​6507](https://github.com/sebastianbergmann/phpunit/issues/6507): Support for using `with*()` without `expects()`
##### Fixed
- [#​6503](https://github.com/sebastianbergmann/phpunit/issues/6503): Temporary file used by `SourceMapper` may be deleted prematurely when multiple PHPUnit processes run in parallel
- [#​6509](https://github.com/sebastianbergmann/phpunit/issues/6509): "No expectations were configured for the mock object ..." notice is emitted when `with()` is used without `expects()`
***
Learn how to install or update PHPUnit 13.0 in the [documentation](https://docs.phpunit.de/en/13.0/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.0.1`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.0.1): PHPUnit 13.0.1
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/13.0.0...13.0.1)
##### Fixed
- [#​6495](https://github.com/sebastianbergmann/phpunit/pull/6495): Source map for issue trigger identification is regenerated in process isolation child processes
- [#​6497](https://github.com/sebastianbergmann/phpunit/issues/6497): `method()` returns `InvocationMocker` instead of `InvocationStubber` for test stubs
***
Learn how to install or update PHPUnit 13.0 in the [documentation](https://docs.phpunit.de/en/13.0/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v13.0.0`](https://github.com/sebastianbergmann/phpunit/releases/tag/13.0.0): PHPUnit 13.0.0
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.45...13.0.0)
##### Added
- [#​6450](https://github.com/sebastianbergmann/phpunit/issues/6450): `TestCase::invokeTestMethod()` method for customizing test method invocation
- [#​6455](https://github.com/sebastianbergmann/phpunit/issues/6455): `withParameterSetsInOrder()` and `withParameterSetsInAnyOrder()` for expecting calls to the same method of a mock object but with different arguments
- [#​6466](https://github.com/sebastianbergmann/phpunit/issues/6466): Sealed test doubles
- [#​6468](https://github.com/sebastianbergmann/phpunit/issues/6468): Configuration option to require sealed mock objects
- [#​6477](https://github.com/sebastianbergmann/phpunit/pull/6477): `assertArraysAreIdentical()`, `assertArraysAreIdenticalIgnoringOrder()`, `assertArraysHaveIdenticalValues()`, `assertArraysHaveIdenticalValuesIgnoringOrder()`, `assertArraysAreEqual()`, `assertArraysAreEqualIgnoringOrder()`, `assertArraysHaveEqualValues()`, and `assertArraysHaveEqualValuesIgnoringOrder()` assertions
- `--test-files-file <file>` CLI option to configure a file that contains the paths to the test files to be loaded (one file per line); use this when using CLI arguments is not an option due to argument length limitations
##### Deprecated
- [#​6461](https://github.com/sebastianbergmann/phpunit/issues/6461): `any()` matcher (hard deprecation)
##### Removed
- [#​6054](https://github.com/sebastianbergmann/phpunit/issues/6054): `Assert::isType()`
- [#​6057](https://github.com/sebastianbergmann/phpunit/issues/6057): `assertContainsOnly()` and `assertNotContainsOnly()`
- [#​6061](https://github.com/sebastianbergmann/phpunit/issues/6061): `containsOnly()`
- [#​6076](https://github.com/sebastianbergmann/phpunit/issues/6076): Support for PHP 8.3
- [#​6141](https://github.com/sebastianbergmann/phpunit/issues/6141): `testClassName()` method on event value objects for hook methods called for test methods
- [#​6230](https://github.com/sebastianbergmann/phpunit/issues/6230): `Configuration::includeTestSuite()` and `Configuration::excludeTestSuite()`
- [#​6241](https://github.com/sebastianbergmann/phpunit/issues/6241): `--dont-report-useless-tests` CLI option
- [#​6247](https://github.com/sebastianbergmann/phpunit/issues/6247): Support for using `#[CoversNothing]` on a test method
- [#​6285](https://github.com/sebastianbergmann/phpunit/issues/6285): `#[RunClassInSeparateProcess]` attribute
- [#​6356](https://github.com/sebastianbergmann/phpunit/issues/6356): Support for version constraint string argument without explicit version comparison operator
***
Learn how to install or update PHPUnit 13.0 in the [documentation](https://docs.phpunit.de/en/13.0/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.45`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.45): PHPUnit 12.5.45
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.44...12.5.45)
##### Fixed
- The baseline generated using `--generate-baseline` contains an issue once for each time it was triggered, for instance once for each data set of a test that uses a data provider, instead of once
- A baseline is not applied to the issues that are triggered in a file that is not located in the directory of the baseline, or in a directory below it, for instance when the baseline is located in `build/baseline.xml` and the file in `src`
- When `--log-junit php://stdout` is used, or `php://stdout` is configured for the JUnit XML logfile in the XML configuration file, and the test runner prints its regular output, the test runner ends with `An error occurred inside PHPUnit` after the JUnit XML was printed: the test results are not printed, code coverage reports and the baseline are not written, and the shell exit code is `255`
- When `--log-junit php://stdout` is used together with `--stderr`, the JUnit XML is printed to the standard error stream
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.44`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.44): PHPUnit 12.5.44
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.43...12.5.44)
##### Fixed
- When an order is configured on the command line, for instance using `--order-by random`, `defects` configured using the `executionOrder` attribute in the XML configuration file is still applied, and vice versa
- `--fail-on-skipped` does not make the test runner exit with a shell exit code that indicates failure when a test class is skipped, for instance because its before-first-test method calls `markTestSkipped()`, although its tests are counted as skipped
- `--stop-on-skipped` does not stop the test run when a test class is skipped, for instance because its before-first-test method calls `markTestSkipped()`
- When PHPUnit is installed using Composer, code units in the `PHPUnit\` or `SebastianBergmann\` namespace that do not belong to PHPUnit or one of its dependencies are preloaded on startup, which leads to a fatal error when such a code unit depends on code that is not available
- Code from `nikic/php-parser` and parts of the code from `phar-io/manifest` are not treated like code from PHPUnit's other dependencies, for instance stack frames from it are not filtered from stack traces
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.43`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.43): PHPUnit 12.5.43
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.42...12.5.43)
##### Changed
- Issues whose message refers to an anonymous class could not be ignored using a baseline on PHP 8.6 (as of PHP 8.6, such messages contain the full name of the anonymous class: a NUL byte followed by the file, line, and a counter)
- Make PHAR build reproducible across filesystems (files are now added to the PHAR sorted by their path instead of in the order in which the filesystem lists them)
##### Fixed
- When `method()` is called for a method of a test double that cannot be configured, for instance because it does not exist, every subsequent invocation of a method of that test double fails with `Method name is not configured`
- When a hook method of a test, for instance `setUp()`, marks the test as incomplete, the hook method is reported as failed
- When an "after test" method, for instance `tearDown()`, marks a successful test as incomplete or skips it, the test is reported as failed
- When a before-first-test method, for instance `setUpBeforeClass()`, calls `markTestIncomplete()`, each test of the test class is reported as failed instead of the test class being skipped as it is when `markTestSkipped()` is called
- When an after-last-test method, for instance `tearDownAfterClass()`, calls `markTestIncomplete()` or `markTestSkipped()` after the tests of the test class have been run, this is reported as a failure, also for each test of the test class that is run in process isolation
- A failed PHP assertion, made using `assert()`, in a hook method is reported as an error of that method instead of as a failure, and it is counted as an error instead of as a failure when that method is a before-first-test method or an after-last-test method
- When an assertion fails in an "after test" method, for instance `tearDown()`, of a test that already failed, errored, or was marked as incomplete, a failure is reported in addition to the outcome of the test, so the test is counted more than once and `onNotSuccessfulTest()` is called with the failure from the "after test" method instead of the test's own
- When a test fails because of an exception of a registered failure type, an error or a failure in an "after test" method, for instance `tearDown()`, is reported in addition to the test's failure, so the test is counted more than once
- A test that fails because of an exception of a registered failure type is considered risky when it does not perform assertions or, when `requireCoverageMetadata="true"` is configured, when it does not define a code coverage target, unlike a test that fails because an assertion failed
- The TestDox output does not show the failure of a before-first-test method or an after-last-test method, for instance an assertion failure in `setUpBeforeClass()`
- Control characters and ANSI escape sequences in user-supplied strings are not made visible in the output of `--debug` and in the logfiles written by `--log-events-text` and `--log-events-verbose-text`
- Groups configured for a test directory or test file using the `groups` attribute of `<directory>` or `<file>` in the XML configuration file are not assigned to PHPT tests, so `--group` and `--exclude-group` do not select them and `--list-groups` and `--list-tests-xml` report them as being in the `default` group or not at all
##### Removed
- The library PHAR (`phpunit-library-X.Y.Z.phar`) is no longer built, it could not be loaded since PHPUnit 9.5.8
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.42`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.42): PHPUnit 12.5.42
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.41...12.5.42)
##### Fixed
- The static analysis cache directory that is automatically created in the operating system's path used for temporary files when no cache directory is configured is not used when the POSIX extension is not loaded
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.41`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.41): PHPUnit 12.5.41
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.40...12.5.41)
##### Fixed
- The TeamCity logger writes `testSuiteFinished` twice for a test class when one of its before-first-test methods errors or fails
- The TestDox output shows a less important outcome of a test that has more than one outcome, for instance the failure in `tearDown()` of a test that errored
- When no static analysis cache directory is configured, the cache directory that is automatically created in the operating system's path used for temporary files is also used when it was created by another user or can be written to by other users
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.40`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.40): PHPUnit 12.5.40
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.39...12.5.40)
##### Fixed
- The dependencies of a test that are listed after a dependency on a test that does not return a value, or after a dependency on a larger test, were not checked, so the test was run instead of being skipped when one of these dependencies had not passed
- Tests could not be run in process isolation when the namespace of the test class begins with a name that the code of the child process imports, for instance `CodeCoverage` or `Facade`
- A test that is run in process isolation aborts the test run when its data set or a value returned by a test it depends on cannot be serialized, for instance because it is a closure
- When a before-first-test method or an after-last-test method errors or fails, the remaining methods of the same kind are still called, and each of them that does not error or fail itself is reported with the exception of the earlier method
- When a hook method of a test, for instance a `#[Before]` method, skips the test, the remaining hook methods of the same kind are still called, so the test is reported as errored instead of skipped when one of them errors
- An error or failure in a before-first-test method or an after-last-test method that is called again in the child process of a test that is run in process isolation is reported twice, once for the test class and once for the test
- When a before-first-test method errors, the progress output shows one `E` for the test class instead of one for each of its tests, only one of its tests is counted as run, and the test that is run next is shown as an error
- When a before-first-test method fails, the progress output shows nothing for the tests of the test class and only one of them is counted as run
- The Open Test Reporting XML logfile has no start for a test that errors before it is prepared, for instance because it depends on a test that does not exist, and no end for the test that is run after a test that is skipped because a test it depends on did not pass or because one of its
requirements is not met
- The Open Test Reporting XML logfile has an end without an ID for a test that is marked as incomplete before it is prepared, for instance in `setUp()`, and no end for the test that is run after it
- The Open Test Reporting XML logfile has no end for the test that is run after a test whose preparation errors, for instance because `setUp()` raises an exception or the global state cannot be backed up
- The Open Test Reporting XML logfile has more than one end for a test that has more than one outcome, for instance because `tearDown()` fails after the test errored
- The Open Test Reporting XML logfile is not well-formed when a test name, a message, or the string representation of an exception contains `]]>`, bytes that are not valid UTF-8, or characters that are not allowed in XML, for instance the escape character of an ANSI escape sequence
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.39`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.39): PHPUnit 12.5.39
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.38...12.5.39)
##### Fixed
- [#​7053](https://github.com/sebastianbergmann/phpunit/issues/7053): Extensions loaded using `-d extension` or `-d zend_extension` are not loaded in child processes
- The status of a test whose mock object raises an exception in its destructor is success although the test is reported as errored, so `tearDown()` sees the wrong status and code coverage records the test as successful
- Named arguments passed to `with()` were matched by position instead of by name, so an expectation such as `->with(b: 7)` compared the expected value with the first parameter of the method and the parameter named `$b` was not checked
- When code coverage is collected and no code coverage driver is available in a child process, a test that is run in process isolation errors and a PHPT test fails instead of a warning being emitted
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.38`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.38): PHPUnit 12.5.38
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.37...12.5.38)
##### Changed
- The Software Bill of Materials (SBOM) embedded in the PHAR now uses CycloneDX 1.7 and provides the NTIA minimum elements as well as the data fields that BSI TR-03183-2 (version 2.1.0) requires for logical and identified components, including component creators, original, distribution and effective licences, source code URIs, and the PHP runtime and its extensions as external components
##### Fixed
- `setUpBeforeClass()` and `tearDownAfterClass()` were run twice for a test class that is the only test class in a test suite of the XML configuration file that has the name of that test class
- Tests could not be run in process isolation when the path of the bootstrap script, the test file, or the directory for temporary files contained a single quote
- A test that is run in process isolation aborts the test run when its result cannot be unserialized, for instance because it returns an object that holds a test double
- Issues that are listed in the baseline are not ignored for tests that are run in a separate process
- Arguments in the `--ARGS--` section of a PHPT test that start with `-` were interpreted by PHP instead of being passed to the test when the test also has a `--STDIN--` section
- Recording the tests that passed in a child process copied all tests that had passed so far, which made running many tests in process isolation increasingly slow
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.37`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.37): PHPUnit 12.5.37
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.36...12.5.37)
##### Fixed
- The class name argument of `#[RequiresMethod]` is declared as `class-string`, so static analysis reports an error when it refers to a class that does not exist
- A `#[RequiresMethod]` attribute that refers to a class which cannot be loaded, for instance because its parent class does not exist, aborts the test run instead of skipping the test
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.36`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.36): PHPUnit 12.5.36
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.35...12.5.36)
##### Changed
- Control characters and ANSI escape sequences in user-supplied strings such as test names, data set names, and messages are now made visible as `\u{NNNN}` escape sequences instead of being passed through to the terminal
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.35`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.35): PHPUnit 12.5.35
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.34...12.5.35)
##### Fixed
- Paths of included files are now escaped when generating the code that is executed in a separate process, so that a path containing special characters no longer produces broken code
- Tests of a test class that is skipped as a whole are missing from the TestDox output
- A test that is skipped or marked incomplete before it started is missing from the TestDox output
- A test that is marked incomplete before it started is not counted in the number of tests that ran
- No progress is printed for a test that is marked incomplete before it started
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.34`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.34): PHPUnit 12.5.34
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.33...12.5.34)
##### Fixed
- [#​6904](https://github.com/sebastianbergmann/phpunit/issues/6904): `SourceMap` is built in child process even though `identifyIssueTrigger` is disabled
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.33`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.33): PHPUnit 12.5.33
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.32...12.5.33)
##### Fixed
- [#​6861](https://github.com/sebastianbergmann/phpunit/issues/6861): Hook methods run twice when a template method is marked with its corresponding attribute
- Regression that stopped test methods from being sorted by source code location
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.32`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.32): PHPUnit 12.5.32
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.31...12.5.32)
##### Fixed
- [#​6833](https://github.com/sebastianbergmann/phpunit/issues/6833): `assertArrayHasKey()` does not accept `ArrayAccess` implementations with a specific value type when test code is analysed with PHPStan at level 9
- [#​6854](https://github.com/sebastianbergmann/phpunit/issues/6854): Deprecation triggered in first-party code is wrongly classified as indirect when the first-party code is called from third-party code
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.31`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.31): PHPUnit 12.5.31
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.30...12.5.31)
##### Changed
- [#​6797](https://github.com/sebastianbergmann/phpunit/issues/6797): Adapt code generated for test double of interface with constructor for PHP 8.6
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.30`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.30): PHPUnit 12.5.30
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.29...12.5.30)
##### Fixed
- [#​6743](https://github.com/sebastianbergmann/phpunit/issues/6743): Improve error message for invalid version constraint in attribute
- Class, method, and data-set names in TestDox HTML report are not escaped
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.29`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.29): PHPUnit 12.5.29
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.28...12.5.29)
##### Fixed
- [#​6683](https://github.com/sebastianbergmann/phpunit/issues/6683): `assertNotEquals()` failure message says "is equal to" instead of "is not equal to" when comparing arrays or objects
- [#​6700](https://github.com/sebastianbergmann/phpunit/issues/6700): `expectOutputString()` and `expectOutputRegex()` silently replace themselves and each other
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.28`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.28): PHPUnit 12.5.28
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.27...12.5.28)
##### Fixed
- [#​6681](https://github.com/sebastianbergmann/phpunit/pull/6681): XML assertions such as `assertXmlStringEqualsXmlString()` regressed into treating comments as significant
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.27`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.27): PHPUnit 12.5.27
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.26...12.5.27)
##### Fixed
- [#​6673](https://github.com/sebastianbergmann/phpunit/issues/6673): Empty PHP settings from the parent process override per-test `-d` settings forwarded to child processes (breaks PCOV coverage)
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.26`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.26): PHPUnit 12.5.26
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.25...12.5.26)
##### Fixed
- PHP setting values containing `=` need to be quoted before forwarding via `-d`
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.25`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.25): PHPUnit 12.5.25
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.24...12.5.25)
##### Changed
- A `Test` or `Tests` prefix is no longer stripped from class names when they are processed for TestDox output
##### Fixed
- [#​6605](https://github.com/sebastianbergmann/phpunit/issues/6605): Data set names and provider values containing Unicode bidirectional control characters distort terminal output
- [#​6610](https://github.com/sebastianbergmann/phpunit/issues/6610): Per-testsuite bootstrap script not loaded in process isolation
- TestDox output collapsed separate test classes into a single group when their prettified class names matched
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.24`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.24): PHPUnit 12.5.24
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.23...12.5.24)
##### Added
- [#​6596](https://github.com/sebastianbergmann/phpunit/issues/6596): Backport `TestCase::invokeTestMethod()` method for customizing test method invocation from PHPUnit 13
##### Fixed
- [#​6595](https://github.com/sebastianbergmann/phpunit/issues/6595): Crash when before-class or after-class method fails with assertion failure
- [#​6599](https://github.com/sebastianbergmann/phpunit/issues/6599): TeamCity logger does not wrap failures in before-test methods with `testStarted` and `testFinished`
- [#​6601](https://github.com/sebastianbergmann/phpunit/issues/6601): Anonymous classes are not rejected with a clear error when creating a test double
- `MockBuilder::setMockClassName()` and `TestStubBuilder::setStubClassName()` now reject values that are not valid unqualified PHP class identifiers, throwing the new `InvalidClassNameException`
- The regular expression used by `Generator::ensureValidMethods()` to validate method names passed to `MockBuilder::onlyMethods()` and `addMethods()` was not anchored, so any string containing a valid identifier substring (including strings with parentheses, braces, comments, or newlines) was accepted
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.23`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.23): PHPUnit 12.5.23
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.22...12.5.23)
##### Changed
- Pass `LIBXML_NONET` when parsing/validating XML configuration files to make explicit that no network I/O is performed
- Verify the result file written by an isolated child process with a random nonce before deserializing it
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.22`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.22): PHPUnit 12.5.22
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.21...12.5.22)
##### Fixed
- [#​6590](https://github.com/sebastianbergmann/phpunit/issues/6590): Silent failure when configuration file is invalid
- [#​6592](https://github.com/sebastianbergmann/phpunit/pull/6592): INI metacharacters `;` and `"` are not preserved when forwarding settings to child processes
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.21`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.21): PHPUnit 12.5.21
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.20...12.5.21)
##### Fixed
- [#​5860](https://github.com/sebastianbergmann/phpunit/issues/5860): PHP CLI `-d` settings are not forwarded to child processes for process isolation
- [#​6451](https://github.com/sebastianbergmann/phpunit/issues/6451): Incomplete version in `RequiresPhp` (e.g. `<=8.5`) is compared against full PHP version, causing unexpected skips
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.20`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.20): PHPUnit 12.5.20
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.19...12.5.20)
##### Fixed
- [#​5993](https://github.com/sebastianbergmann/phpunit/issues/5993): `DefaultJobRunner` deadlocks on child processes that write large amounts of stderr output
- [#​6465](https://github.com/sebastianbergmann/phpunit/issues/6465): SAPI-populated `$_SERVER` entries leak from parent into child process
- [#​6587](https://github.com/sebastianbergmann/phpunit/issues/6587): `failOnEmptyTestSuite="false"` in `phpunit.xml` is ignored when `--group`/`--filter`/`--testsuite` matches no tests
- [#​6588](https://github.com/sebastianbergmann/phpunit/issues/6588): Order of issue baseline entries is not canonicalized
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.19`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.19): PHPUnit 12.5.19
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.18...12.5.19)
##### Fixed
- Regression in XML configuration migration introduced in PHPUnit 12.5.8
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.18`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.18): PHPUnit 12.5.18
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.17...12.5.18)
##### Fixed
- [#​4571](https://github.com/sebastianbergmann/phpunit/issues/4571): No warning when `--random-order-seed` is used when test execution order is not random
- [#​4975](https://github.com/sebastianbergmann/phpunit/issues/4975): `--filter` does not work when filter string starts with `#`
- [#​5354](https://github.com/sebastianbergmann/phpunit/issues/5354): JUnit XML logger does not handle `TestSuiteSkipped` event
- [#​6276](https://github.com/sebastianbergmann/phpunit/issues/6276): Exit with non-zero exit code when explicit test selection (`--filter`, `--group`, `--testsuite`) yields no tests
- [#​6583](https://github.com/sebastianbergmann/phpunit/issues/6583): Failing output expectation skips `tearDown()` and handler restoration, causing subsequent tests to be marked as risky
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.17`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.17): PHPUnit 12.5.17
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.16...12.5.17)
##### Changed
- [#​4793](https://github.com/sebastianbergmann/phpunit/issues/4793): Exit with non-zero exit code when `exit` was called from some test
##### Fixed
- [#​5881](https://github.com/sebastianbergmann/phpunit/issues/5881): `colors="true"` in XML configuration file does not unconditionally enable colored output
- [#​6019](https://github.com/sebastianbergmann/phpunit/issues/6019): `--migrate-configuration` does not update schema location when XML content already validates against current schema
- [#​6372](https://github.com/sebastianbergmann/phpunit/issues/6372): Assertion failure inside `willReturnCallback()` is silently swallowed when code under test catches exceptions
- [#​6464](https://github.com/sebastianbergmann/phpunit/issues/6464): Process isolation template unconditionally calls `set_include_path()`
- [#​6571](https://github.com/sebastianbergmann/phpunit/issues/6571): Static analysis errors for `TestDoubleBuilder` method chaining
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.16`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.16): PHPUnit 12.5.16
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.15...12.5.16)
##### Added
- [#​6547](https://github.com/sebastianbergmann/phpunit/pull/6547): Support for `%r...%r` in `EXPECTF` section
##### Fixed
- [#​6025](https://github.com/sebastianbergmann/phpunit/issues/6025): `FILE_EXTERNAL` breaks `__DIR__`
- [#​6351](https://github.com/sebastianbergmann/phpunit/issues/6351): No warning when the same test runner extension is configured more than once
- [#​6433](https://github.com/sebastianbergmann/phpunit/issues/6433): Logic in `TestSuiteLoader` is brittle and causes "Class FooTest not found" even for valid tests in valid filenames
- [#​6463](https://github.com/sebastianbergmann/phpunit/issues/6463): Process Isolation fails on non-serializable globals and quietly ignore closures
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.15`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.15): PHPUnit 12.5.15
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.14...12.5.15)
##### Changed
- [#​4440](https://github.com/sebastianbergmann/phpunit/issues/4440): Improve error when configured code coverage file list is empty
- [#​6549](https://github.com/sebastianbergmann/phpunit/pull/6549): Allow to stub both hooks of non-virtual properties
##### Fixed
- [#​6529](https://github.com/sebastianbergmann/phpunit/pull/6529): Git "detached HEAD state" in Open Test Reporting (OTR) XML logger not handled properly
- [#​6545](https://github.com/sebastianbergmann/phpunit/issues/6545): Stubbing a class with set property hook leaves property uninitialized by default
- The `RegularExpression` and `StringMatchesFormatDescription` did not handle `preg_match()` errors such as `Compilation failed: regular expression is too large`
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.14`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.14): PHPUnit 12.5.14
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.13...12.5.14)
##### Fixed
- [#​6521](https://github.com/sebastianbergmann/phpunit/issues/6521): Performance regression in PHPUnit 11.5.54, PHPUnit 12.5.13, and PHPUnit 13.0.4
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.13`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.13): PHPUnit 12.5.13
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.12...12.5.13)
##### Fixed
- [#​6489](https://github.com/sebastianbergmann/phpunit/pull/6489): Classification of self/direct/indirect deprecation triggers is not aligned with Symfony's bridge for PHPUnit
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.12`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.12): PHPUnit 12.5.12
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.11...12.5.12)
##### Fixed
- [#​6511](https://github.com/sebastianbergmann/phpunit/issues/6511): TestDox variables out of order with named arguments
- [#​6514](https://github.com/sebastianbergmann/phpunit/issues/6514): `<ini />` can silently fail
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.11`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.11): PHPUnit 12.5.11
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.10...12.5.11)
##### Deprecated
- [#​6510](https://github.com/sebastianbergmann/phpunit/issues/6510): Deprecate using `with*()` on test stubs
##### Fixed
- [#​6503](https://github.com/sebastianbergmann/phpunit/issues/6503): Temporary file used by `SourceMapper` may be deleted prematurely when multiple PHPUnit processes run in parallel
- [#​6509](https://github.com/sebastianbergmann/phpunit/issues/6509): "No expectations were configured for the mock object ..." notice is emitted when `with()` is used without `expects()`
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.10`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.10): PHPUnit 12.5.10
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.9...12.5.10)
##### Fixed
- [#​6495](https://github.com/sebastianbergmann/phpunit/pull/6495): Source map for issue trigger identification is regenerated in process isolation child processes
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.9`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.9): PHPUnit 12.5.9
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.8...12.5.9)
##### Added
- [#​6488](https://github.com/sebastianbergmann/phpunit/issues/6488): Allow disabling issue trigger identification for improved performance
##### Fixed
- [#​6486](https://github.com/sebastianbergmann/phpunit/issues/6486): Incorrect file name reported for errors for test methods declared in traits
- [#​6490](https://github.com/sebastianbergmann/phpunit/pull/6490): Incorrect test count when tests are skipped in before-class method
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.8`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.8): PHPUnit 12.5.8
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.7...12.5.8)
##### Changed
- To prevent Poisoned Pipeline Execution (PPE) attacks using prepared `.coverage` files 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
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.7`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.7): PHPUnit 12.5.7
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.6...12.5.7)
##### Fixed
- [#​6362](https://github.com/sebastianbergmann/phpunit/issues/6362): Manually instantiated test doubles are broken since PHPUnit 11.2
- [#​6470](https://github.com/sebastianbergmann/phpunit/issues/6470): Infinite recursion in `Count::getCountOf()` for unusal implementations of `Iterator` or `IteratorAggregate`
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.6`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.6): PHPUnit 12.5.6
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.5...12.5.6)
##### Changed
- Reverted a change that caused a [build failure](https://github.com/php/php-src/actions/runs/21052584327/job/60542023395#step:14:3729) for the [PHP project's nightly community job](https://phpunit.expert/articles/how-php-and-its-ecosystem-test-each-other.html?ref=github)
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.5`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.5): PHPUnit 12.5.5
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.4...12.5.5)
##### Deprecated
- [#​6461](https://github.com/sebastianbergmann/phpunit/issues/6461): `any()` matcher (soft deprecation)
##### Fixed
- [#​6470](https://github.com/sebastianbergmann/phpunit/issues/6470): Mocking a class with a property hook setter accepting more types than the property results in a fatal error
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.4`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.4): PHPUnit 12.5.4
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.3...12.5.4)
##### Changed
- The `#[AllowMockObjectsWithoutExpectations]` attribute can now be used on the method level
##### Fixed
- [#​6446](https://github.com/sebastianbergmann/phpunit/issues/6446): Test runner crashes with `Timer::start() has to be called before Timer::stop()`
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.3`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.3): PHPUnit 12.5.3
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.2...12.5.3)
##### Changed
- The message emitted when a test method creates a mock object but does not configure any expectations for it has been improved
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.2`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.2): PHPUnit 12.5.2
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.1...12.5.2)
##### Added
- Attribute `#[AllowMockObjectsWithoutExpectations]` for excluding tests from the check that emits the notice for test methods that create a mock object but do not configure an expectation for it
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.1`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.1): PHPUnit 12.5.1
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.5.0...12.5.1)
##### Added
- `TestCase::getStubBuilder()` (analogous to `TestCase::getMockBuilder()`) for creating (partial) test stubs using a fluent API
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.5.0`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.0): PHPUnit 12.5.0
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.4.5...12.5.0)
##### Added
- [#​6376](https://github.com/sebastianbergmann/phpunit/issues/6376): `--all` CLI option to ignore test selection configured in XML configuration file
- [#​6422](https://github.com/sebastianbergmann/phpunit/issues/6422): Make `<source>` element in XML code coverage report optional
##### Changed
- [#​6380](https://github.com/sebastianbergmann/phpunit/pull/6380): Allow `Throwable` in `expectExceptionObject()`
- A PHPUnit notice is now emitted for test methods that create a mock object but do not configure an expectation for it
***
Learn how to install or update PHPUnit 12.5 in the [documentation](https://docs.phpunit.de/en/12.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.4.5`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.4.5): PHPUnit 12.4.5
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.4.4...12.4.5)
##### Changed
- Updated list of deprecated PHP configuration settings for PHP 8.4, PHP 8.5, and PHP 8.6
##### Fixed
- [#​6426](https://github.com/sebastianbergmann/phpunit/pull/6426): Fix migration of configuration without schema location
***
Learn how to install or update PHPUnit 12.4 in the [documentation](https://docs.phpunit.de/en/12.4/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.4.4`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.4.4): PHPUnit 12.4.4
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.4.3...12.4.4)
##### Fixed
- [#​6408](https://github.com/sebastianbergmann/phpunit/issues/6408): Exception in a data provider method leads to internal PHPUnit error
- [#​6410](https://github.com/sebastianbergmann/phpunit/issues/6410): Test runner's shutdown handler is called in system-under-test's child process
***
Learn how to install or update PHPUnit 12.4 in the [documentation](https://docs.phpunit.de/en/12.4/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.4.3`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.4.3): PHPUnit 12.4.3
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.4.2...12.4.3)
##### Fixed
- [#​6402](https://github.com/sebastianbergmann/phpunit/pull/6402): Avoid reading from `STDOUT` when `rewind()` fails
***
Learn how to install or update PHPUnit 12.4 in the [documentation](https://docs.phpunit.de/en/12.4/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.4.2`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.4.2): PHPUnit 12.4.2
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.4.1...12.4.2)
##### Changed
- Skipped tests alone no longer lead to a yellow background for the test result summary
##### Fixed
- [#​6391](https://github.com/sebastianbergmann/phpunit/issues/6391): Errors during backup of global variables and static properties are not reported
***
Learn how to install or update PHPUnit 12.4 in the [documentation](https://docs.phpunit.de/en/12.4/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.4.1`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.4.1): PHPUnit 12.4.1
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.4.0...12.4.1)
##### Fixed
- [#​6364](https://github.com/sebastianbergmann/phpunit/issues/6364): `--filter` format used by PhpStorm stopped working
- [#​6378](https://github.com/sebastianbergmann/phpunit/issues/6378): Wrong method name passed to `DataProviderMethodCalled` event value object
***
Learn how to install or update PHPUnit 12.4 in the [documentation](https://docs.phpunit.de/en/12.4/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v12.4.0`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.4.0): PHPUnit 12.4.0
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.3.15...12.4.0)
##### Added
- [#​6277](https://github.com/sebastianbergmann/phpunit/issues/6277): Allow tests to opt out of the validation that a data provider method does not provide data sets with more values than a test method accepts
- [#​6341](https://github.com/sebastianbergmann/phpunit/pull/6341): Support for regular expressions with `#[IgnoreDeprecations]` attribute
- [#​6354](https://github.com/sebastianbergmann/phpunit/issues/6354): Invokable constraints
##### Deprecated
- [#​6284](https://github.com/sebastianbergmann/phpunit/issues/6284): `#[RunClassInSeparateProcess]` attribute
- [#​6355](https://github.com/sebastianbergmann/phpunit/issues/6355): Support for version constraint string argument without explicit version comparison operator
***
Learn how to install or update PHPUnit 12.4 in the [documentation](https://docs.phpunit.de/en/12.4/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v12.3.15`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.3.15): PHPUnit 12.3.15
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.3.14...12.3.15)
##### Fixed
- [#​6368](https://github.com/sebastianbergmann/phpunit/issues/6368): `failOnPhpunitWarning="false"` has no effect
***
Learn how to install or update PHPUnit 12.3 in the [documentation](https://docs.phpunit.de/en/12.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v12.3.14`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.3.14): PHPUnit 12.3.14
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.3.13...12.3.14)
- No changes; `phpunit.phar` rebuilt with updated dependencies
***
Learn how to install or update PHPUnit 12.3 in the [documentation](https://docs.phpunit.de/en/12.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v12.3.13`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.3.13): PHPUnit 12.3.13
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.3.12...12.3.13)
- No changes; `phpunit.phar` rebuilt with updated dependencies
***
Learn how to install or update PHPUnit 12.3 in the [documentation](https://docs.phpunit.de/en/12.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v12.3.12`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.3.12): PHPUnit 12.3.12
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.3.11...12.3.12)
- No changes; `phpunit.phar` rebuilt with updated dependencies
***
Learn how to install or update PHPUnit 12.3 in the [documentation](https://docs.phpunit.de/en/12.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v12.3.11`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.3.11): PHPUnit 12.3.11
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.3.10...12.3.11)
##### Changed
- [#​6366](https://github.com/sebastianbergmann/phpunit/issues/6366): Exclude `__sleep()` and `__wakeup()` from test double code generation on PHP >= 8.5
***
Learn how to install or update PHPUnit 12.3 in the [documentation](https://docs.phpunit.de/en/12.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v12.3.10`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.3.10): PHPUnit 12.3.10
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.3.9...12.3.10)
##### Changed
- [#​6353](https://github.com/sebastianbergmann/phpunit/pull/6353): Disable performance optimization for tests requiring Xdebug
- [#​6357](https://github.com/sebastianbergmann/phpunit/pull/6357): Also collect `E_DEPRECATED` issues when building the test suite
***
Learn how to install or update PHPUnit 12.3 in the [documentation](https://docs.phpunit.de/en/12.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v12.3.9`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.3.9): PHPUnit 12.3.9
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.3.8...12.3.9)
##### Changed
- Do not use `__sleep()` method (which will be deprecated in PHP 8.5)
***
Learn how to install or update PHPUnit 12.3 in the [documentation](https://docs.phpunit.de/en/12.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v12.3.8`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.3.8): PHPUnit 12.3.8
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.3.7...12.3.8)
##### Fixed
- [#​6340](https://github.com/sebastianbergmann/phpunit/issues/6340): Implicitly enabled display of deprecation details is not disabled when it should be
***
Learn how to install or update PHPUnit 12.3 in the [documentation](https://docs.phpunit.de/en/12.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v12.3.7`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.3.7): PHPUnit 12.3.7
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.3.6...12.3.7)
##### Changed
- `#[IgnorePhpunitDeprecations]` is now considered for test runner deprecations (where applicable)
***
Learn how to install or update PHPUnit 12.3 in the [documentation](https://docs.phpunit.de/en/12.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v12.3.6`](https://github.com/sebastianbergmann/phpunit/compare/12.3.5...12.3.6)
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.3.5...12.3.6)
### [`v12.3.5`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.3.5): PHPUnit 12.3.5
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.3.4...12.3.5)
##### Changed
- [#​6319](https://github.com/sebastianbergmann/phpunit/issues/6319): Detect premature end of PHPUnit's main PHP process
- [#​6321](https://github.com/sebastianbergmann/phpunit/issues/6321): Allow `error_reporting=E_ALL` for `--check-php-configuration`
##### Fixed
- [#​5863](https://github.com/sebastianbergmann/phpunit/issues/5863): TestDox printer does not show previous exception
- [#​6102](https://github.com/sebastianbergmann/phpunit/issues/6102): `expectUserDeprecationMessage*()` fails when test is run in separate process
***
Learn how to install or update PHPUnit 12.3 in the [documentation](https://docs.phpunit.de/en/12.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v12.3.4`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.3.4): PHPUnit 12.3.4
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.3.3...12.3.4)
##### Changed
- [#​6308](https://github.com/sebastianbergmann/phpunit/pull/6308): Improve output of `--check-php-configuration`
- The version number for the test result cache file has been incremented to reflect that its structure for PHPUnit 12.3 is not compatible with its structure for PHPUnit 8.5 and PHPUnit 9.6
##### Fixed
- [#​6197](https://github.com/sebastianbergmann/phpunit/issues/6197): `ini_set('error_log')` sets filepath outside `open_basedir`
- [#​6279](https://github.com/sebastianbergmann/phpunit/issues/6279): Deprecation triggered in data provider method affects all test methods using that data provider method
- [#​6281](https://github.com/sebastianbergmann/phpunit/issues/6281): Exceptions raised in after-test method are not reported for skipped tests
***
Learn how to install or update PHPUnit 12.3 in the [documentation](https://docs.phpunit.de/en/12.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v12.3.3`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.3.3): PHPUnit 12.3.3
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.3.2...12.3.3)
##### Fixed
- [#​6304](https://github.com/sebastianbergmann/phpunit/issues/6304): PHPUnit 11.5.29 hangs when a test runner deprecation is triggered and process isolation is used (this reverts "`#[IgnorePhpunitDeprecations]` is now considered for test runner deprecations" from PHPUnit 12.3.1)
***
Learn how to install or update PHPUnit 12.3 in the [documentation](https://docs.phpunit.de/en/12.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v12.3.2`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.3.2): PHPUnit 12.3.2
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.3.1...12.3.2)
##### Changed
- [#​6300](https://github.com/sebastianbergmann/phpunit/issues/6300): Emit warning when the name of a data provider method begins with `test`
- Do not use `SplObjectStorage` methods that will be deprecated in PHP 8.5
***
Learn how to install or update PHPUnit 12.3 in the [documentation](https://docs.phpunit.de/en/12.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v12.3.1`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.3.1): PHPUnit 12.3.1
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.3.0...12.3.1)
##### Added
- [#​6297](https://github.com/sebastianbergmann/phpunit/issues/6297): `--check-php-configuration` CLI option for checking whether PHP is configured for testing
##### Changed
- `#[IgnorePhpunitDeprecations]` is now considered for test runner deprecations (where applicable)
##### Fixed
- [#​6160](https://github.com/sebastianbergmann/phpunit/issues/6160): Baseline file in a subdirectory contains absolute paths
- [#​6294](https://github.com/sebastianbergmann/phpunit/issues/6294): Silent failure of PHP fatal errors
- Errors due to invalid data provided using `#[TestWith]` or `#[TestWithJson]` attributes are now properly reported
- The `DataProviderMethodFinished` event is now also emitted when the provided data set has an invalid key
***
Learn how to install or update PHPUnit 12.3 in the [documentation](https://docs.phpunit.de/en/12.3/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v12.3.0`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.3.0): PHPUnit 12.3.0
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.2.9...12.3.0)
##### Added
- [#​3795](https://github.com/sebastianbergmann/phpunit/issues/3795): Bootstrap scripts specific to test suites
- [#​6268](https://github.com/sebastianbergmann/phpunit/pull/6268): `#[IgnorePHPUnitWarnings]` attribute for ignoring PHPUnit warnings
- `#[TestDoxFormatter]` and `#[TestDoxFormatterExternal]` attributes for configuring a custom TestDox formatter for tests that use data from data providers
- `TestRunner\ChildProcessErrored` event
- `Configuration::includeTestSuites()` and `Configuration::excludeTestSuites()`
##### Changed
- [#​6237](https://github.com/sebastianbergmann/phpunit/issues/6237): Do not run tests when code coverage analysis is requested but code coverage data cannot be collected
- [#​6272](https://github.com/sebastianbergmann/phpunit/issues/6272): Use `@<data-set-name>` format (compatible with `--filter` CLI option) in defect messages
- [#​6273](https://github.com/sebastianbergmann/phpunit/pull/6273): Warn when `#[DataProvider*]` attributes are mixed with `#[TestWith*]` attributes
##### Deprecated
- [#​6229](https://github.com/sebastianbergmann/phpunit/issues/6229): `Configuration::includeTestSuite()`, use `Configuration::includeTestSuites()` instead
- [#​6229](https://github.com/sebastianbergmann/phpunit/issues/6229): `Configuration::excludeTestSuite()`, use `Configuration::excludeTestSuites()` instead
- [#​6246](https://github.com/sebastianbergmann/phpunit/issues/6246): Using `#[CoversNothing]` on a test method
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.3/installation.html)
### [`v12.2.9`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.2.9): PHPUnit 12.2.9
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.2.8...12.2.9)
##### Fixed
- [#​6097](https://github.com/sebastianbergmann/phpunit/issues/6097): The `file` attribute of `<testClass>` node of XML test list can be wrong
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.2/installation.html)
### [`v12.2.8`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.2.8): PHPUnit 12.2.8
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.2.7...12.2.8)
##### Fixed
- [#​6274](https://github.com/sebastianbergmann/phpunit/issues/6274): Infinite recursion when code coverage report in OpenClover XML format is configured in XML configuration file
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.2/installation.html)
### [`v12.2.7`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.2.7): PHPUnit 12.2.7
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.2.6...12.2.7)
##### Fixed
- [#​6254](https://github.com/sebastianbergmann/phpunit/issues/6254): `defects,random`configuration is supported by implementation, but it is not allowed by the XML configuration file schema
- [#​6259](https://github.com/sebastianbergmann/phpunit/issues/6259): Order of tests which use data from data providers is not affected by test sorting
- [#​6266](https://github.com/sebastianbergmann/phpunit/issues/6266): Superfluous whitespace in TestDox output when test method name has a number after the `test` prefix
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.2/installation.html)
### [`v12.2.6`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.2.6): PHPUnit 12.2.6
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.2.5...12.2.6)
##### Fixed
- [#​6104](https://github.com/sebastianbergmann/phpunit/issues/6104): Test with dependencies and data provider fails
- [#​6163](https://github.com/sebastianbergmann/phpunit/issues/6163): `@no-named-arguments` leads to static analysis errors for variadic arguments
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.2/installation.html)
### [`v12.2.5`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.2.5): PHPUnit 12.2.5
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.2.4...12.2.5)
##### Fixed
- [#​6249](https://github.com/sebastianbergmann/phpunit/issues/6249): No meaningful error when `<testsuite>` element is missing required `name` attribute
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.2/installation.html)
### [`v12.2.4`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.2.4): PHPUnit 12.2.4
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.2.3...12.2.4)
##### Changed
- Including information about the Git repository (such as the commit hash and branch name) in the Open Test Reporting XML format is now an opt-in feature that can be enabled via the `--include-git-information` CLI option or the `includeGitInformation` attribute in the XML configuration file
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.2/installation.html)
### [`v12.2.3`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.2.3): PHPUnit 12.2.3
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.2.2...12.2.3)
##### Added
- [#​6236](https://github.com/sebastianbergmann/phpunit/issues/6236): `failOnPhpunitWarning` attribute on the `<phpunit>` element of the XML configuration file and `--fail-on-phpunit-warning` CLI option for controlling whether PHPUnit should fail on PHPUnit warnings (default: `true`)
- [#​6239](https://github.com/sebastianbergmann/phpunit/issues/6239): `--do-not-fail-on-deprecation`, `--do-not-fail-on-phpunit-warning`, `--do-not-fail-on-phpunit-deprecation`, `--do-not-fail-on-empty-test-suite`, `--do-not-fail-on-incomplete`, `--do-not-fail-on-notice`, `--do-not-fail-on-risky`, `--do-not-fail-on-skipped`, and `--do-not-fail-on-warning` CLI options
- `--do-not-report-useless-tests` CLI option as a replacement for `--dont-report-useless-tests`
##### Deprecated
- `--dont-report-useless-tests` CLI option (use `--do-not-report-useless-tests` instead)
##### Fixed
- [#​6243](https://github.com/sebastianbergmann/phpunit/issues/6243): Constraints cannot be implemented without using internal class `ExpectationFailedException`
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.2/installation.html)
### [`v12.2.2`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.2.2): PHPUnit 12.2.2
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.2.1...12.2.2)
##### Fixed
- [#​6222](https://github.com/sebastianbergmann/phpunit/issues/6222): Data Provider seems to mess up Test Dependencies
- `shortenArraysForExportThreshold` XML configuration setting has no effect on all arrays exported for event-related value objects
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.2/installation.html)
### [`v12.2.1`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.2.1): PHPUnit 12.2.1
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.2.0...12.2.1)
##### Fixed
- [#​6228](https://github.com/sebastianbergmann/phpunit/pull/6228): Variadic test methods should not warn about too many arguments from data provider
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.2/installation.html)
### [`v12.2.0`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.2.0): PHPUnit 12.2.0
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.1.6...12.2.0)
##### Added
##### Experimental Support for Open Test Reporting XML
PHPUnit has supported reporting test results in the JUnit XML format for a long time. Unfortunately, there has never been a standard schema for the JUnit XML format. Common consumers of Clover XML log files interpret these files differently, which has led to frequent problems.
To address this, the JUnit team started the [Open Test Reporting project](https://github.com/ota4j-team/open-test-reporting), creating and maintaining language-agnostic XML and HTML test reporting formats. Unlike JUnit XML, Open Test Reporting's XML formats are extensible.
Logging in the Open Test Reporting XML format is controlled by the new `--log-otr` CLI option and the new `<otr>` XML configuration element.
This feature is experimental and the generated XML may change in order to enhance compliance with the Open Test Reporting project's XML schema definitions. The same applies to the XML schema definitions for information that is specific for PHP and PHPUnit. Please note that such changes may occur in bugfix or minor releases and could potentially break backwards compatibility.
##### Experimental Support for OpenClover XML
PHPUnit has supported reporting code coverage information in the Clover XML format for a long time. Unfortunately, there has never been a standard schema for the Clover XML format. Common consumers of Clover XML log files interpret these files differently, which leads to frequent problems.
The original commercial Clover project has been superseded by the Open Source OpenClover project, which provides an XML schema for its OpenClover XML format. Rather than modifying the existing Clover XML reporter to comply with the OpenClover XML schema, thereby breaking backward compatibility, a new OpenClover XML reporter has been introduced.
This new reporter is controlled by the new CLI option, `--coverage-openclover`, and the new XML configuration element, `<openclover>`. This code coverage reporter generates XML documents that validate against the OpenClover project's XML schema definition, with one exception: the `<testproject>` element is not generated.
The existing Clover XML reporter, controlled by the `--coverage-clover` CLI option and the `<clover>` XML configuration element, remains unchanged.
This feature is experimental and the generated XML may change to enhance compliance with the OpenClover XML schema definition. Please note that such changes may occur in bugfix or minor releases and could potentially break backwards compatibility.
##### Miscellaneous
- `--with-telemetry` CLI option that can be used together with `--debug` to print debugging information that includes telemetry information
- The `TestCase::provideAdditionalInformation()` method can now be used to emit a `Test\AdditionalInformationProvided` event
- The new `Test\AfterLastTestMethodFailed`, `Test\AfterTestMethodFailed`, `Test\BeforeFirstTestMethodFailed`, `Test\BeforeTestMethodFailed`, `Test\PostConditionFailed`, `Test\PreConditionFailed` events are now emitted instead of `Test\AfterLastTestMethodErrored`, `Test\AfterTestMethodErrored`, `Test\BeforeFirstTestMethodErrored`, `Test\BeforeTestMethodErrored`, `Test\PostConditionErrored`, `Test\PreConditionErrored` when the `Throwable` extends `AssertionFailedError` to distinguish between errors and failures triggered in hook methods
- The new `Test\PreparationErrored` event is now emitted instead of `Test\PreparationFailed` when the `Throwable` does not extend `AssertionFailedError` to distinguish between errors and failures triggered during test preparation
- `Test\PreparationFailed::throwable()`
##### Changed
- [#​6165](https://github.com/sebastianbergmann/phpunit/pull/6165): Collect deprecations triggered by autoloading while loading/building the test suite
- Do not treat warnings differently than other issues in summary section of default output
- A warning is now emitted when both `#[CoversNothing]` and `#[Covers*]` (or `#[Uses*]`) are used on a test class
- A warning is now emitted when the same `#[Covers*]` (or `#[Uses*]`) attribute is used multiple times on a test class
- A warning is now emitted when the same code is targeted by both `#[Covers*]` and `#[Uses*]` attributes
- A warning is now emitted when a hook method such as `setUp()`, for example has a `#[Test]` attribute
- A warning is now emitted when more than one of `#[Small]`, `#[Medium]`, or `#[Large]` is used on a test class
- A warning is now emitted when a data provider provides data sets that have more values than the test method consumes using arguments
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.2/installation.html)
### [`v12.1.6`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.1.6): PHPUnit 12.1.6
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.1.5...12.1.6)
##### Changed
- [#​6210](https://github.com/sebastianbergmann/phpunit/pull/6210): Set default Clover coverage project name
- [#​6217](https://github.com/sebastianbergmann/phpunit/pull/6217): Improve the error message when `createStubForIntersectionOfInterfaces()` is called with a class
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.1/installation.html)
### [`v12.1.5`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.1.5): PHPUnit 12.1.5
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.1.4...12.1.5)
##### Fixed
- [#​6192](https://github.com/sebastianbergmann/phpunit/issues/6192): Reverted change made in PHPUnit 11.5.19 due to regression
- [#​6199](https://github.com/sebastianbergmann/phpunit/issues/6199): `assertEmpty()` and `assertNotEmpty()` use overly restrictive `phpstan-assert empty` directives
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.1/installation.html)
### [`v12.1.4`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.1.4): PHPUnit 12.1.4
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.1.3...12.1.4)
##### Added
- `displayDetailsOnAllIssues` attribute on the `<phpunit>` element of the XML configuration file and `--display-all-issues` CLI option for controlling whether PHPUnit should display details on all issues that are triggered (default: `false`)
- `failOnAllIssues` attribute on the `<phpunit>` element of the XML configuration file and `--fail-on-all-issues` CLI option for controlling whether PHPUnit should fail on all issues that are triggered (default: `false`)
##### Changed
- [#​5956](https://github.com/sebastianbergmann/phpunit/issues/5956): Improved handling of deprecated `E_STRICT` constant
##### Fixed
- [#​6192](https://github.com/sebastianbergmann/phpunit/issues/6192): Positive `%a` and `%A` matches are not ignored from diff when `EXPECTF` fails
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.1/installation.html)
### [`v12.1.3`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.1.3): PHPUnit 12.1.3
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.1.2...12.1.3)
##### Changed
- When gathering the telemetry information that each event has, the real size of memory allocated from the operating system is no longer used as this is grown by PHP's memory manager in chunks that are so large that small(er) increases in peak memory usage cannot be seen
- The peak memory usage returned by `memory_get_peak_usage()` is now reset immediately before the `Test\Prepared` event is emitted using `memory_reset_peak_usage()` so that (memory usage at `Test\Finished` - memory usage at `Test\Prepared`) is a better approximation of the memory usage of the test
- The string representation of `Telemetry\Info` now uses peak memory usage instead of memory usage (this affects `--log-events-verbose-text`)
##### Fixed
- [#​6173](https://github.com/sebastianbergmann/phpunit/issues/6173): Output from `error_log()` is not displayed when test fails
- A "Before Test Method Errored" event is no longer emitted when a test is skipped in a "before test" method
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.1/installation.html)
### [`v12.1.2`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.1.2): PHPUnit 12.1.2
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.1.1...12.1.2)
##### Fixed
- [#​6104](https://github.com/sebastianbergmann/phpunit/issues/6104): Reverted change introduced in PHPUnit 12.1.1
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.1/installation.html)
### [`v12.1.1`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.1.1): PHPUnit 12.1.1
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.1.0...12.1.1)
##### Fixed
- [#​6104](https://github.com/sebastianbergmann/phpunit/issues/6104): Test with dependencies and data provider fails
- [#​6174](https://github.com/sebastianbergmann/phpunit/issues/6174): `willReturnMap()` fails with nullable parameters when their default is `null` and no argument is passed for them
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.1/installation.html)
### [`v12.1.0`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.1.0): PHPUnit 12.1.0
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.0.10...12.1.0)
##### Added
- [#​6118](https://github.com/sebastianbergmann/phpunit/pull/6118): `expectErrorLog()` for expecting `error_log()` output
- [#​6126](https://github.com/sebastianbergmann/phpunit/pull/6126): Attribute `#[WithEnvironmentVariable]` for setting an environment variable for the duration of a test
- The `AfterTestMethodCalled`, `AfterTestMethodErrored`, `AfterTestMethodFinished`, `BeforeTestMethodCalled`, `BeforeTestMethodErrored`, `BeforeTestMethodFinished`, `PostConditionCalled`, `PostConditionErrored`, `PostConditionFinished`, `PreConditionCalled`, `PreConditionErrored`, and `PreConditionFinished` event value objects now have `test()` method that returns a value object representing the test method for which the hook method was called
##### Changed
- When code coverage processing is requested and no static analysis cache directory has been configured then a cache directory in the operating system's path used for temporary files is automatically created and used
- The static analysis of first-party source files required for the code coverage functionality is now performed before the first test is run, if code coverage processing is requested (via the XML configuration file and/or CLI options), all first-party source files are configured to be processed (which is the default), and a static analysis cache directory is available (either explicitly configured or automatically determined, see above). This has the same effect as running `phpunit --warm-coverage-cache` before running tests.
##### Deprecated
- [#​6140](https://github.com/sebastianbergmann/phpunit/issues/6140): The `testClassName()` method on the `AfterTestMethodCalled`, `AfterTestMethodErrored`, `AfterTestMethodFinished`, `BeforeTestMethodCalled`, `BeforeTestMethodErrored`, `BeforeTestMethodFinished`, `PostConditionCalled`, `PostConditionErrored`, `PostConditionFinished`, `PreConditionCalled`, `PreConditionErrored`, and `PreConditionFinished` event value objects (use `test()->className()` instead)
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.1/installation.html)
### [`v12.0.10`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.0.10): PHPUnit 12.0.10
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.0.9...12.0.10)
##### Changed
- [#​6150](https://github.com/sebastianbergmann/phpunit/issues/6150): Reverted change introduced in PHPUnit 12.0.8
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.0/installation.html)
### [`v12.0.9`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.0.9): PHPUnit 12.0.9
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.0.8...12.0.9)
##### Fixed
- [#​6154](https://github.com/sebastianbergmann/phpunit/issues/6154): Method `with()` on test doubles yields error with static analyzer
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.0/installation.html)
### [`v12.0.8`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.0.8): PHPUnit 12.0.8
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.0.7...12.0.8)
##### Changed
- [#​6150](https://github.com/sebastianbergmann/phpunit/issues/6150): Trigger warning when code coverage analysis is performed and no cache directory is configured
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.0/installation.html)
### [`v12.0.7`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.0.7): PHPUnit 12.0.7
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.0.6...12.0.7)
##### Fixed
- [#​5976](https://github.com/sebastianbergmann/phpunit/issues/5976): TestDox result printer does not display details about errors triggered in before-first-test and after-last-test methods
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.0/installation.html)
### [`v12.0.6`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.0.6): PHPUnit 12.0.6
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.0.5...12.0.6)
##### Fixed
- [#​6142](https://github.com/sebastianbergmann/phpunit/issues/6142): `$expected` and `$actual` are mixed up in failure description when `assertJsonFileEqualsJsonFile()` fails
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.0/installation.html)
### [`v12.0.5`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.0.5): PHPUnit 12.0.5
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.0.4...12.0.5)
##### Fixed
- [#​6138](https://github.com/sebastianbergmann/phpunit/issues/6138): Test with failed expectation on value passed to mocked method is incorrectly considered risky
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.0/installation.html)
### [`v12.0.4`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.0.4): PHPUnit 12.0.4
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.0.3...12.0.4)
##### Fixed
- [#​6134](https://github.com/sebastianbergmann/phpunit/issues/6134): Missing event when child process ends unexpectedly
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.0/installation.html)
### [`v12.0.3`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.0.3): PHPUnit 12.0.3
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.0.2...12.0.3)
##### Changed
- `TestCase::__construct()` is now declared `final` (it was annotated with `@final` before and the announced changed from `@final` to `final` for PHPUnit 12 was forgotten)
##### Fixed
- [#​5951](https://github.com/sebastianbergmann/phpunit/issues/5951#issuecomment-2656364815): Restore the `includeUncoveredFiles` configuration option
- [#​6133](https://github.com/sebastianbergmann/phpunit/issues/6133): Precision loss in aggregated test suite execution time(s) reported by JUnit XML logger
- A `Test\PreparationFailed` event is now emitted in addition to a `Test\Errored` event when an unexpected exception is triggered in a before-test method
- A `Test\Passed` event is no longer emitted in addition to a `Test\Failed` or `Test\Errored` event when an assertion failure or an unexpected exception is triggered in an after-test method
- A `TestSuite\Finished` event is now emitted when a before-first-test method errors
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.0/installation.html)
### [`v12.0.2`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.0.2): PHPUnit 12.0.2
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.0.1...12.0.2)
##### Changed
- Updated dependencies for PHAR distribution
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.0/installation.html)
### [`v12.0.1`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.0.1): PHPUnit 12.0.1
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/12.0.0...12.0.1)
##### Fixed
- Deprecation message for `Assert::isType()`, `assertContainsOnly()`, `assertNotContainsOnly()`, and `containsOnly()`
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.0/installation.html)
### [`v12.0.0`](https://github.com/sebastianbergmann/phpunit/releases/tag/12.0.0): PHPUnit 12.0.0
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.58...12.0.0)
##### Added
- [#​5984](https://github.com/sebastianbergmann/phpunit/issues/5984): `#[CoversClassesThatExtendClass]` and `#[UsesClassesThatExtendClass]`
- [#​5985](https://github.com/sebastianbergmann/phpunit/issues/5985): `#[CoversClassesThatImplementInterface]` and `#[UsesClassesThatImplementInterface]`
- [#​6073](https://github.com/sebastianbergmann/phpunit/issues/6073): `#[CoversNamespace]` and `#[UsesNamespace]`
- [#​6074](https://github.com/sebastianbergmann/phpunit/pull/6074): `#[RequiresEnvironmentVariable]`
##### Changed
- [#​5872](https://github.com/sebastianbergmann/phpunit/issues/5872): The default value for `shortenArraysForExportThreshold` is now `10` (limit export of arrays to 10 levels) instead of `0` (do not limit export of arrays)
##### Deprecated
- [#​6053](https://github.com/sebastianbergmann/phpunit/issues/6053): `Assert::isType()` (was soft-deprecated in PHPUnit 11.5)
- [#​6056](https://github.com/sebastianbergmann/phpunit/issues/6056): `assertContainsOnly()` (was soft-deprecated in PHPUnit 11.5)
- [#​6056](https://github.com/sebastianbergmann/phpunit/issues/6056): `assertNotContainsOnly()` (was soft-deprecated in PHPUnit 11.5)
- [#​6060](https://github.com/sebastianbergmann/phpunit/issues/6060): `containsOnly()` (was soft-deprecated in PHPUnit 11.5)
##### Removed
- [#​5215](https://github.com/sebastianbergmann/phpunit/issues/5215): `TestCase::iniSet()`
- [#​5217](https://github.com/sebastianbergmann/phpunit/issues/5217): `TestCase::setLocale()`
- [#​5246](https://github.com/sebastianbergmann/phpunit/issues/5246): `TestCase::createTestProxy()`
- [#​5247](https://github.com/sebastianbergmann/phpunit/issues/5247): `TestCase::getMockForAbstractClass()`
- [#​5248](https://github.com/sebastianbergmann/phpunit/issues/5248): `TestCase::getMockFromWsdl()`
- [#​5249](https://github.com/sebastianbergmann/phpunit/issues/5249): `TestCase::getMockForTrait()`
- [#​5250](https://github.com/sebastianbergmann/phpunit/issues/5250): `TestCase::getObjectForTrait()`
- [#​5310](https://github.com/sebastianbergmann/phpunit/issues/5310): `MockBuilder::enableAutoload()` and `MockBuilder::disableAutoload()`
- [#​5311](https://github.com/sebastianbergmann/phpunit/issues/5311): `MockBuilder::allowMockingUnknownTypes()` and `MockBuilder::disallowMockingUnknownTypes()`
- [#​5312](https://github.com/sebastianbergmann/phpunit/issues/5312): `MockBuilder::enableProxyingToOriginalMethods()`, `MockBuilder::disableProxyingToOriginalMethods()`, and `MockBuilder::setProxyTarget()`
- [#​5313](https://github.com/sebastianbergmann/phpunit/issues/5313): `MockBuilder::getMockForTrait()`
- [#​5314](https://github.com/sebastianbergmann/phpunit/issues/5314): `MockBuilder::getMockForAbstractClass()`
- [#​5316](https://github.com/sebastianbergmann/phpunit/issues/5316): `MockBuilder::enableArgumentCloning()` and `MockBuilder::disableArgumentCloning()`
- [#​5321](https://github.com/sebastianbergmann/phpunit/issues/5321): `MockBuilder::addMethods()`
- [#​5416](https://github.com/sebastianbergmann/phpunit/issues/5416): Support for doubling interfaces (or classes) that have a method named `method`
- [#​5424](https://github.com/sebastianbergmann/phpunit/issues/5424): `TestCase` methods for creating return stub configuration objects
- [#​5473](https://github.com/sebastianbergmann/phpunit/issues/5473): `assertStringNotMatchesFormat()` and `assertStringNotMatchesFormatFile()`
- [#​5536](https://github.com/sebastianbergmann/phpunit/issues/5536): Support for configuring expectations using `expects()` on test stubs
- [#​5541](https://github.com/sebastianbergmann/phpunit/issues/5541): Support for metadata in doc-comments
- [#​5710](https://github.com/sebastianbergmann/phpunit/issues/5710): Support for using comma-separated values with the `--group`, `--exclude-group`, `--covers`, `--uses`, and `--test-suffix` CLI options
- [#​5756](https://github.com/sebastianbergmann/phpunit/issues/5756): Support for the `restrictDeprecations` attribute on the `<source>` element of the XML configuration file
- [#​5801](https://github.com/sebastianbergmann/phpunit/issues/5801): Support for targeting traits with `#[CoversClass]` and `#[UsesClass]` attributes
- [#​5978](https://github.com/sebastianbergmann/phpunit/issues/5978): Support for PHP 8.2
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/12.0/installation.html)
### [`v11.5.58`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.58): PHPUnit 11.5.58
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.57...11.5.58)
##### Changed
- Issues whose message refers to an anonymous class could not be ignored using a baseline on PHP 8.6 (as of PHP 8.6, such messages contain the full name of the anonymous class: a NUL byte followed by the file, line, and a counter)
- Make PHAR build reproducible across filesystems (files are now added to the PHAR sorted by their path instead of in the order in which the filesystem lists them)
##### Removed
- The library PHAR (`phpunit-library-X.Y.Z.phar`) is no longer built, it could not be loaded since PHPUnit 9.5.8
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.57`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.57): PHPUnit 11.5.57
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.56...11.5.57)
##### Changed
- The Software Bill of Materials (SBOM) embedded in the PHAR now uses CycloneDX 1.7 and provides the NTIA minimum elements as well as the data fields that BSI TR-03183-2 (version 2.1.0) requires for logical and identified components, including component creators, original, distribution and effective licences, source code URIs, and the PHP runtime and its extensions as external components
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.56`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.56): PHPUnit 11.5.56
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.55...11.5.56)
##### Changed
- [#​6797](https://github.com/sebastianbergmann/phpunit/issues/6797): Adapt code generated for test double of interface with constructor for PHP 8.6
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.55`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.55): PHPUnit 11.5.55
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.54...11.5.55)
##### Fixed
- [#​6521](https://github.com/sebastianbergmann/phpunit/issues/6521): Performance regression in PHPUnit 11.5.54, PHPUnit 12.5.13, and PHPUnit 13.0.4
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.54`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.54): PHPUnit 11.5.54
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.53...11.5.54)
##### Fixed
- [#​6489](https://github.com/sebastianbergmann/phpunit/pull/6489): Classification of self/direct/indirect deprecation triggers is not aligned with Symfony's bridge for PHPUnit
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.53`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.53): PHPUnit 11.5.53
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.52...11.5.53)
##### Fixed
- [#​6503](https://github.com/sebastianbergmann/phpunit/issues/6503): Temporary file used by `SourceMapper` may be deleted prematurely when multiple PHPUnit processes run in parallel
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.52`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.52): PHPUnit 11.5.52
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.51...11.5.52)
##### Fixed
- [#​6495](https://github.com/sebastianbergmann/phpunit/pull/6495): Source map for issue trigger identification is regenerated in process isolation child processes
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.51`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.51): PHPUnit 11.5.51
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.50...11.5.51)
##### Added
- [#​6488](https://github.com/sebastianbergmann/phpunit/issues/6488): Allow disabling issue trigger identification for improved performance
##### Fixed
- [#​6486](https://github.com/sebastianbergmann/phpunit/issues/6486): Incorrect file name reported for errors for test methods declared in traits
- [#​6490](https://github.com/sebastianbergmann/phpunit/pull/6490): Incorrect test count when tests are skipped in before-class method
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.50`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.50): PHPUnit 11.5.50
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.49...11.5.50)
##### Changed
- To prevent Poisoned Pipeline Execution (PPE) attacks using prepared `.coverage` files 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
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.49`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.49): PHPUnit 11.5.49
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.48...11.5.49)
##### Fixed
- [#​6362](https://github.com/sebastianbergmann/phpunit/issues/6362): Manually instantiated test doubles are broken since PHPUnit 11.2
- [#​6470](https://github.com/sebastianbergmann/phpunit/issues/6470): Infinite recursion in `Count::getCountOf()` for unusal implementations of `Iterator` or `IteratorAggregate`
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.48`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.48): PHPUnit 11.5.48
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.47...11.5.48)
##### Changed
- Reverted a change that caused a [build failure](https://github.com/php/php-src/actions/runs/21052584327/job/60542023395#step:14:3729) for the [PHP project's nightly community job](https://phpunit.expert/articles/how-php-and-its-ecosystem-test-each-other.html?ref=github)
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.47`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.47): PHPUnit 11.5.47
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.46...11.5.47)
##### Fixed
- [#​6470](https://github.com/sebastianbergmann/phpunit/issues/6470): Mocking a class with a property hook setter accepting more types than the property results in a fatal error
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.46`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.46): PHPUnit 11.5.46
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.45...11.5.46)
- No changes; `phpunit.phar` rebuilt with PHP 8.4 to work around PHP-Scoper issue [#​1139](https://github.com/humbug/php-scoper/issues/1139)
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.45`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.45): PHPUnit 11.5.45
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.44...11.5.45)
##### Changed
- Updated list of deprecated PHP configuration settings for PHP 8.6
##### Fixed
- [#​6408](https://github.com/sebastianbergmann/phpunit/issues/6408): Exception in a data provider method leads to internal PHPUnit error
- [#​6426](https://github.com/sebastianbergmann/phpunit/pull/6426): Fix migration of configuration without schema location
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.44`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.44): PHPUnit 11.5.44
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.43...11.5.44)
##### Fixed
- [#​6402](https://github.com/sebastianbergmann/phpunit/pull/6402): Avoid reading from `STDOUT` when `rewind()` fails
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.43`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.43): PHPUnit 11.5.43
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.42...11.5.43)
##### Changed
- Skipped tests alone no longer lead to a yellow background for the test result summary
##### Fixed
- [#​6391](https://github.com/sebastianbergmann/phpunit/issues/6391): Errors during backup of global variables and static properties are not reported
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://phpunit.de/newsletter) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.42`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.42): PHPUnit 11.5.42
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.41...11.5.42)
##### Fixed
- [#​6368](https://github.com/sebastianbergmann/phpunit/issues/6368): `failOnPhpunitWarning="false"` has no effect
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.41`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.41): PHPUnit 11.5.41
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.40...11.5.41)
- No changes; `phpunit.phar` rebuilt with updated dependencies
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.40`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.40): PHPUnit 11.5.40
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.39...11.5.40)
- No changes; `phpunit.phar` rebuilt with updated dependencies
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.39`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.39): PHPUnit 11.5.39
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.38...11.5.39)
##### Changed
- [#​6366](https://github.com/sebastianbergmann/phpunit/issues/6366): Exclude `__sleep()` and `__wakeup()` from test double code generation on PHP >= 8.5
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.38`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.38): PHPUnit 11.5.38
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.37...11.5.38)
##### Changed
- [#​6353](https://github.com/sebastianbergmann/phpunit/pull/6353): Disable performance optimization for tests requiring Xdebug
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.37`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.37): PHPUnit 11.5.37
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.36...11.5.37)
##### Changed
- Do not use `__sleep()` method (which will be deprecated in PHP 8.5)
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.36`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.36): PHPUnit 11.5.36
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.35...11.5.36)
##### Fixed
- [#​6340](https://github.com/sebastianbergmann/phpunit/issues/6340): Implicitly enabled display of deprecation details is not disabled when it should be
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.35`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.35): PHPUnit 11.5.35
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.34...11.5.35)
##### Changed
- `#[IgnorePhpunitDeprecations]` is now considered for test runner deprecations (where applicable)
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.34`](https://github.com/sebastianbergmann/phpunit/compare/11.5.33...11.5.34)
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.33...11.5.34)
### [`v11.5.33`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.33): PHPUnit 11.5.33
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.32...11.5.33)
##### Changed
- [#​6321](https://github.com/sebastianbergmann/phpunit/issues/6321): Allow `error_reporting=E_ALL` for `--check-php-configuration`
##### Fixed
- [#​5863](https://github.com/sebastianbergmann/phpunit/issues/5863): TestDox printer does not show previous exception
- [#​6102](https://github.com/sebastianbergmann/phpunit/issues/6102): `expectUserDeprecationMessage*()` fails when test is run in separate process
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.32`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.32): PHPUnit 11.5.32
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.31...11.5.32)
##### Changed
- [#​6308](https://github.com/sebastianbergmann/phpunit/pull/6308): Improve output of `--check-php-configuration`
- The version number for the test result cache file has been incremented to reflect that its structure for PHPUnit 11.5 is not compatible with its structure for PHPUnit 8.5 and PHPUnit 9.6
##### Fixed
- [#​6281](https://github.com/sebastianbergmann/phpunit/issues/6281): Exceptions raised in after-test method are not reported for skipped tests
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.31`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.31): PHPUnit 11.5.31
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.30...11.5.31)
##### Fixed
- [#​6304](https://github.com/sebastianbergmann/phpunit/issues/6304): PHPUnit 11.5.29 hangs when a test runner deprecation is triggered and process isolation is used (this reverts "`#[IgnorePhpunitDeprecations]` is now considered for test runner deprecations" from PHPUnit 11.5.29)
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.30`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.30): PHPUnit 11.5.30
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.29...11.5.30)
##### Changed
- [#​6300](https://github.com/sebastianbergmann/phpunit/issues/6300): Emit warning when the name of a data provider method begins with `test`
- Do not use `SplObjectStorage` methods that will be deprecated in PHP 8.5
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.29`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.29): PHPUnit 11.5.29
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.28...11.5.29)
##### Added
- [#​6297](https://github.com/sebastianbergmann/phpunit/issues/6297): `--check-php-configuration` CLI option for checking whether PHP is configured for testing
##### Changed
- `#[IgnorePhpunitDeprecations]` is now considered for test runner deprecations (where applicable)
##### Fixed
- [#​6160](https://github.com/sebastianbergmann/phpunit/issues/6160): Baseline file in a subdirectory contains absolute paths
- Errors due to invalid data provided using `#[TestWith]` or `#[TestWithJson]` attributes are now properly reported
- The `DataProviderMethodFinished` event is now also emitted when the provided data set has an invalid key
***
Learn how to install or update PHPUnit 11.5 in the [documentation](https://docs.phpunit.de/en/11.5/installation.html).
##### Keep up to date with PHPUnit:
- You can follow [@​phpunit@phpc.social](https://phpc.social/@phpunit) to stay up to date with PHPUnit's development.
- You can subscribe to the [PHPUnit Updates](https://t8cbf4509.emailsys1a.net/275/973/33ad04f4be/subscribe/form.html?_g=1752156344) newsletter to receive updates about and tips for PHPUnit.
### [`v11.5.28`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.28): PHPUnit 11.5.28
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.27...11.5.28)
##### Fixed
- [#​6097](https://github.com/sebastianbergmann/phpunit/issues/6097): The `file` attribute of `<testClass>` node of XML test list can be wrong
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.27`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.27): PHPUnit 11.5.27
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.26...11.5.27)
##### Fixed
- [#​6254](https://github.com/sebastianbergmann/phpunit/issues/6254): `defects,random`configuration is supported by implementation, but it is not allowed by the XML configuration file schema
- [#​6259](https://github.com/sebastianbergmann/phpunit/issues/6259): Order of tests which use data from data providers is not affected by test sorting
- [#​6266](https://github.com/sebastianbergmann/phpunit/issues/6266): Superfluous whitespace in TestDox output when test method name has a number after the `test` prefix
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.26`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.26): PHPUnit 11.5.26
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.25...11.5.26)
##### Fixed
- [#​6104](https://github.com/sebastianbergmann/phpunit/issues/6104): Test with dependencies and data provider fails
- [#​6163](https://github.com/sebastianbergmann/phpunit/issues/6163): `@no-named-arguments` leads to static analysis errors for variadic arguments
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.25`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.25): PHPUnit 11.5.25
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.24...11.5.25)
##### Fixed
- [#​6249](https://github.com/sebastianbergmann/phpunit/issues/6249): No meaningful error when `<testsuite>` element is missing required `name` attribute
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.24`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.24): PHPUnit 11.5.24
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.23...11.5.24)
##### Added
- [#​6236](https://github.com/sebastianbergmann/phpunit/issues/6236): `failOnPhpunitWarning` attribute on the `<phpunit>` element of the XML configuration file and `--fail-on-phpunit-warning` CLI option for controlling whether PHPUnit should fail on PHPUnit warnings (default: `true`)
- [#​6239](https://github.com/sebastianbergmann/phpunit/issues/6239): `--do-not-fail-on-deprecation`, `--do-not-fail-on-phpunit-warning`, `--do-not-fail-on-phpunit-deprecation`, `--do-not-fail-on-empty-test-suite`, `--do-not-fail-on-incomplete`, `--do-not-fail-on-notice`, `--do-not-fail-on-risky`, `--do-not-fail-on-skipped`, and `--do-not-fail-on-warning` CLI options
- `--do-not-report-useless-tests` CLI option as a replacement for `--dont-report-useless-tests`
##### Deprecated
- `--dont-report-useless-tests` CLI option (use `--do-not-report-useless-tests` instead)
##### Fixed
- [#​6243](https://github.com/sebastianbergmann/phpunit/issues/6243): Constraints cannot be implemented without using internal class `ExpectationFailedException`
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.23`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.23): PHPUnit 11.5.23
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.22...11.5.23)
##### Fixed
- [#​6222](https://github.com/sebastianbergmann/phpunit/issues/6222): Data Provider seems to mess up Test Dependencies
- `shortenArraysForExportThreshold` XML configuration setting has no effect on all arrays exported for event-related value objects
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.22`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.22): PHPUnit 11.5.22
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.21...11.5.22)
##### Changed
- Do not treat warnings differently than other issues in summary section of default output
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.21`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.21): PHPUnit 11.5.21
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.20...11.5.21)
##### Changed
- [#​6210](https://github.com/sebastianbergmann/phpunit/pull/6210): Set default Clover coverage project name
- [#​6217](https://github.com/sebastianbergmann/phpunit/pull/6217): Improve the error message when `createStubForIntersectionOfInterfaces()` is called with a class
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.20`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.20): PHPUnit 11.5.20
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.19...11.5.20)
##### Fixed
- [#​6199](https://github.com/sebastianbergmann/phpunit/issues/6199): `assertEmpty()` and `assertNotEmpty()` use overly restrictive `phpstan-assert empty` directives
- [#​6192](https://github.com/sebastianbergmann/phpunit/issues/6192): Reverted change made in PHPUnit 11.5.19 due to regression
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.19`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.19): PHPUnit 11.5.19
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.18...11.5.19)
##### Added
- `displayDetailsOnAllIssues` attribute on the `<phpunit>` element of the XML configuration file and `--display-all-issues` CLI option for controlling whether PHPUnit should display details on all issues that are triggered (default: `false`)
- `failOnAllIssues` attribute on the `<phpunit>` element of the XML configuration file and `--fail-on-all-issues` CLI option for controlling whether PHPUnit should fail on all issues that are triggered (default: `false`)
##### Changed
- [#​5956](https://github.com/sebastianbergmann/phpunit/issues/5956): Improved handling of deprecated `E_STRICT` constant
##### Fixed
- [#​6192](https://github.com/sebastianbergmann/phpunit/issues/6192): Positive `%a` and `%A` matches are not ignored from diff when `EXPECTF` fails
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.18`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.18): PHPUnit 11.5.18
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.17...11.5.18)
##### Changed
- When gathering the telemetry information that each event has, the real size of memory allocated from the operating system is no longer used as this is grown by PHP's memory manager in chunks that are so large that small(er) increases in peak memory usage cannot be seen
- The peak memory usage returned by `memory_get_peak_usage()` is now reset immediately before the `Test\Prepared` event is emitted using `memory_reset_peak_usage()` so that (memory usage at `Test\Finished` - memory usage at `Test\Prepared`) is a better approximation of the memory usage of the test
- The string representation of `Telemetry\Info` now uses peak memory usage instead of memory usage (this affects `--log-events-verbose-text`)
##### Fixed
- A "Before Test Method Errored" event is no longer emitted when a test is skipped in a "before test" method
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.17`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.17): PHPUnit 11.5.17
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.16...11.5.17)
##### Fixed
- [#​6104](https://github.com/sebastianbergmann/phpunit/issues/6104): Reverted change introduced in PHPUnit 11.5.16
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.16`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.16): PHPUnit 11.5.16
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.15...11.5.16)
##### Fixed
- [#​6104](https://github.com/sebastianbergmann/phpunit/issues/6104): Test with dependencies and data provider fails
- [#​6174](https://github.com/sebastianbergmann/phpunit/issues/6174): `willReturnMap()` fails with nullable parameters when their default is `null` and no argument is passed for them
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.15`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.15): PHPUnit 11.5.15
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.14...11.5.15)
##### Changed
- [#​6150](https://github.com/sebastianbergmann/phpunit/issues/6150): Reverted change introduced in PHPUnit 11.5.13
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.14`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.14): PHPUnit 11.5.14
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.13...11.5.14)
##### Changed
- Updated dependencies for PHAR distribution
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.13`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.13): PHPUnit 11.5.13
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.12...11.5.13)
##### Changed
- [#​6150](https://github.com/sebastianbergmann/phpunit/issues/6150): Trigger warning when code coverage analysis is performed and no cache directory is configured
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.12`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.12): PHPUnit 11.5.12
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.11...11.5.12)
##### Fixed
- [#​5976](https://github.com/sebastianbergmann/phpunit/issues/5976): TestDox result printer does not display details about errors triggered in before-first-test and after-last-test methods
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.11`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.11): PHPUnit 11.5.11
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.10...11.5.11)
##### Fixed
- [#​6142](https://github.com/sebastianbergmann/phpunit/issues/6142): `$expected` and `$actual` are mixed up in failure description when `assertJsonFileEqualsJsonFile()` fails
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.10`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.10): PHPUnit 11.5.10
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.9...11.5.10)
##### Fixed
- [#​6138](https://github.com/sebastianbergmann/phpunit/issues/6138): Test with failed expectation on value passed to mocked method is incorrectly considered risky
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.9`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.9): PHPUnit 11.5.9
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.8...11.5.9)
##### Fixed
- [#​6134](https://github.com/sebastianbergmann/phpunit/issues/6134): Missing event when child process ends unexpectedly
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.8`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.8): PHPUnit 11.5.8
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.7...11.5.8)
##### Fixed
- A `Test\PreparationFailed` event is now emitted in addition to a `Test\Errored` event when an unexpected exception is triggered in a before-test method
- A `Test\Passed` event is no longer emitted in addition to a `Test\Failed` or `Test\Errored` event when an assertion failure or an unexpected exception is triggered in an after-test method
- A `TestSuite\Finished` event is now emitted when a before-first-test method errors
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.7`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.7): PHPUnit 11.5.7
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.6...11.5.7)
##### Changed
- [#​5951](https://github.com/sebastianbergmann/phpunit/issues/5951): The `includeUncoveredFiles` configuration option is no longer deprecated
- [#​6117](https://github.com/sebastianbergmann/phpunit/issues/6117): Include source location information for issues triggered during test in `--debug` output
- [#​6119](https://github.com/sebastianbergmann/phpunit/issues/6119): Improve message for errors that occur while parsing attributes
- [#​6120](https://github.com/sebastianbergmann/phpunit/issues/6120): Allow negative priorities for hook methods
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.6`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.6): PHPUnit 11.5.6
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.5...11.5.6)
##### Changed
- [#​6112](https://github.com/sebastianbergmann/phpunit/pull/6112): Improve performance of `SourceMapper`
##### Fixed
- [#​6115](https://github.com/sebastianbergmann/phpunit/issues/6115): Backed enumerations with values not of type `string` cannot be used in customized TestDox output
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.5`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.5): PHPUnit 11.5.5
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.4...11.5.5)
##### Changed
- Do not skip execution of test that depends on a test that is larger than itself
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.4`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.4): PHPUnit 11.5.4
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.3...11.5.4)
##### Changed
- [#​5958](https://github.com/sebastianbergmann/phpunit/issues/5958): Support for `#[CoversTrait]` and `#[UsesTrait]` attributes is no longer deprecated
- [#​5960](https://github.com/sebastianbergmann/phpunit/issues/5960): Support for targeting trait methods with the `#[CoversMethod]` and `#[UsesMethod]` attributes is no longer deprecated
##### Fixed
- [#​6103](https://github.com/sebastianbergmann/phpunit/issues/6103): Output from test run in separate process is printed twice
- [#​6109](https://github.com/sebastianbergmann/phpunit/issues/6109): Skipping a test in a before-class method crashes JUnit XML logger
- [#​6111](https://github.com/sebastianbergmann/phpunit/issues/6111): Deprecations cause `SourceMapper` to scan all `<source/>` files
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.3`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.3): PHPUnit 11.5.3
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.2...11.5.3)
##### Added
- `Test\AfterLastTestMethodErrored`, `Test\AfterTestMethodErrored`, `Test\BeforeTestMethodErrored`, `Test\PostConditionErrored`, and `Test\PreConditionErrored` events
##### Fixed
- [#​6093](https://github.com/sebastianbergmann/phpunit/issues/6093): Test Double Code Generator does not work when PHPUnit is used from PHAR on PHP 8.4
- [#​6094](https://github.com/sebastianbergmann/phpunit/issues/6094): Errors in after-last-test methods are not reported
- [#​6095](https://github.com/sebastianbergmann/phpunit/issues/6095): Expectation is not counted correctly when a doubled method is called more often than is expected
- [#​6096](https://github.com/sebastianbergmann/phpunit/issues/6096): `--list-tests-xml` is broken when a group with a numeric name is defined
- [#​6098](https://github.com/sebastianbergmann/phpunit/issues/6098): No `system-out` element in JUnit XML logfile
- [#​6100](https://github.com/sebastianbergmann/phpunit/issues/6100): Suppressed deprecations incorrectly stop test execution when execution should be stopped on deprecation
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.2`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.2): PHPUnit 11.5.2
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.1...11.5.2)
##### Fixed
- [#​6082](https://github.com/sebastianbergmann/phpunit/issues/6082): `assertArrayHasKey()`, `assertArrayNotHasKey()`, `arrayHasKey()`, and `ArrayHasKey::__construct()` do not support all possible key types
- [#​6087](https://github.com/sebastianbergmann/phpunit/issues/6087): `--migrate-configuration` does not remove `beStrictAboutTodoAnnotatedTests` attribute from XML configuration file
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.1`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.1): PHPUnit 11.5.1
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.5.0...11.5.1)
##### Added
- [#​6081](https://github.com/sebastianbergmann/phpunit/pull/6081): `DefaultResultCache::mergeWith()` for merging result cache instances
##### Fixed
- [#​6066](https://github.com/sebastianbergmann/phpunit/pull/6066): TeamCity logger does not handle error/skipped events in before-class methods correctly
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.5.0`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.0): PHPUnit 11.5.0
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.4.4...11.5.0)
##### Added
- [#​5948](https://github.com/sebastianbergmann/phpunit/pull/5948): Support for Property Hooks in Test Doubles
- [#​5954](https://github.com/sebastianbergmann/phpunit/issues/5954): Provide a way to stop execution at a particular deprecation
- Method `assertContainsNotOnlyInstancesOf()` in the `PHPUnit\Framework\Assert` class as the inverse of the `assertContainsOnlyInstancesOf()` method
- Methods `assertContainsOnlyArray()`, `assertContainsOnlyBool()`, `assertContainsOnlyCallable()`, `assertContainsOnlyFloat()`, `assertContainsOnlyInt()`, `assertContainsOnlyIterable()`, `assertContainsOnlyNull()`, `assertContainsOnlyNumeric()`, `assertContainsOnlyObject()`, `assertContainsOnlyResource()`, `assertContainsOnlyClosedResource()`, `assertContainsOnlyScalar()`, and `assertContainsOnlyString()` in the `PHPUnit\Framework\Assert` class as specialized alternatives for the generic `assertContainsOnly()` method
- Methods `assertContainsNotOnlyArray()`, `assertContainsNotOnlyBool()`, `assertContainsNotOnlyCallable()`, `assertContainsNotOnlyFloat()`, `assertContainsNotOnlyInt()`, `assertContainsNotOnlyIterable()`, `assertContainsNotOnlyNull()`, `assertContainsNotOnlyNumeric()`, `assertContainsNotOnlyObject()`, `assertContainsNotOnlyResource()`, `assertContainsNotOnlyClosedResource()`, `assertContainsNotOnlyScalar()`, and `assertContainsNotOnlyString()` in the `PHPUnit\Framework\Assert` class as specialized alternatives for the generic `assertNotContainsOnly()` method
- Methods `containsOnlyArray()`, `containsOnlyBool()`, `containsOnlyCallable()`, `containsOnlyFloat()`, `containsOnlyInt()`, `containsOnlyIterable()`, `containsOnlyNull()`, `containsOnlyNumeric()`, `containsOnlyObject()`, `containsOnlyResource()`, `containsOnlyClosedResource()`, `containsOnlyScalar()`, and `containsOnlyString()` in the `PHPUnit\Framework\Assert` class as specialized alternatives for the generic `containsOnly()` method
- Methods `isArray()`, `isBool()`, `isCallable()`, `isFloat()`, `isInt()`, `isIterable()`, `isNumeric()`, `isObject()`, `isResource()`, `isClosedResource()`, `isScalar()`, `isString()` in the `PHPUnit\Framework\Assert` class as specialized alternatives for the generic `isType()` method
- `TestRunner\ChildProcessStarted` and `TestRunner\ChildProcessFinished` events
##### Changed
- [#​5998](https://github.com/sebastianbergmann/phpunit/pull/5998): Do not run `SKIPIF` section of PHPT test in separate process when it is free of side effects
- [#​5999](https://github.com/sebastianbergmann/phpunit/pull/5999): Do not run `CLEAN` section of PHPT test in separate process when it is free of side effects that modify the parent process
##### Deprecated
- [#​6052](https://github.com/sebastianbergmann/phpunit/issues/6052): `isType()` (use `isArray()`, `isBool()`, `isCallable()`, `isFloat()`, `isInt()`, `isIterable()`, `isNull()`, `isNumeric()`, `isObject()`, `isResource()`, `isClosedResource()`, `isScalar()`, or `isString()` instead)
- [#​6055](https://github.com/sebastianbergmann/phpunit/issues/6055): `assertContainsOnly()` (use `assertContainsOnlyArray()`, `assertContainsOnlyBool()`, `assertContainsOnlyCallable()`, `assertContainsOnlyFloat()`, `assertContainsOnlyInt()`, `assertContainsOnlyIterable()`, `assertContainsOnlyNumeric()`, `assertContainsOnlyObject()`, `assertContainsOnlyResource()`, `assertContainsOnlyClosedResource()`, `assertContainsOnlyScalar()`, or `assertContainsOnlyString()` instead)
- [#​6055](https://github.com/sebastianbergmann/phpunit/issues/6055): `assertNotContainsOnly()` (use `assertContainsNotOnlyArray()`, `assertContainsNotOnlyBool()`, `assertContainsNotOnlyCallable()`, `assertContainsNotOnlyFloat()`, `assertContainsNotOnlyInt()`, `assertContainsNotOnlyIterable()`, `assertContainsNotOnlyNumeric()`, `assertContainsNotOnlyObject()`, `assertContainsNotOnlyResource()`, `assertContainsNotOnlyClosedResource()`, `assertContainsNotOnlyScalar()`, or `assertContainsNotOnlyString()` instead)
- [#​6059](https://github.com/sebastianbergmann/phpunit/issues/6059): `containsOnly()` (use `containsOnlyArray()`, `containsOnlyBool()`, `containsOnlyCallable()`, `containsOnlyFloat()`, `containsOnlyInt()`, `containsOnlyIterable()`, `containsOnlyNumeric()`, `containsOnlyObject()`, `containsOnlyResource()`, `containsOnlyClosedResource()`, `containsOnlyScalar()`, or `containsOnlyString()` instead)
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.5/installation.html)
### [`v11.4.4`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.4.4): PHPUnit 11.4.4
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.4.3...11.4.4)
##### Fixed
- [#​6028](https://github.com/sebastianbergmann/phpunit/issues/6028): `ignoreIndirectDeprecations=true` suppresses deprecations triggered in test code
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.4/installation.html)
### [`v11.4.3`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.4.3): PHPUnit 11.4.3
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.4.2...11.4.3)
##### Changed
- [#​6010](https://github.com/sebastianbergmann/phpunit/pull/6010): Improve parameter name for `assertGreaterThan()`, `assertGreaterThanOrEqual()`, `assertLessThan()`, and `assertLessThanOrEqual()`
- [#​6012](https://github.com/sebastianbergmann/phpunit/pull/6012): Remove empty lines between TeamCity events
##### Fixed
- [#​6017](https://github.com/sebastianbergmann/phpunit/pull/6017): Deprecation Triggers are not registered when Process Isolation is used
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.4/installation.html)
### [`v11.4.2`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.4.2): PHPUnit 11.4.2
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.4.1...11.4.2)
##### Changed
- [#​5989](https://github.com/sebastianbergmann/phpunit/pull/5989): Disable Xdebug in subprocesses when it is not used
##### Fixed
- [#​5844](https://github.com/sebastianbergmann/phpunit/issues/5844): Error handlers that are not callable outside the scope they were registered in are not handled correctly
- [#​5982](https://github.com/sebastianbergmann/phpunit/pull/5982): Typo in exception message
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.4/installation.html)
### [`v11.4.1`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.4.1): PHPUnit 11.4.1
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.4.0...11.4.1)
##### Changed
- Updated regular expressions used by `StringMatchesFormatDescription` constraint to be consistent with PHP's `run-tests.php`
##### Fixed
- [#​5977](https://github.com/sebastianbergmann/phpunit/pull/5977): TestDox result collector does not correctly handle baseline-ignored `E_DEPRECATED` issues
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.4/installation.html)
### [`v11.4.0`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.4.0): PHPUnit 11.4.0
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.3.6...11.4.0)
##### Changed
- [#​5915](https://github.com/sebastianbergmann/phpunit/pull/5915): Bootstrap extensions before building test suite
- [#​5917](https://github.com/sebastianbergmann/phpunit/pull/5917): Seal event facade before loading the test suite
- [#​5923](https://github.com/sebastianbergmann/phpunit/pull/5923): Filter configured deprecation triggers when displaying deprecation details
- [#​5927](https://github.com/sebastianbergmann/phpunit/pull/5927): `#[RequiresPhpunitExtension]` attribute
- [#​5928](https://github.com/sebastianbergmann/phpunit/issues/5928): Filter tests based on the PHP extensions they require
- [#​5964](https://github.com/sebastianbergmann/phpunit/pull/5964): Better error message when data provider is invalid
- The XML configuration file generator now references `vendor/phpunit/phpunit/phpunit.xsd` (instead of `https://schema.phpunit.de/X.Y/phpunit.xsd`) when PHPUnit was installed using Composer and `phpunit --generate-configuration` was invoked in the directory where `vendor` is located
- The `--migrate-configuration` command no longer replaces `vendor/phpunit/phpunit/phpunit.xsd` with `https://schema.phpunit.de/X.Y/phpunit.xsd`
- The output of `--list-groups` now shows how many tests a group contains
- The output of `--list-suites` now shows how many tests a test suite contains
##### Deprecated
- [#​5951](https://github.com/sebastianbergmann/phpunit/issues/5951): `includeUncoveredFiles` configuration option
- [#​5958](https://github.com/sebastianbergmann/phpunit/issues/5958): Support for `#[CoversTrait]` and `#[UsesTrait]` attributes
- [#​5960](https://github.com/sebastianbergmann/phpunit/issues/5960): Support for targeting trait methods with the `#[CoversMethod]` and `#[UsesMethod]` attributes (and respective annotations)
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.4/installation.html)
### [`v11.3.6`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.3.6): PHPUnit 11.3.6
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.3.5...11.3.6)
##### Changed
- [#​5956](https://github.com/sebastianbergmann/phpunit/issues/5956): Deprecation of the `E_STRICT` constant in PHP 8.4
##### Fixed
- [#​5950](https://github.com/sebastianbergmann/phpunit/pull/5950): TestDox text should not be `trim()`med when it contains `$` character
- The attribute parser will no longer try to instantiate attribute classes that do not exist
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.3/installation.html)
### [`v11.3.5`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.3.5): PHPUnit 11.3.5
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.3.4...11.3.5)
##### Fixed
- [#​5874](https://github.com/sebastianbergmann/phpunit/issues/5874): Test Stub generated by return value generator for doubled method with `static` return type declaration is not properly initialized
- [#​5931](https://github.com/sebastianbergmann/phpunit/pull/5931): Reverted addition of `name` property on `<testsuites>` element in JUnit XML logfile
- [#​5946](https://github.com/sebastianbergmann/phpunit/issues/5946): `Callback` throws a `TypeError` when checking a `callable` has variadic parameters
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.3/installation.html)
### [`v11.3.4`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.3.4): PHPUnit 11.3.4
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.3.3...11.3.4)
##### Fixed
- [#​4584](https://github.com/sebastianbergmann/phpunit/issues/4584): `assertJsonStringEqualsJsonString()` considers objects with sequential numeric keys equal to be arrays
- [#​4625](https://github.com/sebastianbergmann/phpunit/issues/4625): Generator yielding keys that are neither integer or string leads to hard-to-understand error message when used as data provider
- [#​4674](https://github.com/sebastianbergmann/phpunit/issues/4674): JSON assertions should treat objects as unordered
- [#​5891](https://github.com/sebastianbergmann/phpunit/issues/5891): `Callback` constraint does not handle variadic arguments correctly when used for mock object expectations
- [#​5929](https://github.com/sebastianbergmann/phpunit/issues/5929): TestDox output containing `$` at the beginning gets truncated when used with a data provider
- [#​5943](https://github.com/sebastianbergmann/phpunit/issues/5943): Tests configured to be in group(s) using the XML configuration file are also added to the `default` group
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.3/installation.html)
### [`v11.3.3`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.3.3): PHPUnit 11.3.3
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.3.2...11.3.3)
##### Added
- [#​5937](https://github.com/sebastianbergmann/phpunit/issues/5937): `failOnPhpunitDeprecation` 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)
##### Changed
- [#​5937](https://github.com/sebastianbergmann/phpunit/issues/5937): PHPUnit deprecations will, by default, no longer affect the test runner's shell exit code. This can optionally be turned back on using the `--fail-on-phpunit-deprecation` CLI option or the `failOnPhpunitDeprecation="true"` attribute on the `<phpunit>` element of the XML configuration file.
- Details for PHPUnit deprecations will, by default, no longer be displayed. This can optionally be turned back on using the `--display-phpunit-deprecations` CLI option or the `displayDetailsOnPhpunitDeprecations` attribute on the `<phpunit>` element of the XML configuration file.
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.3/installation.html)
### [`v11.3.2`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.3.2): PHPUnit 11.3.2
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.3.1...11.3.2)
##### Changed
- [#​5931](https://github.com/sebastianbergmann/phpunit/pull/5931): `name` property on `<testsuites>` element in JUnit XML logfile
- Removed `.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
##### Fixed
- [#​5884](https://github.com/sebastianbergmann/phpunit/issues/5884): TestDox printer does not consider that issues can be suppressed by attribute, baseline, source location, or `@` operator
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.3/installation.html)
### [`v11.3.1`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.3.1): PHPUnit 11.3.1
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.3.0...11.3.1)
##### Changed
- Improved how objects are handled for some assertion failure messages
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.3/installation.html)
### [`v11.3.0`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.3.0): PHPUnit 11.3.0
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.2.9...11.3.0)
##### Added
- [#​5869](https://github.com/sebastianbergmann/phpunit/pull/5869): `shortenArraysForExportThreshold` attribute on the `<phpunit>` element of the XML configuration file to limit the export of arrays to a specified number of elements (default: `0` / do not limit the export of arrays)
- [#​5885](https://github.com/sebastianbergmann/phpunit/pull/5885): Optionally repeat TestDox output for non-successful tests after the regular TestDox output
- [#​5890](https://github.com/sebastianbergmann/phpunit/pull/5890): Priority for hook methods
- [#​5906](https://github.com/sebastianbergmann/phpunit/issues/5906): `--extension` CLI option to register a test runner extension
##### Changed
- [#​5856](https://github.com/sebastianbergmann/phpunit/issues/5856): When the test runner is configured to fail on deprecations, notices, warnings, incomplete tests, or skipped tests then details for tests that triggered deprecations, notices, or warnings as well as tests that were marked as incomplete or skipped are always shown, respectively
- [#​5869](https://github.com/sebastianbergmann/phpunit/pull/5869): The configuration file generated using `--generate-configuration` now limits the export of arrays to 10 elements in order to improve performance
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.3/installation.html)
### [`v11.2.9`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.2.9): PHPUnit 11.2.9
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.2.8...11.2.9)
##### Fixed
- [#​5887](https://github.com/sebastianbergmann/phpunit/pull/5887): Issue baseline generator does not correctly handle ignoring suppressed issues
- [#​5908](https://github.com/sebastianbergmann/phpunit/issues/5908): `--list-tests` and `--list-tests-xml` CLI options do not report error when data provider method throws exception
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.2/installation.html)
### [`v11.2.8`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.2.8): PHPUnit 11.2.8
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.2.7...11.2.8)
##### Fixed
- [#​5898](https://github.com/sebastianbergmann/phpunit/issues/5898): `Test\Passed` event is not emitted for PHPT tests
- `--coverage-filter` CLI option could not be used multiple times
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.2/installation.html)
### [`v11.2.7`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.2.7): PHPUnit 11.2.7
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.2.6...11.2.7)
##### Changed
- Updated dependencies (so that users that install using Composer's `--prefer-lowest` CLI option also get recent versions)
##### Fixed
- [#​5892](https://github.com/sebastianbergmann/phpunit/issues/5892): Errors during write of `phpunit.xml` are not handled correctly when `--generate-configuration` is used
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.2/installation.html)
### [`v11.2.6`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.2.6): PHPUnit 11.2.6
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.2.5...11.2.6)
##### Changed
- [#​5880](https://github.com/sebastianbergmann/phpunit/pull/5880): Add hints to CLI parameter deprecation messages
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.2/installation.html)
### [`v11.2.5`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.2.5): PHPUnit 11.2.5
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.2.4...11.2.5)
##### Changed
- [#​5877](https://github.com/sebastianbergmann/phpunit/pull/5877): Use `array_pop()` instead of `array_shift()` for processing `Test` objects in `TestSuite::run()` and optimize `TestSuite::isEmpty()`
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.2/installation.html)
### [`v11.2.4`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.2.4): PHPUnit 11.2.4
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.2.3...11.2.4)
##### Changed
- [#​5875](https://github.com/sebastianbergmann/phpunit/pull/5875): Also destruct `TestCase` objects early that use a data provider
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.2/installation.html)
### [`v11.2.3`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.2.3): PHPUnit 11.2.3
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.2.2...11.2.3)
##### Changed
- [#​5870](https://github.com/sebastianbergmann/phpunit/pull/5870): Do not collect unnecessary information using `debug_backtrace()`
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.2/installation.html)
### [`v11.2.2`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.2.2): PHPUnit 11.2.2
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.2.1...11.2.2)
##### Changed
- [#​5861](https://github.com/sebastianbergmann/phpunit/pull/5861): Destroy `TestCase` object after its test was run
##### Fixed
- [#​5822](https://github.com/sebastianbergmann/phpunit/pull/5822): PHP deprecations triggered within a closure are not handled correctly
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.2/installation.html)
### [`v11.2.1`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.2.1): PHPUnit 11.2.1
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.2.0...11.2.1)
##### Fixed
- [#​5857](https://github.com/sebastianbergmann/phpunit/issues/5857): Mocked methods cannot be called from the original constructor of a partially mocked class
- [#​5859](https://github.com/sebastianbergmann/phpunit/issues/5859): XML Configuration File Migrator does not remove `cacheDirectory` attribute from `<coverage>` element when migrating from PHPUnit 11.1 to PHPUnit 11.2
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.2/installation.html)
### [`v11.2.0`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.2.0): PHPUnit 11.2.0
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.1.3...11.2.0)
##### Added
- [#​5799](https://github.com/sebastianbergmann/phpunit/issues/5799): `#[CoversTrait]` and `#[UsesTrait]` attributes
- [#​5804](https://github.com/sebastianbergmann/phpunit/pull/5804): Support doubling `readonly` classes
- [#​5811](https://github.com/sebastianbergmann/phpunit/issues/5811): `assertObjectNotEquals()`
##### Deprecated
- [#​5800](https://github.com/sebastianbergmann/phpunit/issues/5800): Support for targeting traits with `#[CoversClass]` and `#[UsesClass]` attributes
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.2/installation.html)
### [`v11.1.3`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.1.3): PHPUnit 11.1.3
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.1.2...11.1.3)
##### Fixed
- [#​5771](https://github.com/sebastianbergmann/phpunit/issues/5771): JUnit XML logger may crash when test that is run in separate process exits unexpectedly
- [#​5819](https://github.com/sebastianbergmann/phpunit/issues/5819): Duplicate keys from different data providers are not handled properly
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.1/installation.html)
### [`v11.1.2`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.1.2): PHPUnit 11.1.2
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.1.1...11.1.2)
##### Fixed
- [#​5795](https://github.com/sebastianbergmann/phpunit/issues/5795): Using `@testWith` annotation may generate `PHP Warning: Uninitialized string offset 0`
- [#​5807](https://github.com/sebastianbergmann/phpunit/issues/5807): The `#[CoversMethod]` attribute is not considered for risky test check
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.1/installation.html)
### [`v11.1.1`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.1.1): PHPUnit 11.1.1
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.1.0...11.1.1)
##### Fixed
- [#​5798](https://github.com/sebastianbergmann/phpunit/issues/5798): The `#[CoversClass]` and `#[UsesClass]` attributes can no longer target traits
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.1/installation.html)
### [`v11.1.0`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.1.0): PHPUnit 11.1.0
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.0.10...11.1.0)
##### Added
- [#​5689](https://github.com/sebastianbergmann/phpunit/issues/5689): Distinguish between self, direct and indirect deprecations
- [#​5696](https://github.com/sebastianbergmann/phpunit/pull/5696): `#[DisableReturnValueGenerationForTestDoubles]` attribute for disabling return value generation for test doubles created using `createMock()`, `createMockForIntersectionOfInterfaces()`, `createPartialMock()`, `createStub()`, and `createStubForIntersectionOfInterfaces()`
- [#​5175](https://github.com/sebastianbergmann/phpunit/issues/5175): `#[CoversMethod]` and `#[UsesMethod]` attributes for more fine-grained code coverage targeting
- [#​5720](https://github.com/sebastianbergmann/phpunit/issues/5720): Support filtering using `--filter`, `--exclude-filter`, `--group`, and `--exclude-group` when listing tests using `--list-tests` and `--list-tests-xml` as well as listing groups with `--list-groups`
- [#​5733](https://github.com/sebastianbergmann/phpunit/issues/5733): Implicitly include (abstract) parent class(es) with `#[CoversClass]` and `#[UsesClass]` attributes
- `--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 files
##### Changed
- [#​5689](https://github.com/sebastianbergmann/phpunit/issues/5689): The XML configuration file generated using `--generate-configuration` now generates `<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true">` instead of `<source restrictDeprecations="true" restrictNotices="true" restrictWarnings="true">`
- [#​5708](https://github.com/sebastianbergmann/phpunit/issues/5708): Allow the `--group`, `--exclude-group`, `--covers`, `--uses`, and `--test-suffix` CLI options to be used multiple times
- `PHPUnit\Framework\TestCase::__construct()` is now annotated to be final in preparation for declaring it `final` in PHPUnit 12
- Changed how the `DeprecationTriggered`, `ErrorTriggered`, `NoticeTriggered`, `PhpDeprecationTriggered`, `PhpNoticeTriggered`, `PhpWarningTriggered`, and `WarningTriggered` events are represented as text
##### Deprecated
- [#​5689](https://github.com/sebastianbergmann/phpunit/issues/5689): The `restrictDeprecations` attribute on the `<source>` element of the XML configuration file is now deprecated in favor of the `ignoreSelfDeprecations`, `ignoreDirectDeprecations`, and `ignoreIndirectDeprecations` attributes
- [#​5709](https://github.com/sebastianbergmann/phpunit/issues/5709): Deprecate support for using comma-separated values with the `--group`, `--exclude-group`, `--covers`, `--uses`, and `--test-suffix` CLI options
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.1/installation.html)
### [`v11.0.10`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.0.10): PHPUnit 11.0.10
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.0.9...11.0.10)
##### Changed
- The namespaces of dependencies are now prefixed with `PHPUnitPHAR` instead of just `PHPUnit` for the PHAR distribution of PHPUnit
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.0/installation.html)
### [`v11.0.9`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.0.9): PHPUnit 11.0.9
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.0.8...11.0.9)
##### Changed
- [#​5766](https://github.com/sebastianbergmann/phpunit/pull/5766): Do not use a shell in `proc_open()` if not really needed
- [#​5772](https://github.com/sebastianbergmann/phpunit/pull/5772): Cleanup process handling after dropping temp-file handling
##### Fixed
- [#​5570](https://github.com/sebastianbergmann/phpunit/pull/5570): Windows does not support exclusive locks on stdout
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.0/installation.html)
### [`v11.0.8`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.0.8): PHPUnit 11.0.8
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.0.7...11.0.8)
##### Fixed
- [#​5765](https://github.com/sebastianbergmann/phpunit/pull/5765): Be more forgiving with error handlers that do not respect error suppression
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.0/installation.html)
### [`v11.0.7`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.0.7): PHPUnit 11.0.7
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.0.6...11.0.7)
##### Changed
- [#​5747](https://github.com/sebastianbergmann/phpunit/pull/5747): Cache result of `Groups::groups()`
- [#​5748](https://github.com/sebastianbergmann/phpunit/pull/5748): Improve performance of `NamePrettifier::prettifyTestMethodName()`
- [#​5750](https://github.com/sebastianbergmann/phpunit/pull/5750): Micro-optimize `NamePrettifier::prettifyTestMethodName()` once again
- [#​5752](https://github.com/sebastianbergmann/phpunit/issues/5752): Improve message for deprecation of doubling methods named "method"
##### Fixed
- [#​5760](https://github.com/sebastianbergmann/phpunit/issues/5760): TestDox printer does not display details about exceptions raised in before-test methods
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.0/installation.html)
### [`v11.0.6`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.0.6): PHPUnit 11.0.6
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.0.5...11.0.6)
##### Changed
- [#​5727](https://github.com/sebastianbergmann/phpunit/pull/5727): Prevent duplicate call of `NamePrettifier::prettifyTestMethodName()`
- [#​5739](https://github.com/sebastianbergmann/phpunit/pull/5739): Micro-optimize `NamePrettifier::prettifyTestMethodName()`
- [#​5740](https://github.com/sebastianbergmann/phpunit/pull/5740): Micro-optimize `TestRunner::runTestWithTimeout()`
- [#​5741](https://github.com/sebastianbergmann/phpunit/pull/5741): Save call to `Telemetry\System::snapshot()`
- [#​5742](https://github.com/sebastianbergmann/phpunit/pull/5742): Prevent file IO when not strictly necessary
- [#​5743](https://github.com/sebastianbergmann/phpunit/pull/5743): Prevent unnecessary `ExecutionOrderDependency::getTarget()` call
- [#​5744](https://github.com/sebastianbergmann/phpunit/pull/5744): Simplify `NamePrettifier::prettifyTestMethodName()`
##### Fixed
- [#​5351](https://github.com/sebastianbergmann/phpunit/issues/5351): Incorrect code coverage metadata does not prevent code coverage data from being collected
- [#​5729](https://github.com/sebastianbergmann/phpunit/pull/5729): `assertArrayIsIdenticalToArrayOnlyConsideringListOfKeys()` does not correctly handle array order
- [#​5746](https://github.com/sebastianbergmann/phpunit/issues/5746): Using `-d` CLI option multiple times triggers warning
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.0/installation.html)
### [`v11.0.5`](https://github.com/sebastianbergmann/phpunit/releases/tag/11.0.5): PHPUnit 11.0.5
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.0.4...11.0.5)
##### Fixed
- [#​5652](https://github.com/sebastianbergmann/phpunit/issues/5652): `HRTime::duration()` throws `InvalidArgumentException`
- `--exclude-filter` CLI option does not work
***
[How to install or update PHPUnit](https://docs.phpunit.de/en/11.0/installation.html)
### [`v11.0.4`](https://github.com/sebastianbergmann/phpunit/compare/11.0.3...11.0.4)
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.0.3...11.0.4)
### [`v11.0.3`](https://github.com/sebastianbergmann/phpunit/compare/11.0.2...11.0.3)
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.0.2...11.0.3)
### [`v11.0.2`](https://github.com/sebastianbergmann/phpunit/compare/11.0.1...11.0.2)
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.0.1...11.0.2)
### [`v11.0.1`](https://github.com/sebastianbergmann/phpunit/compare/11.0.0...11.0.1)
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/11.0.0...11.0.1)
### [`v11.0.0`](https://github.com/sebastianbergmann/phpunit/compare/10.5.67...11.0.0)
[Compare Source](https://github.com/sebastianbergmann/phpunit/compare/10.5.67...11.0.0)
</details>
---
### Configuration
📅 **Schedule**: (UTC)
- Branch creation
- At any time (no schedule defined)
- Automerge
- At any time (no schedule defined)
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjQ0LjI2NC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
any of the package files in this branch needs updating, or
the branch becomes conflicted, or
you click the rebase/retry checkbox if found above, or
you rename this PR's title to start with "rebase!" to trigger it manually
The artifact failure details are included below:
File name: composer.lock
Command failed: composer install --ignore-platform-req='ext-*' --ignore-platform-req='lib-*' --no-ansi --no-interaction --no-scripts --no-autoloader --no-plugins
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
- Root composer.json requires php ^8.5 but your php version (8.4.26) does not satisfy that requirement.
Problem 2
- chill-project/chill-bundles is locked to version v6.0.6 and an update of this package was not requested.
- chill-project/chill-bundles v6.0.6 requires php ^8.5 -> your php version (8.4.26) does not satisfy that requirement.
### ⚠️ Artifact update problem
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
- any of the package files in this branch needs updating, or
- the branch becomes conflicted, or
- you click the rebase/retry checkbox if found above, or
- you rename this PR's title to start with "rebase!" to trigger it manually
The artifact failure details are included below:
##### File name: composer.lock
```
Command failed: composer install --ignore-platform-req='ext-*' --ignore-platform-req='lib-*' --no-ansi --no-interaction --no-scripts --no-autoloader --no-plugins
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
- Root composer.json requires php ^8.5 but your php version (8.4.26) does not satisfy that requirement.
Problem 2
- chill-project/chill-bundles is locked to version v6.0.6 and an update of this package was not requested.
- chill-project/chill-bundles v6.0.6 requires php ^8.5 -> your php version (8.4.26) does not satisfy that requirement.
```
Some required checks failed
renovate/artifacts Artifact file update failure
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR contains the following updates:
^10.5.24→^13.0.0Release Notes
sebastianbergmann/phpunit (phpunit/phpunit)
v13.4.8: PHPUnit 13.4.8Compare Source
Fixed
--generate-baselinecontains an issue once for each time it was triggered, for instance once for each data set of a test that uses a data provider, instead of oncebuild/baseline.xmland the file insrc--log-junit php://stdoutis used, orphp://stdoutis configured for the JUnit XML logfile in the XML configuration file, and the test runner prints its regular output, the test runner ends withAn error occurred inside PHPUnitafter the JUnit XML was printed: the test results are not printed, code coverage reports and the baseline are not written, and the shell exit code is255--log-junit php://stdoutis used together with--stderr, the JUnit XML is printed to the standard error stream--compactonly printsNo tests executed!and not why, for instance the PHPUnit error for the invalid data provider of the only test, or the test runner warning for a test class without testsLearn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.4.7: PHPUnit 13.4.7Compare Source
Fixed
--order-by random,defectsconfigured using theexecutionOrderattribute in the XML configuration file is still applied, and vice versadefaulttogether with an order for--order-byor theexecutionOrderXML configuration attribute, for instancedefault,random, triggers a deprecation for using more than one order, althoughdefaultresets the order instead of selecting one--fail-on-skippeddoes not make the test runner exit with a shell exit code that indicates failure when a test class is skipped, for instance because its before-first-test method callsmarkTestSkipped(), although its tests are counted as skipped--stop-on-skippeddoes not stop the test run when a test class is skipped, for instance because its before-first-test method callsmarkTestSkipped()PHPUnit\orSebastianBergmann\namespace that do not belong to PHPUnit or one of its dependencies are preloaded on startup, which leads to a fatal error when such a code unit depends on code that is not availablesebastian/file-filterandsebastian/git-stateis not treated like code from PHPUnit's other dependencies, for instance stack frames from it are not filtered from stack tracesnikic/php-parserand parts of the code fromphar-io/manifestare not treated like code from PHPUnit's other dependencies, for instance stack frames from it are not filtered from stack tracesLearn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.4.6: PHPUnit 13.4.6Compare Source
Changed
Fixed
method()is called for a method of a test double that cannot be configured, for instance because it does not exist, every subsequent invocation of a method of that test double fails withMethod name is not configuredsetUp(), marks the test as incomplete, the hook method is reported as failedtearDown(), marks a successful test as incomplete or skips it, the test is reported as failedsetUpBeforeClass(), callsmarkTestIncomplete(), each test of the test class is reported as failed instead of the test class being skipped as it is whenmarkTestSkipped()is calledtearDownAfterClass(), callsmarkTestIncomplete()ormarkTestSkipped()after the tests of the test class have been run, this is reported as a failure, also for each test of the test class that is run in process isolationassert(), in a hook method is reported as an error of that method instead of as a failure, and it is counted as an error instead of as a failure when that method is a before-first-test method or an after-last-test methodtearDown(), of a test that already failed, errored, or was marked as incomplete, a failure is reported in addition to the outcome of the test, so the test is counted more than once andonNotSuccessfulTest()is called with the failure from the "after test" method instead of the test's owntearDown(), is reported in addition to the test's failure, so the test is counted more than oncerequireCoverageMetadata="true"is configured, when it does not define a code coverage target, unlike a test that fails because an assertion failedsetUpBeforeClass()--debugand in the logfiles written by--log-events-textand--log-events-verbose-textgroupsattribute of<directory>or<file>in the XML configuration file are not assigned to PHPT tests, so--groupand--exclude-groupdo not select them and--list-groupsand--list-tests-xmlreport them as being in thedefaultgroup or not at allRemoved
phpunit-library-X.Y.Z.phar) is no longer built, it could not be loaded since PHPUnit 9.5.8Learn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.4.5: PHPUnit 13.4.5Compare Source
Fixed
Learn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.4.4: PHPUnit 13.4.4Compare Source
Fixed
testSuiteFinishedtwice for a test class when one of its before-first-test methods errors or failstearDown()of a test that erroredLearn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.4.3: PHPUnit 13.4.3Compare Source
Fixed
CodeCoverageorFacade#[Before]method, skips the test, the remaining hook methods of the same kind are still called, so the test is reported as errored instead of skipped when one of them errorsEfor the test class instead of one for each of its tests, only one of its tests is counted as run, and the test that is run next is shown as an errorrequirements is not met
setUp(), and reports the test that is run after it as aborted with the message of the incomplete testsetUp()raises an exception or the global state cannot be backed uptearDown()fails after the test errored, with its last outcome instead of its most severe one, and with more than one end when the preparation of the test errored]]>, bytes that are not valid UTF-8, or characters that are not allowed in XML, for instance the escape character of an ANSIescape sequence
setUp(), with an empty ID before the start of the testLearn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.4.2: PHPUnit 13.4.2Compare Source
Fixed
expectUserDeprecationMessage()andexpectUserDeprecationMessageMatches()did not see the deprecations triggered by an attempt of a retried test and saw those of the previously run test instead#[Retry]does not retry the test,--repeatdoes not skip the remaining repetitions,tearDown()sees the wrong status, and code coverage records the test as successfulwith()were matched by position instead of by name, so an expectation such as->with(b: 7)compared the expected value with the first parameter of the method and the parameter named$bwas not checkedwithParameterSetsInOrder(),withParameterSetsInAnyOrder(), andwithParameterSetsInPartialOrder()were ignored, so a parameter set such as['b' => 7]compared the expected value with the first parameter of the method and the parameternamed
$bwas not checkedLearn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.4.1: PHPUnit 13.4.1Compare Source
Changed
Fixed
TestSuite::runTests()doubles garbage collector time whenzend.exception_ignore_argsis offsetUpBeforeClass()andtearDownAfterClass()were run twice for a test class that is the only test class in a test suite of the XML configuration file that has the name of that test class--ARGS--section of a PHPT test that start with-were interpreted by PHP instead of being passed to the test when the test also has a--STDIN--sectionLearn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.4.0: PHPUnit 13.4.0Compare Source
Added
executionOrderattribute values and--order-bytoken lists that spell the order beforedefects, for exampleduration-ascending,defectspipeline()on theTestSuite\Sortedevent for inspecting which reordering stages were appliedConstraint::negatedToString()andConstraint::negatedFailureDescription()for authoring the description of a constraint that is wrapped inLogicalNot#[RequiresClass]attribute to skip a test if a class does not existChildProcessExtensioninterface for extensions that need to be bootstrapped in the child process of a test that runs in process isolation--coverage-jsonlCLI option and<jsonl>element for the XML configuration file to write a code coverage report in JSONL format, one JSON object per line, that reports uncovered code rather than every executable line--timeoutCLI option to limit the wall-clock time of the entire test runrequireCoverageMetadataOnSmallTests,requireCoverageMetadataOnMediumTests, andrequireCoverageMetadataOnLargeTestsattributes for the XML configuration file to require code coverage metadata depending on the size of a test; these have precedence overrequireCoverageMetadataChanged
--- OUTPUT:record that is attributed to the test instead of being passed through unformatted; the record is omitted whenbeStrictAboutOutputDuringTestsor--disallow-test-outputalready reports the output as riskyDeprecated
defectsbefore the order for--order-byandexecutionOrder, which will change meaning in PHPUnit 14dependsandno-dependsfor--order-byandexecutionOrder--order-byandexecutionOrderexecutionOrderXML configuration attribute, which are currently ignoredConstraint::failureDescriptionInContext()andLogicalNot::negate()#[Group],#[Ticket],#[Small],#[Medium], and#[Large]on parent classes of test classesFixed
#[DataProviderClosure]errors when it is run in process isolationLearn how to install or update PHPUnit 13.4 in the documentation.
Keep up to date with PHPUnit:
v13.3.6: PHPUnit 13.3.6Compare Source
Fixed
#[RequiresMethod]is declared asclass-string, so static analysis reports an error when it refers to a class that does not exist#[RequiresMethod]attribute that refers to a class which cannot be loaded, for instance because its parent class does not exist, aborts the test run instead of skipping the testLearn how to install or update PHPUnit 13.3 in the documentation.
Keep up to date with PHPUnit:
v13.3.5: PHPUnit 13.3.5Compare Source
Changed
\u{NNNN}escape sequences instead of being passed through to the terminalLearn how to install or update PHPUnit 13.3 in the documentation.
Keep up to date with PHPUnit:
v13.3.4: PHPUnit 13.3.4Compare Source
Fixed
SourceMappermay be deleted prematurely--display-phpunit-deprecationsand--display-phpunit-noticesare not usedLearn how to install or update PHPUnit 13.3 in the documentation.
Keep up to date with PHPUnit:
v13.3.3: PHPUnit 13.3.3Compare Source
Fixed
Learn how to install or update PHPUnit 13.3 in the documentation.
Keep up to date with PHPUnit:
v13.3.2: PHPUnit 13.3.2Compare Source
Fixed
SourceMapis built in child process even thoughidentifyIssueTriggeris disabled#[CoversFile]attribute is not considered for risky test checkLearn how to install or update PHPUnit 13.3 in the documentation.
Keep up to date with PHPUnit:
v13.3.1: PHPUnit 13.3.1Compare Source
Changed
setUpBeforeClass()no longer triggers a deprecation warning on PHP 8.6Learn how to install or update PHPUnit 13.3 in the documentation.
Keep up to date with PHPUnit:
v13.3.0: PHPUnit 13.3.0Compare Source
Added
--repeatCLI option and#[Repeat]attributeexpectOutputString()andexpectOutputRegex()to be combined and repeated#[CoversNothing]on methods--retryCLI option#[Retry]attributefailOnAllIssues="true"is combined with an explicitly disabled fine-grainedfailOn*setting--record-test-run-historyand--do-not-record-test-run-historyCLI options as well as therecordTestRunHistoryattribute for the XML configuration file to control whether the status and duration of each test are recorded for use by--order-by defectsand--order-by duration-*--without-class-viewCLI option andclassViewattribute for the XML configuration file to disable the class-oriented view in the HTML code coverage report--without-file-viewCLI option andfileViewattribute for the XML configuration file to disable the file-oriented view in the HTML code coverage report{PWD}is now substituted with the directory of the PHPT test file in--ENV--and--INI--sections of PHPT test files{TMP}(system directory for temporary files) and{ENV:name}(value of environment variablename) are now substituted in--INI--sections of PHPT test files--INI--section references an environment variable that is not set is now skipped--SKIPIF--section of a PHPT test file that printsxfail <reason>now marks the test as expected to fail, as if the PHPT test file had an--XFAIL--section with that reasonChanged
test-run-historyinstead oftest-resultsTestCaseno longer captureserror_log()output for tests that do not useexpectErrorLog(), avoiding the cost of setting up error log redirection for every testerror_log()output from tests without an expectation is no longer echoed (date-stripped) to PHPUnit's output; it goes to the configured error log again, as it did before capture was introducederror_log()withoutexpectErrorLog()now produces stderr output in the child process, which the test runner reports as a test error--XFAIL--section orxfailoutput from the--SKIPIF--section) but passes is now considered risky; this usually means the expected-failure marker is stale and should be removed--SKIPIF--section produces output that is not recognized is now considered risky; this usually means the skip check itself is broken. The keywords understood by PHP's own test runner that have no PHPUnit counterpart (info,warn,xleak,flaky, andnocache) are tolerated and do not make the test riskydate.timezone=UTC,display_startup_errors=1,fatal_error_backtraces=Off,ignore_repeated_errors=0,precision=14,serialize_precision=-1), consistent with PHP's own test runner; all of them can be overridden per test using the--INI--sectionDeprecated
--cache-resultCLI option, use--record-test-run-historyinstead--do-not-cache-resultCLI option, use--do-not-record-test-run-historyinsteadcacheResultXML configuration attribute, userecordTestRunHistoryinsteadPHPUnit\TextUI\Configuration\Configuration::cacheResult(), usePHPUnit\TextUI\Configuration\Configuration::recordTestRunHistory()insteadPHPUnit\TextUI\Configuration\Configuration::testResultCacheFile(), usePHPUnit\TextUI\Configuration\Configuration::testRunHistoryFile()insteadFixed
expectErrorLog()now only considerserror_log()output written after it was called; previously, the expectation was also satisfied by output written beforeexpectErrorLog()was called--FILE--,--FILEEOF--, and--FILE_EXTERNAL--sections, or more than one expectation section (--EXPECT--,--EXPECTF--,--EXPECTREGEX--, and their_EXTERNALvariants) are now rejected; previously, misspelled sections were silently ignored and duplicated sections silently overwrote each other--EXPECTREGEX--section must now match the PHPT test's entire output, and.now matches newline characters, consistent with PHP's own test runner; previously, a match on a substring of the output was sufficient for the test to pass--SKIPIF--section of a PHPT test is no longer mangled when it follows theskip <reason>convention used by PHP's own test suite; previously, the first two characters of the reason were stripped unless theskip: <reason>orskip - <reason>convention was usedPHPUnit\Runner\Phpt\InvalidPhptFileExceptionwhen a PHPT test file has an empty--FILE--or--FILEEOF--section or a--FILE_EXTERNAL--section that references an empty file; such a file is now rejected while it is parsed and reported as an errored testPHPUnit\Runner\Phpt\InvalidPhptFileExceptionnow has a message that explains why the PHPT test file was rejectedLearn how to install or update PHPUnit 13.3 in the documentation.
Keep up to date with PHPUnit:
v13.2.6: PHPUnit 13.2.6Compare Source
Fixed
Learn how to install or update PHPUnit 13.2 in the documentation.
Keep up to date with PHPUnit:
v13.2.5: PHPUnit 13.2.5Compare Source
Changed
RequiresPhp,RequiresPhpunit, orRequiresPhpExtensionversion requirement now include the version that is actually being usedFixed
@error suppression and forwards suppressed warnings to previous error handlerassertArrayHasKey()does not acceptArrayAccessimplementations with a specific value type when test code is analysed with PHPStan at level 9Learn how to install or update PHPUnit 13.2 in the documentation.
Keep up to date with PHPUnit:
v13.2.4: PHPUnit 13.2.4Compare Source
Fixed
error_reporting()output dynamicallyLearn how to install or update PHPUnit 13.2 in the documentation.
Keep up to date with PHPUnit:
v13.2.3: PHPUnit 13.2.3Compare Source
Changed
Learn how to install or update PHPUnit 13.2 in the documentation.
Keep up to date with PHPUnit:
v13.2.2: PHPUnit 13.2.2Compare Source
Fixed
Learn how to install or update PHPUnit 13.2 in the documentation.
Keep up to date with PHPUnit:
v13.2.1: PHPUnit 13.2.1Compare Source
Fixed
--filtermatches the name of a data set but not the name of the test methodLearn how to install or update PHPUnit 13.2 in the documentation.
Keep up to date with PHPUnit:
v13.2.0: PHPUnit 13.2.0Compare Source
Added
IsTrue,IsFalse,IsNull,IsFinite,IsInfinite, andIsNanconstraints#[RunTestsInSeparateProcesses]from parent test classesassertContainsEquals()should usesebastian/comparatorfor element comparison--SKIPIF--does not have standard-output side effect$_dataNameavailable to#[TestDoxFormatter]callbacks$skipWhenEmptyparameter for#[DataProvider]and#[DataProviderExternal]--stop-on-defect,--stop-on-error, etc. to accept an optional thresholdwillReturnMap()with constraint support and strict matching--list-test-idsCLI option and enhance--filterCLI option to support test ID syntax--run-test-id <test-id>CLI option that accepts a single test ID for exact matching--compactCLI option andPHPUNIT_COMPACT_OUTPUT=1environment variable)--disable-coverage-targetingCLI optionexecutionOrderattribute in the XML configuration file now acceptsdefectscombined with any main order, as well as three-way combinations ofdepends/no-depends,defects, and a main order (for example,depends,defects,duration-ascending)--validate-configurationCLI option to validate an XML configuration file for PHPUnitChanged
sebastian/file-filterinSourceFilter::includes()for issue trigger identification#[IgnoreDeprecations]to be repeated--filterIsEqual,IsEqualCanonicalizing,IsEqualIgnoringCase,IsEqualWithDelta, andTraversableContainsEqualconstraints or theassertEquals(),assertEqualsCanonicalizing(),assertEqualsIgnoringCase(),assertEqualsWithDelta(), andassertContainsEquals()assertionsDeprecated
--order-by durationCLI option, use--order-by duration-ascendinginstead--order-by sizeCLI option, use--order-by size-ascendinginsteadexecutionOrder="duration"XML configuration attribute value, useexecutionOrder="duration-ascending"insteadexecutionOrder="size"XML configuration attribute value, useexecutionOrder="size-ascending"insteadexpectExceptionMessage(), useexpectExceptionMessageIsOrContains()insteadFixed
auto_prepend_file) cause false "risky test" warningsTestSuiteSorter::cmpSize()does not handleTestSuiteobjects forTestCaseclassesLearn how to install or update PHPUnit 13.2 in the documentation.
Keep up to date with PHPUnit:
v13.1.14: PHPUnit 13.1.14Compare Source
Fixed
assertNotEquals()failure message says "is equal to" instead of "is not equal to" when comparing arrays or objectsexpectOutputString()andexpectOutputRegex()silently replace themselves and each otherLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.13: PHPUnit 13.1.13Compare Source
Fixed
assertXmlStringEqualsXmlString()regressed into treating comments as significantLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.12: PHPUnit 13.1.12Compare Source
Fixed
-dsettings forwarded to child processes (breaks PCOV coverage)Learn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.11: PHPUnit 13.1.11Compare Source
Fixed
=need to be quoted before forwarding via-dLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.10: PHPUnit 13.1.10Compare Source
Changed
Learn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.9: PHPUnit 13.1.9Compare Source
Changed
TestorTestsprefix is no longer stripped from class names when they are processed for TestDox outputFixed
Learn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.8: PHPUnit 13.1.8Compare Source
Fixed
testStartedandtestFinishedassertArrays*IgnoringOrder()fails on mixed scalar types and on reordered nested associative arraysMockBuilder::setMockClassName()andTestStubBuilder::setStubClassName()now reject values that are not valid unqualified PHP class identifiers, throwing the newInvalidClassNameExceptionGenerator::ensureValidMethods()to validate method names passed toMockBuilder::onlyMethods()andaddMethods()was not anchored, so any string containing a valid identifier substring (including strings with parentheses, braces, comments, or newlines) was acceptedLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.7: PHPUnit 13.1.7Compare Source
Changed
LIBXML_NONETwhen parsing/validating XML configuration files to make explicit that no network I/O is performedLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.6: PHPUnit 13.1.6Compare Source
Fixed
;and"are not preserved when forwarding settings to child processesLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.5: PHPUnit 13.1.5Compare Source
Fixed
-dsettings are not forwarded to child processes for process isolationRequiresPhp(e.g.<=8.5) is compared against full PHP version, causing unexpected skipsdataSetAsStringWithData()raises "float is not representable as int" warning for large floats in data setsLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.4: PHPUnit 13.1.4Compare Source
Fixed
DefaultJobRunnerdeadlocks on child processes that write large amounts of stderr output$_SERVERentries leak from parent into child processfailOnEmptyTestSuite="false"inphpunit.xmlis ignored when--group/--filter/--testsuitematches no testsLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.3: PHPUnit 13.1.3Compare Source
Fixed
Learn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.2: PHPUnit 13.1.2Compare Source
Fixed
--random-order-seedis used when test execution order is not random--filterdoes not work when filter string starts with#TestSuiteSkippedevent--filter,--group,--testsuite) yields no teststearDown()and handler restoration, causing subsequent tests to be marked as riskyLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.1: PHPUnit 13.1.1Compare Source
Changed
exitwas called from some testFixed
colors="true"in XML configuration file does not unconditionally enable colored output--migrate-configurationdoes not update schema location when XML content already validates against current schemawillReturnCallback()is silently swallowed when code under test catches exceptionsset_include_path()TestDoubleBuildermethod chainingLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.1.0: PHPUnit 13.1.0Compare Source
Added
includeInCodeCoverageattribute for<directory>and<file>children of<source>#[Group]information in Open Test Reporting (OTR) XML logfile#[DataProviderClosure]for static closures<issueTriggerResolvers>in the XML configuration file%r...%rinEXPECTFsectionoutputDirectoryattribute, allowing the output directory to be specified later with the--coverage-htmlCLI optionChanged
StringMatchesFormatDescriptionconstraint which is used byassertFileMatchesFormat(),assertFileMatchesFormatFile(),assertStringMatchesFormat(),assertStringMatchesFormatFile(), andEXPECTFsections of PHPT test filesPHPUnit\Runner\Extension\Facadefrom a concrete class to an interface and introduced an internalExtensionFacadeimplementation, so that extensions only depend on theFacadeinterface while PHPUnit internally uses theExtensionFacadeclass that also provides query methodsDeprecated
--log-events-verbose-text <file>CLI optionid()andafter()for mock object expectationsFixed
FILE_EXTERNALbreaks__DIR__TestSuiteLoaderis brittle and causes "Class FooTest not found" even for valid tests in valid filenamesLearn how to install or update PHPUnit 13.1 in the documentation.
Keep up to date with PHPUnit:
v13.0.6: PHPUnit 13.0.6Compare Source
Changed
Fixed
RegularExpressionandStringMatchesFormatDescriptiondid not handlepreg_match()errors such asCompilation failed: regular expression is too largeLearn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.5: PHPUnit 13.0.5Compare Source
Fixed
Learn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.4: PHPUnit 13.0.4Compare Source
Fixed
Learn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.3: PHPUnit 13.0.3Compare Source
Fixed
<ini />can silently failLearn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.2: PHPUnit 13.0.2Compare Source
Deprecated
atLeast()with an argument that is not positivewith*()withoutexpects()Fixed
SourceMappermay be deleted prematurely when multiple PHPUnit processes run in parallelwith()is used withoutexpects()Learn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.1: PHPUnit 13.0.1Compare Source
Fixed
method()returnsInvocationMockerinstead ofInvocationStubberfor test stubsLearn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v13.0.0: PHPUnit 13.0.0Compare Source
Added
TestCase::invokeTestMethod()method for customizing test method invocationwithParameterSetsInOrder()andwithParameterSetsInAnyOrder()for expecting calls to the same method of a mock object but with different argumentsassertArraysAreIdentical(),assertArraysAreIdenticalIgnoringOrder(),assertArraysHaveIdenticalValues(),assertArraysHaveIdenticalValuesIgnoringOrder(),assertArraysAreEqual(),assertArraysAreEqualIgnoringOrder(),assertArraysHaveEqualValues(), andassertArraysHaveEqualValuesIgnoringOrder()assertions--test-files-file <file>CLI option to configure a file that contains the paths to the test files to be loaded (one file per line); use this when using CLI arguments is not an option due to argument length limitationsDeprecated
any()matcher (hard deprecation)Removed
Assert::isType()assertContainsOnly()andassertNotContainsOnly()containsOnly()testClassName()method on event value objects for hook methods called for test methodsConfiguration::includeTestSuite()andConfiguration::excludeTestSuite()--dont-report-useless-testsCLI option#[CoversNothing]on a test method#[RunClassInSeparateProcess]attributeLearn how to install or update PHPUnit 13.0 in the documentation.
Keep up to date with PHPUnit:
v12.5.45: PHPUnit 12.5.45Compare Source
Fixed
--generate-baselinecontains an issue once for each time it was triggered, for instance once for each data set of a test that uses a data provider, instead of oncebuild/baseline.xmland the file insrc--log-junit php://stdoutis used, orphp://stdoutis configured for the JUnit XML logfile in the XML configuration file, and the test runner prints its regular output, the test runner ends withAn error occurred inside PHPUnitafter the JUnit XML was printed: the test results are not printed, code coverage reports and the baseline are not written, and the shell exit code is255--log-junit php://stdoutis used together with--stderr, the JUnit XML is printed to the standard error streamLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.44: PHPUnit 12.5.44Compare Source
Fixed
--order-by random,defectsconfigured using theexecutionOrderattribute in the XML configuration file is still applied, and vice versa--fail-on-skippeddoes not make the test runner exit with a shell exit code that indicates failure when a test class is skipped, for instance because its before-first-test method callsmarkTestSkipped(), although its tests are counted as skipped--stop-on-skippeddoes not stop the test run when a test class is skipped, for instance because its before-first-test method callsmarkTestSkipped()PHPUnit\orSebastianBergmann\namespace that do not belong to PHPUnit or one of its dependencies are preloaded on startup, which leads to a fatal error when such a code unit depends on code that is not availablenikic/php-parserand parts of the code fromphar-io/manifestare not treated like code from PHPUnit's other dependencies, for instance stack frames from it are not filtered from stack tracesLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.43: PHPUnit 12.5.43Compare Source
Changed
Fixed
method()is called for a method of a test double that cannot be configured, for instance because it does not exist, every subsequent invocation of a method of that test double fails withMethod name is not configuredsetUp(), marks the test as incomplete, the hook method is reported as failedtearDown(), marks a successful test as incomplete or skips it, the test is reported as failedsetUpBeforeClass(), callsmarkTestIncomplete(), each test of the test class is reported as failed instead of the test class being skipped as it is whenmarkTestSkipped()is calledtearDownAfterClass(), callsmarkTestIncomplete()ormarkTestSkipped()after the tests of the test class have been run, this is reported as a failure, also for each test of the test class that is run in process isolationassert(), in a hook method is reported as an error of that method instead of as a failure, and it is counted as an error instead of as a failure when that method is a before-first-test method or an after-last-test methodtearDown(), of a test that already failed, errored, or was marked as incomplete, a failure is reported in addition to the outcome of the test, so the test is counted more than once andonNotSuccessfulTest()is called with the failure from the "after test" method instead of the test's owntearDown(), is reported in addition to the test's failure, so the test is counted more than oncerequireCoverageMetadata="true"is configured, when it does not define a code coverage target, unlike a test that fails because an assertion failedsetUpBeforeClass()--debugand in the logfiles written by--log-events-textand--log-events-verbose-textgroupsattribute of<directory>or<file>in the XML configuration file are not assigned to PHPT tests, so--groupand--exclude-groupdo not select them and--list-groupsand--list-tests-xmlreport them as being in thedefaultgroup or not at allRemoved
phpunit-library-X.Y.Z.phar) is no longer built, it could not be loaded since PHPUnit 9.5.8Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.42: PHPUnit 12.5.42Compare Source
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.41: PHPUnit 12.5.41Compare Source
Fixed
testSuiteFinishedtwice for a test class when one of its before-first-test methods errors or failstearDown()of a test that erroredLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.40: PHPUnit 12.5.40Compare Source
Fixed
CodeCoverageorFacade#[Before]method, skips the test, the remaining hook methods of the same kind are still called, so the test is reported as errored instead of skipped when one of them errorsEfor the test class instead of one for each of its tests, only one of its tests is counted as run, and the test that is run next is shown as an errorrequirements is not met
setUp(), and no end for the test that is run after itsetUp()raises an exception or the global state cannot be backed uptearDown()fails after the test errored]]>, bytes that are not valid UTF-8, or characters that are not allowed in XML, for instance the escape character of an ANSI escape sequenceLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.39: PHPUnit 12.5.39Compare Source
Fixed
-d extensionor-d zend_extensionare not loaded in child processestearDown()sees the wrong status and code coverage records the test as successfulwith()were matched by position instead of by name, so an expectation such as->with(b: 7)compared the expected value with the first parameter of the method and the parameter named$bwas not checkedLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.38: PHPUnit 12.5.38Compare Source
Changed
Fixed
setUpBeforeClass()andtearDownAfterClass()were run twice for a test class that is the only test class in a test suite of the XML configuration file that has the name of that test class--ARGS--section of a PHPT test that start with-were interpreted by PHP instead of being passed to the test when the test also has a--STDIN--sectionLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.37: PHPUnit 12.5.37Compare Source
Fixed
#[RequiresMethod]is declared asclass-string, so static analysis reports an error when it refers to a class that does not exist#[RequiresMethod]attribute that refers to a class which cannot be loaded, for instance because its parent class does not exist, aborts the test run instead of skipping the testLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.36: PHPUnit 12.5.36Compare Source
Changed
\u{NNNN}escape sequences instead of being passed through to the terminalLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.35: PHPUnit 12.5.35Compare Source
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.34: PHPUnit 12.5.34Compare Source
Fixed
SourceMapis built in child process even thoughidentifyIssueTriggeris disabledLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.33: PHPUnit 12.5.33Compare Source
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.32: PHPUnit 12.5.32Compare Source
Fixed
assertArrayHasKey()does not acceptArrayAccessimplementations with a specific value type when test code is analysed with PHPStan at level 9Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.31: PHPUnit 12.5.31Compare Source
Changed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.30: PHPUnit 12.5.30Compare Source
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.29: PHPUnit 12.5.29Compare Source
Fixed
assertNotEquals()failure message says "is equal to" instead of "is not equal to" when comparing arrays or objectsexpectOutputString()andexpectOutputRegex()silently replace themselves and each otherLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.28: PHPUnit 12.5.28Compare Source
Fixed
assertXmlStringEqualsXmlString()regressed into treating comments as significantLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.27: PHPUnit 12.5.27Compare Source
Fixed
-dsettings forwarded to child processes (breaks PCOV coverage)Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.26: PHPUnit 12.5.26Compare Source
Fixed
=need to be quoted before forwarding via-dLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.25: PHPUnit 12.5.25Compare Source
Changed
TestorTestsprefix is no longer stripped from class names when they are processed for TestDox outputFixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.24: PHPUnit 12.5.24Compare Source
Added
TestCase::invokeTestMethod()method for customizing test method invocation from PHPUnit 13Fixed
testStartedandtestFinishedMockBuilder::setMockClassName()andTestStubBuilder::setStubClassName()now reject values that are not valid unqualified PHP class identifiers, throwing the newInvalidClassNameExceptionGenerator::ensureValidMethods()to validate method names passed toMockBuilder::onlyMethods()andaddMethods()was not anchored, so any string containing a valid identifier substring (including strings with parentheses, braces, comments, or newlines) was acceptedLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.23: PHPUnit 12.5.23Compare Source
Changed
LIBXML_NONETwhen parsing/validating XML configuration files to make explicit that no network I/O is performedLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.22: PHPUnit 12.5.22Compare Source
Fixed
;and"are not preserved when forwarding settings to child processesLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.21: PHPUnit 12.5.21Compare Source
Fixed
-dsettings are not forwarded to child processes for process isolationRequiresPhp(e.g.<=8.5) is compared against full PHP version, causing unexpected skipsLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.20: PHPUnit 12.5.20Compare Source
Fixed
DefaultJobRunnerdeadlocks on child processes that write large amounts of stderr output$_SERVERentries leak from parent into child processfailOnEmptyTestSuite="false"inphpunit.xmlis ignored when--group/--filter/--testsuitematches no testsLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.19: PHPUnit 12.5.19Compare Source
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.18: PHPUnit 12.5.18Compare Source
Fixed
--random-order-seedis used when test execution order is not random--filterdoes not work when filter string starts with#TestSuiteSkippedevent--filter,--group,--testsuite) yields no teststearDown()and handler restoration, causing subsequent tests to be marked as riskyLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.17: PHPUnit 12.5.17Compare Source
Changed
exitwas called from some testFixed
colors="true"in XML configuration file does not unconditionally enable colored output--migrate-configurationdoes not update schema location when XML content already validates against current schemawillReturnCallback()is silently swallowed when code under test catches exceptionsset_include_path()TestDoubleBuildermethod chainingLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.16: PHPUnit 12.5.16Compare Source
Added
%r...%rinEXPECTFsectionFixed
FILE_EXTERNALbreaks__DIR__TestSuiteLoaderis brittle and causes "Class FooTest not found" even for valid tests in valid filenamesLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.15: PHPUnit 12.5.15Compare Source
Changed
Fixed
RegularExpressionandStringMatchesFormatDescriptiondid not handlepreg_match()errors such asCompilation failed: regular expression is too largeLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.14: PHPUnit 12.5.14Compare Source
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.13: PHPUnit 12.5.13Compare Source
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.12: PHPUnit 12.5.12Compare Source
Fixed
<ini />can silently failLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.11: PHPUnit 12.5.11Compare Source
Deprecated
with*()on test stubsFixed
SourceMappermay be deleted prematurely when multiple PHPUnit processes run in parallelwith()is used withoutexpects()Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.10: PHPUnit 12.5.10Compare Source
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.9: PHPUnit 12.5.9Compare Source
Added
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.8: PHPUnit 12.5.8Compare Source
Changed
.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 runsLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.7: PHPUnit 12.5.7Compare Source
Fixed
Count::getCountOf()for unusal implementations ofIteratororIteratorAggregateLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.6: PHPUnit 12.5.6Compare Source
Changed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.5: PHPUnit 12.5.5Compare Source
Deprecated
any()matcher (soft deprecation)Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.4: PHPUnit 12.5.4Compare Source
Changed
#[AllowMockObjectsWithoutExpectations]attribute can now be used on the method levelFixed
Timer::start() has to be called before Timer::stop()Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.3: PHPUnit 12.5.3Compare Source
Changed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.2: PHPUnit 12.5.2Compare Source
Added
#[AllowMockObjectsWithoutExpectations]for excluding tests from the check that emits the notice for test methods that create a mock object but do not configure an expectation for itLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.1: PHPUnit 12.5.1Compare Source
Added
TestCase::getStubBuilder()(analogous toTestCase::getMockBuilder()) for creating (partial) test stubs using a fluent APILearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.0: PHPUnit 12.5.0Compare Source
Added
--allCLI option to ignore test selection configured in XML configuration file<source>element in XML code coverage report optionalChanged
ThrowableinexpectExceptionObject()Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.4.5: PHPUnit 12.4.5Compare Source
Changed
Fixed
Learn how to install or update PHPUnit 12.4 in the documentation.
Keep up to date with PHPUnit:
v12.4.4: PHPUnit 12.4.4Compare Source
Fixed
Learn how to install or update PHPUnit 12.4 in the documentation.
Keep up to date with PHPUnit:
v12.4.3: PHPUnit 12.4.3Compare Source
Fixed
STDOUTwhenrewind()failsLearn how to install or update PHPUnit 12.4 in the documentation.
Keep up to date with PHPUnit:
v12.4.2: PHPUnit 12.4.2Compare Source
Changed
Fixed
Learn how to install or update PHPUnit 12.4 in the documentation.
Keep up to date with PHPUnit:
v12.4.1: PHPUnit 12.4.1Compare Source
Fixed
--filterformat used by PhpStorm stopped workingDataProviderMethodCalledevent value objectLearn how to install or update PHPUnit 12.4 in the documentation.
Keep up to date with PHPUnit:
v12.4.0: PHPUnit 12.4.0Compare Source
Added
#[IgnoreDeprecations]attributeDeprecated
#[RunClassInSeparateProcess]attributeLearn how to install or update PHPUnit 12.4 in the documentation.
Keep up to date with PHPUnit:
v12.3.15: PHPUnit 12.3.15Compare Source
Fixed
failOnPhpunitWarning="false"has no effectLearn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.14: PHPUnit 12.3.14Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.13: PHPUnit 12.3.13Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.12: PHPUnit 12.3.12Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.11: PHPUnit 12.3.11Compare Source
Changed
__sleep()and__wakeup()from test double code generation on PHP >= 8.5Learn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.10: PHPUnit 12.3.10Compare Source
Changed
E_DEPRECATEDissues when building the test suiteLearn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.9: PHPUnit 12.3.9Compare Source
Changed
__sleep()method (which will be deprecated in PHP 8.5)Learn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.8: PHPUnit 12.3.8Compare Source
Fixed
Learn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.7: PHPUnit 12.3.7Compare Source
Changed
#[IgnorePhpunitDeprecations]is now considered for test runner deprecations (where applicable)Learn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.6Compare Source
v12.3.5: PHPUnit 12.3.5Compare Source
Changed
error_reporting=E_ALLfor--check-php-configurationFixed
expectUserDeprecationMessage*()fails when test is run in separate processLearn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.4: PHPUnit 12.3.4Compare Source
Changed
--check-php-configurationFixed
ini_set('error_log')sets filepath outsideopen_basedirLearn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.3: PHPUnit 12.3.3Compare Source
Fixed
#[IgnorePhpunitDeprecations]is now considered for test runner deprecations" from PHPUnit 12.3.1)Learn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.2: PHPUnit 12.3.2Compare Source
Changed
testSplObjectStoragemethods that will be deprecated in PHP 8.5Learn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.1: PHPUnit 12.3.1Compare Source
Added
--check-php-configurationCLI option for checking whether PHP is configured for testingChanged
#[IgnorePhpunitDeprecations]is now considered for test runner deprecations (where applicable)Fixed
#[TestWith]or#[TestWithJson]attributes are now properly reportedDataProviderMethodFinishedevent is now also emitted when the provided data set has an invalid keyLearn how to install or update PHPUnit 12.3 in the documentation.
Keep up to date with PHPUnit:
v12.3.0: PHPUnit 12.3.0Compare Source
Added
#[IgnorePHPUnitWarnings]attribute for ignoring PHPUnit warnings#[TestDoxFormatter]and#[TestDoxFormatterExternal]attributes for configuring a custom TestDox formatter for tests that use data from data providersTestRunner\ChildProcessErroredeventConfiguration::includeTestSuites()andConfiguration::excludeTestSuites()Changed
@<data-set-name>format (compatible with--filterCLI option) in defect messages#[DataProvider*]attributes are mixed with#[TestWith*]attributesDeprecated
Configuration::includeTestSuite(), useConfiguration::includeTestSuites()insteadConfiguration::excludeTestSuite(), useConfiguration::excludeTestSuites()instead#[CoversNothing]on a test methodHow to install or update PHPUnit
v12.2.9: PHPUnit 12.2.9Compare Source
Fixed
fileattribute of<testClass>node of XML test list can be wrongHow to install or update PHPUnit
v12.2.8: PHPUnit 12.2.8Compare Source
Fixed
How to install or update PHPUnit
v12.2.7: PHPUnit 12.2.7Compare Source
Fixed
defects,randomconfiguration is supported by implementation, but it is not allowed by the XML configuration file schematestprefixHow to install or update PHPUnit
v12.2.6: PHPUnit 12.2.6Compare Source
Fixed
@no-named-argumentsleads to static analysis errors for variadic argumentsHow to install or update PHPUnit
v12.2.5: PHPUnit 12.2.5Compare Source
Fixed
<testsuite>element is missing requirednameattributeHow to install or update PHPUnit
v12.2.4: PHPUnit 12.2.4Compare Source
Changed
--include-git-informationCLI option or theincludeGitInformationattribute in the XML configuration fileHow to install or update PHPUnit
v12.2.3: PHPUnit 12.2.3Compare Source
Added
failOnPhpunitWarningattribute on the<phpunit>element of the XML configuration file and--fail-on-phpunit-warningCLI option for controlling whether PHPUnit should fail on PHPUnit warnings (default:true)--do-not-fail-on-deprecation,--do-not-fail-on-phpunit-warning,--do-not-fail-on-phpunit-deprecation,--do-not-fail-on-empty-test-suite,--do-not-fail-on-incomplete,--do-not-fail-on-notice,--do-not-fail-on-risky,--do-not-fail-on-skipped, and--do-not-fail-on-warningCLI options--do-not-report-useless-testsCLI option as a replacement for--dont-report-useless-testsDeprecated
--dont-report-useless-testsCLI option (use--do-not-report-useless-testsinstead)Fixed
ExpectationFailedExceptionHow to install or update PHPUnit
v12.2.2: PHPUnit 12.2.2Compare Source
Fixed
shortenArraysForExportThresholdXML configuration setting has no effect on all arrays exported for event-related value objectsHow to install or update PHPUnit
v12.2.1: PHPUnit 12.2.1Compare Source
Fixed
How to install or update PHPUnit
v12.2.0: PHPUnit 12.2.0Compare Source
Added
Experimental Support for Open Test Reporting XML
PHPUnit has supported reporting test results in the JUnit XML format for a long time. Unfortunately, there has never been a standard schema for the JUnit XML format. Common consumers of Clover XML log files interpret these files differently, which has led to frequent problems.
To address this, the JUnit team started the Open Test Reporting project, creating and maintaining language-agnostic XML and HTML test reporting formats. Unlike JUnit XML, Open Test Reporting's XML formats are extensible.
Logging in the Open Test Reporting XML format is controlled by the new
--log-otrCLI option and the new<otr>XML configuration element.This feature is experimental and the generated XML may change in order to enhance compliance with the Open Test Reporting project's XML schema definitions. The same applies to the XML schema definitions for information that is specific for PHP and PHPUnit. Please note that such changes may occur in bugfix or minor releases and could potentially break backwards compatibility.
Experimental Support for OpenClover XML
PHPUnit has supported reporting code coverage information in the Clover XML format for a long time. Unfortunately, there has never been a standard schema for the Clover XML format. Common consumers of Clover XML log files interpret these files differently, which leads to frequent problems.
The original commercial Clover project has been superseded by the Open Source OpenClover project, which provides an XML schema for its OpenClover XML format. Rather than modifying the existing Clover XML reporter to comply with the OpenClover XML schema, thereby breaking backward compatibility, a new OpenClover XML reporter has been introduced.
This new reporter is controlled by the new CLI option,
--coverage-openclover, and the new XML configuration element,<openclover>. This code coverage reporter generates XML documents that validate against the OpenClover project's XML schema definition, with one exception: the<testproject>element is not generated.The existing Clover XML reporter, controlled by the
--coverage-cloverCLI option and the<clover>XML configuration element, remains unchanged.This feature is experimental and the generated XML may change to enhance compliance with the OpenClover XML schema definition. Please note that such changes may occur in bugfix or minor releases and could potentially break backwards compatibility.
Miscellaneous
--with-telemetryCLI option that can be used together with--debugto print debugging information that includes telemetry informationTestCase::provideAdditionalInformation()method can now be used to emit aTest\AdditionalInformationProvidedeventTest\AfterLastTestMethodFailed,Test\AfterTestMethodFailed,Test\BeforeFirstTestMethodFailed,Test\BeforeTestMethodFailed,Test\PostConditionFailed,Test\PreConditionFailedevents are now emitted instead ofTest\AfterLastTestMethodErrored,Test\AfterTestMethodErrored,Test\BeforeFirstTestMethodErrored,Test\BeforeTestMethodErrored,Test\PostConditionErrored,Test\PreConditionErroredwhen theThrowableextendsAssertionFailedErrorto distinguish between errors and failures triggered in hook methodsTest\PreparationErroredevent is now emitted instead ofTest\PreparationFailedwhen theThrowabledoes not extendAssertionFailedErrorto distinguish between errors and failures triggered during test preparationTest\PreparationFailed::throwable()Changed
#[CoversNothing]and#[Covers*](or#[Uses*]) are used on a test class#[Covers*](or#[Uses*]) attribute is used multiple times on a test class#[Covers*]and#[Uses*]attributessetUp(), for example has a#[Test]attribute#[Small],#[Medium], or#[Large]is used on a test classHow to install or update PHPUnit
v12.1.6: PHPUnit 12.1.6Compare Source
Changed
createStubForIntersectionOfInterfaces()is called with a classHow to install or update PHPUnit
v12.1.5: PHPUnit 12.1.5Compare Source
Fixed
assertEmpty()andassertNotEmpty()use overly restrictivephpstan-assert emptydirectivesHow to install or update PHPUnit
v12.1.4: PHPUnit 12.1.4Compare Source
Added
displayDetailsOnAllIssuesattribute on the<phpunit>element of the XML configuration file and--display-all-issuesCLI option for controlling whether PHPUnit should display details on all issues that are triggered (default:false)failOnAllIssuesattribute on the<phpunit>element of the XML configuration file and--fail-on-all-issuesCLI option for controlling whether PHPUnit should fail on all issues that are triggered (default:false)Changed
E_STRICTconstantFixed
%aand%Amatches are not ignored from diff whenEXPECTFfailsHow to install or update PHPUnit
v12.1.3: PHPUnit 12.1.3Compare Source
Changed
memory_get_peak_usage()is now reset immediately before theTest\Preparedevent is emitted usingmemory_reset_peak_usage()so that (memory usage atTest\Finished- memory usage atTest\Prepared) is a better approximation of the memory usage of the testTelemetry\Infonow uses peak memory usage instead of memory usage (this affects--log-events-verbose-text)Fixed
error_log()is not displayed when test failsHow to install or update PHPUnit
v12.1.2: PHPUnit 12.1.2Compare Source
Fixed
How to install or update PHPUnit
v12.1.1: PHPUnit 12.1.1Compare Source
Fixed
willReturnMap()fails with nullable parameters when their default isnulland no argument is passed for themHow to install or update PHPUnit
v12.1.0: PHPUnit 12.1.0Compare Source
Added
expectErrorLog()for expectingerror_log()output#[WithEnvironmentVariable]for setting an environment variable for the duration of a testAfterTestMethodCalled,AfterTestMethodErrored,AfterTestMethodFinished,BeforeTestMethodCalled,BeforeTestMethodErrored,BeforeTestMethodFinished,PostConditionCalled,PostConditionErrored,PostConditionFinished,PreConditionCalled,PreConditionErrored, andPreConditionFinishedevent value objects now havetest()method that returns a value object representing the test method for which the hook method was calledChanged
phpunit --warm-coverage-cachebefore running tests.Deprecated
testClassName()method on theAfterTestMethodCalled,AfterTestMethodErrored,AfterTestMethodFinished,BeforeTestMethodCalled,BeforeTestMethodErrored,BeforeTestMethodFinished,PostConditionCalled,PostConditionErrored,PostConditionFinished,PreConditionCalled,PreConditionErrored, andPreConditionFinishedevent value objects (usetest()->className()instead)How to install or update PHPUnit
v12.0.10: PHPUnit 12.0.10Compare Source
Changed
How to install or update PHPUnit
v12.0.9: PHPUnit 12.0.9Compare Source
Fixed
with()on test doubles yields error with static analyzerHow to install or update PHPUnit
v12.0.8: PHPUnit 12.0.8Compare Source
Changed
How to install or update PHPUnit
v12.0.7: PHPUnit 12.0.7Compare Source
Fixed
How to install or update PHPUnit
v12.0.6: PHPUnit 12.0.6Compare Source
Fixed
$expectedand$actualare mixed up in failure description whenassertJsonFileEqualsJsonFile()failsHow to install or update PHPUnit
v12.0.5: PHPUnit 12.0.5Compare Source
Fixed
How to install or update PHPUnit
v12.0.4: PHPUnit 12.0.4Compare Source
Fixed
How to install or update PHPUnit
v12.0.3: PHPUnit 12.0.3Compare Source
Changed
TestCase::__construct()is now declaredfinal(it was annotated with@finalbefore and the announced changed from@finaltofinalfor PHPUnit 12 was forgotten)Fixed
includeUncoveredFilesconfiguration optionTest\PreparationFailedevent is now emitted in addition to aTest\Erroredevent when an unexpected exception is triggered in a before-test methodTest\Passedevent is no longer emitted in addition to aTest\FailedorTest\Erroredevent when an assertion failure or an unexpected exception is triggered in an after-test methodTestSuite\Finishedevent is now emitted when a before-first-test method errorsHow to install or update PHPUnit
v12.0.2: PHPUnit 12.0.2Compare Source
Changed
How to install or update PHPUnit
v12.0.1: PHPUnit 12.0.1Compare Source
Fixed
Assert::isType(),assertContainsOnly(),assertNotContainsOnly(), andcontainsOnly()How to install or update PHPUnit
v12.0.0: PHPUnit 12.0.0Compare Source
Added
#[CoversClassesThatExtendClass]and#[UsesClassesThatExtendClass]#[CoversClassesThatImplementInterface]and#[UsesClassesThatImplementInterface]#[CoversNamespace]and#[UsesNamespace]#[RequiresEnvironmentVariable]Changed
shortenArraysForExportThresholdis now10(limit export of arrays to 10 levels) instead of0(do not limit export of arrays)Deprecated
Assert::isType()(was soft-deprecated in PHPUnit 11.5)assertContainsOnly()(was soft-deprecated in PHPUnit 11.5)assertNotContainsOnly()(was soft-deprecated in PHPUnit 11.5)containsOnly()(was soft-deprecated in PHPUnit 11.5)Removed
TestCase::iniSet()TestCase::setLocale()TestCase::createTestProxy()TestCase::getMockForAbstractClass()TestCase::getMockFromWsdl()TestCase::getMockForTrait()TestCase::getObjectForTrait()MockBuilder::enableAutoload()andMockBuilder::disableAutoload()MockBuilder::allowMockingUnknownTypes()andMockBuilder::disallowMockingUnknownTypes()MockBuilder::enableProxyingToOriginalMethods(),MockBuilder::disableProxyingToOriginalMethods(), andMockBuilder::setProxyTarget()MockBuilder::getMockForTrait()MockBuilder::getMockForAbstractClass()MockBuilder::enableArgumentCloning()andMockBuilder::disableArgumentCloning()MockBuilder::addMethods()methodTestCasemethods for creating return stub configuration objectsassertStringNotMatchesFormat()andassertStringNotMatchesFormatFile()expects()on test stubs--group,--exclude-group,--covers,--uses, and--test-suffixCLI optionsrestrictDeprecationsattribute on the<source>element of the XML configuration file#[CoversClass]and#[UsesClass]attributesHow to install or update PHPUnit
v11.5.58: PHPUnit 11.5.58Compare Source
Changed
Removed
phpunit-library-X.Y.Z.phar) is no longer built, it could not be loaded since PHPUnit 9.5.8Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.57: PHPUnit 11.5.57Compare Source
Changed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.56: PHPUnit 11.5.56Compare Source
Changed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.55: PHPUnit 11.5.55Compare Source
Fixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.54: PHPUnit 11.5.54Compare Source
Fixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.53: PHPUnit 11.5.53Compare Source
Fixed
SourceMappermay be deleted prematurely when multiple PHPUnit processes run in parallelLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.52: PHPUnit 11.5.52Compare Source
Fixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.51: PHPUnit 11.5.51Compare Source
Added
Fixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.50: PHPUnit 11.5.50Compare Source
Changed
.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 runsLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.49: PHPUnit 11.5.49Compare Source
Fixed
Count::getCountOf()for unusal implementations ofIteratororIteratorAggregateLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.48: PHPUnit 11.5.48Compare Source
Changed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.47: PHPUnit 11.5.47Compare Source
Fixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.46: PHPUnit 11.5.46Compare Source
phpunit.pharrebuilt with PHP 8.4 to work around PHP-Scoper issue #1139Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.45: PHPUnit 11.5.45Compare Source
Changed
Fixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.44: PHPUnit 11.5.44Compare Source
Fixed
STDOUTwhenrewind()failsLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.43: PHPUnit 11.5.43Compare Source
Changed
Fixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.42: PHPUnit 11.5.42Compare Source
Fixed
failOnPhpunitWarning="false"has no effectLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.41: PHPUnit 11.5.41Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.40: PHPUnit 11.5.40Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.39: PHPUnit 11.5.39Compare Source
Changed
__sleep()and__wakeup()from test double code generation on PHP >= 8.5Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.38: PHPUnit 11.5.38Compare Source
Changed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.37: PHPUnit 11.5.37Compare Source
Changed
__sleep()method (which will be deprecated in PHP 8.5)Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.36: PHPUnit 11.5.36Compare Source
Fixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.35: PHPUnit 11.5.35Compare Source
Changed
#[IgnorePhpunitDeprecations]is now considered for test runner deprecations (where applicable)Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.34Compare Source
v11.5.33: PHPUnit 11.5.33Compare Source
Changed
error_reporting=E_ALLfor--check-php-configurationFixed
expectUserDeprecationMessage*()fails when test is run in separate processLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.32: PHPUnit 11.5.32Compare Source
Changed
--check-php-configurationFixed
Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.31: PHPUnit 11.5.31Compare Source
Fixed
#[IgnorePhpunitDeprecations]is now considered for test runner deprecations" from PHPUnit 11.5.29)Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.30: PHPUnit 11.5.30Compare Source
Changed
testSplObjectStoragemethods that will be deprecated in PHP 8.5Learn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.29: PHPUnit 11.5.29Compare Source
Added
--check-php-configurationCLI option for checking whether PHP is configured for testingChanged
#[IgnorePhpunitDeprecations]is now considered for test runner deprecations (where applicable)Fixed
#[TestWith]or#[TestWithJson]attributes are now properly reportedDataProviderMethodFinishedevent is now also emitted when the provided data set has an invalid keyLearn how to install or update PHPUnit 11.5 in the documentation.
Keep up to date with PHPUnit:
v11.5.28: PHPUnit 11.5.28Compare Source
Fixed
fileattribute of<testClass>node of XML test list can be wrongHow to install or update PHPUnit
v11.5.27: PHPUnit 11.5.27Compare Source
Fixed
defects,randomconfiguration is supported by implementation, but it is not allowed by the XML configuration file schematestprefixHow to install or update PHPUnit
v11.5.26: PHPUnit 11.5.26Compare Source
Fixed
@no-named-argumentsleads to static analysis errors for variadic argumentsHow to install or update PHPUnit
v11.5.25: PHPUnit 11.5.25Compare Source
Fixed
<testsuite>element is missing requirednameattributeHow to install or update PHPUnit
v11.5.24: PHPUnit 11.5.24Compare Source
Added
failOnPhpunitWarningattribute on the<phpunit>element of the XML configuration file and--fail-on-phpunit-warningCLI option for controlling whether PHPUnit should fail on PHPUnit warnings (default:true)--do-not-fail-on-deprecation,--do-not-fail-on-phpunit-warning,--do-not-fail-on-phpunit-deprecation,--do-not-fail-on-empty-test-suite,--do-not-fail-on-incomplete,--do-not-fail-on-notice,--do-not-fail-on-risky,--do-not-fail-on-skipped, and--do-not-fail-on-warningCLI options--do-not-report-useless-testsCLI option as a replacement for--dont-report-useless-testsDeprecated
--dont-report-useless-testsCLI option (use--do-not-report-useless-testsinstead)Fixed
ExpectationFailedExceptionHow to install or update PHPUnit
v11.5.23: PHPUnit 11.5.23Compare Source
Fixed
shortenArraysForExportThresholdXML configuration setting has no effect on all arrays exported for event-related value objectsHow to install or update PHPUnit
v11.5.22: PHPUnit 11.5.22Compare Source
Changed
How to install or update PHPUnit
v11.5.21: PHPUnit 11.5.21Compare Source
Changed
createStubForIntersectionOfInterfaces()is called with a classHow to install or update PHPUnit
v11.5.20: PHPUnit 11.5.20Compare Source
Fixed
assertEmpty()andassertNotEmpty()use overly restrictivephpstan-assert emptydirectivesHow to install or update PHPUnit
v11.5.19: PHPUnit 11.5.19Compare Source
Added
displayDetailsOnAllIssuesattribute on the<phpunit>element of the XML configuration file and--display-all-issuesCLI option for controlling whether PHPUnit should display details on all issues that are triggered (default:false)failOnAllIssuesattribute on the<phpunit>element of the XML configuration file and--fail-on-all-issuesCLI option for controlling whether PHPUnit should fail on all issues that are triggered (default:false)Changed
E_STRICTconstantFixed
%aand%Amatches are not ignored from diff whenEXPECTFfailsHow to install or update PHPUnit
v11.5.18: PHPUnit 11.5.18Compare Source
Changed
memory_get_peak_usage()is now reset immediately before theTest\Preparedevent is emitted usingmemory_reset_peak_usage()so that (memory usage atTest\Finished- memory usage atTest\Prepared) is a better approximation of the memory usage of the testTelemetry\Infonow uses peak memory usage instead of memory usage (this affects--log-events-verbose-text)Fixed
How to install or update PHPUnit
v11.5.17: PHPUnit 11.5.17Compare Source
Fixed
How to install or update PHPUnit
v11.5.16: PHPUnit 11.5.16Compare Source
Fixed
willReturnMap()fails with nullable parameters when their default isnulland no argument is passed for themHow to install or update PHPUnit
v11.5.15: PHPUnit 11.5.15Compare Source
Changed
How to install or update PHPUnit
v11.5.14: PHPUnit 11.5.14Compare Source
Changed
How to install or update PHPUnit
v11.5.13: PHPUnit 11.5.13Compare Source
Changed
How to install or update PHPUnit
v11.5.12: PHPUnit 11.5.12Compare Source
Fixed
How to install or update PHPUnit
v11.5.11: PHPUnit 11.5.11Compare Source
Fixed
$expectedand$actualare mixed up in failure description whenassertJsonFileEqualsJsonFile()failsHow to install or update PHPUnit
v11.5.10: PHPUnit 11.5.10Compare Source
Fixed
How to install or update PHPUnit
v11.5.9: PHPUnit 11.5.9Compare Source
Fixed
How to install or update PHPUnit
v11.5.8: PHPUnit 11.5.8Compare Source
Fixed
Test\PreparationFailedevent is now emitted in addition to aTest\Erroredevent when an unexpected exception is triggered in a before-test methodTest\Passedevent is no longer emitted in addition to aTest\FailedorTest\Erroredevent when an assertion failure or an unexpected exception is triggered in an after-test methodTestSuite\Finishedevent is now emitted when a before-first-test method errorsHow to install or update PHPUnit
v11.5.7: PHPUnit 11.5.7Compare Source
Changed
includeUncoveredFilesconfiguration option is no longer deprecated--debugoutputHow to install or update PHPUnit
v11.5.6: PHPUnit 11.5.6Compare Source
Changed
SourceMapperFixed
stringcannot be used in customized TestDox outputHow to install or update PHPUnit
v11.5.5: PHPUnit 11.5.5Compare Source
Changed
How to install or update PHPUnit
v11.5.4: PHPUnit 11.5.4Compare Source
Changed
#[CoversTrait]and#[UsesTrait]attributes is no longer deprecated#[CoversMethod]and#[UsesMethod]attributes is no longer deprecatedFixed
SourceMapperto scan all<source/>filesHow to install or update PHPUnit
v11.5.3: PHPUnit 11.5.3Compare Source
Added
Test\AfterLastTestMethodErrored,Test\AfterTestMethodErrored,Test\BeforeTestMethodErrored,Test\PostConditionErrored, andTest\PreConditionErroredeventsFixed
--list-tests-xmlis broken when a group with a numeric name is definedsystem-outelement in JUnit XML logfileHow to install or update PHPUnit
v11.5.2: PHPUnit 11.5.2Compare Source
Fixed
assertArrayHasKey(),assertArrayNotHasKey(),arrayHasKey(), andArrayHasKey::__construct()do not support all possible key types--migrate-configurationdoes not removebeStrictAboutTodoAnnotatedTestsattribute from XML configuration fileHow to install or update PHPUnit
v11.5.1: PHPUnit 11.5.1Compare Source
Added
DefaultResultCache::mergeWith()for merging result cache instancesFixed
How to install or update PHPUnit
v11.5.0: PHPUnit 11.5.0Compare Source
Added
assertContainsNotOnlyInstancesOf()in thePHPUnit\Framework\Assertclass as the inverse of theassertContainsOnlyInstancesOf()methodassertContainsOnlyArray(),assertContainsOnlyBool(),assertContainsOnlyCallable(),assertContainsOnlyFloat(),assertContainsOnlyInt(),assertContainsOnlyIterable(),assertContainsOnlyNull(),assertContainsOnlyNumeric(),assertContainsOnlyObject(),assertContainsOnlyResource(),assertContainsOnlyClosedResource(),assertContainsOnlyScalar(), andassertContainsOnlyString()in thePHPUnit\Framework\Assertclass as specialized alternatives for the genericassertContainsOnly()methodassertContainsNotOnlyArray(),assertContainsNotOnlyBool(),assertContainsNotOnlyCallable(),assertContainsNotOnlyFloat(),assertContainsNotOnlyInt(),assertContainsNotOnlyIterable(),assertContainsNotOnlyNull(),assertContainsNotOnlyNumeric(),assertContainsNotOnlyObject(),assertContainsNotOnlyResource(),assertContainsNotOnlyClosedResource(),assertContainsNotOnlyScalar(), andassertContainsNotOnlyString()in thePHPUnit\Framework\Assertclass as specialized alternatives for the genericassertNotContainsOnly()methodcontainsOnlyArray(),containsOnlyBool(),containsOnlyCallable(),containsOnlyFloat(),containsOnlyInt(),containsOnlyIterable(),containsOnlyNull(),containsOnlyNumeric(),containsOnlyObject(),containsOnlyResource(),containsOnlyClosedResource(),containsOnlyScalar(), andcontainsOnlyString()in thePHPUnit\Framework\Assertclass as specialized alternatives for the genericcontainsOnly()methodisArray(),isBool(),isCallable(),isFloat(),isInt(),isIterable(),isNumeric(),isObject(),isResource(),isClosedResource(),isScalar(),isString()in thePHPUnit\Framework\Assertclass as specialized alternatives for the genericisType()methodTestRunner\ChildProcessStartedandTestRunner\ChildProcessFinishedeventsChanged
SKIPIFsection of PHPT test in separate process when it is free of side effectsCLEANsection of PHPT test in separate process when it is free of side effects that modify the parent processDeprecated
isType()(useisArray(),isBool(),isCallable(),isFloat(),isInt(),isIterable(),isNull(),isNumeric(),isObject(),isResource(),isClosedResource(),isScalar(), orisString()instead)assertContainsOnly()(useassertContainsOnlyArray(),assertContainsOnlyBool(),assertContainsOnlyCallable(),assertContainsOnlyFloat(),assertContainsOnlyInt(),assertContainsOnlyIterable(),assertContainsOnlyNumeric(),assertContainsOnlyObject(),assertContainsOnlyResource(),assertContainsOnlyClosedResource(),assertContainsOnlyScalar(), orassertContainsOnlyString()instead)assertNotContainsOnly()(useassertContainsNotOnlyArray(),assertContainsNotOnlyBool(),assertContainsNotOnlyCallable(),assertContainsNotOnlyFloat(),assertContainsNotOnlyInt(),assertContainsNotOnlyIterable(),assertContainsNotOnlyNumeric(),assertContainsNotOnlyObject(),assertContainsNotOnlyResource(),assertContainsNotOnlyClosedResource(),assertContainsNotOnlyScalar(), orassertContainsNotOnlyString()instead)containsOnly()(usecontainsOnlyArray(),containsOnlyBool(),containsOnlyCallable(),containsOnlyFloat(),containsOnlyInt(),containsOnlyIterable(),containsOnlyNumeric(),containsOnlyObject(),containsOnlyResource(),containsOnlyClosedResource(),containsOnlyScalar(), orcontainsOnlyString()instead)How to install or update PHPUnit
v11.4.4: PHPUnit 11.4.4Compare Source
Fixed
ignoreIndirectDeprecations=truesuppresses deprecations triggered in test codeHow to install or update PHPUnit
v11.4.3: PHPUnit 11.4.3Compare Source
Changed
assertGreaterThan(),assertGreaterThanOrEqual(),assertLessThan(), andassertLessThanOrEqual()Fixed
How to install or update PHPUnit
v11.4.2: PHPUnit 11.4.2Compare Source
Changed
Fixed
How to install or update PHPUnit
v11.4.1: PHPUnit 11.4.1Compare Source
Changed
StringMatchesFormatDescriptionconstraint to be consistent with PHP'srun-tests.phpFixed
E_DEPRECATEDissuesHow to install or update PHPUnit
v11.4.0: PHPUnit 11.4.0Compare Source
Changed
#[RequiresPhpunitExtension]attributevendor/phpunit/phpunit/phpunit.xsd(instead ofhttps://schema.phpunit.de/X.Y/phpunit.xsd) when PHPUnit was installed using Composer andphpunit --generate-configurationwas invoked in the directory wherevendoris located--migrate-configurationcommand no longer replacesvendor/phpunit/phpunit/phpunit.xsdwithhttps://schema.phpunit.de/X.Y/phpunit.xsd--list-groupsnow shows how many tests a group contains--list-suitesnow shows how many tests a test suite containsDeprecated
includeUncoveredFilesconfiguration option#[CoversTrait]and#[UsesTrait]attributes#[CoversMethod]and#[UsesMethod]attributes (and respective annotations)How to install or update PHPUnit
v11.3.6: PHPUnit 11.3.6Compare Source
Changed
E_STRICTconstant in PHP 8.4Fixed
trim()med when it contains$characterHow to install or update PHPUnit
v11.3.5: PHPUnit 11.3.5Compare Source
Fixed
staticreturn type declaration is not properly initializednameproperty on<testsuites>element in JUnit XML logfileCallbackthrows aTypeErrorwhen checking acallablehas variadic parametersHow to install or update PHPUnit
v11.3.4: PHPUnit 11.3.4Compare Source
Fixed
assertJsonStringEqualsJsonString()considers objects with sequential numeric keys equal to be arraysCallbackconstraint does not handle variadic arguments correctly when used for mock object expectations$at the beginning gets truncated when used with a data providerdefaultgroupHow to install or update PHPUnit
v11.3.3: PHPUnit 11.3.3Compare Source
Added
failOnPhpunitDeprecationattribute on the<phpunit>element of the XML configuration file and--fail-on-phpunit-deprecationCLI option for controlling whether PHPUnit deprecations should be considered when determining the test runner's shell exit code (default: do not consider)displayDetailsOnPhpunitDeprecationsattribute on the<phpunit>element of the XML configuration file and--display-phpunit-deprecationsCLI option for controlling whether details on PHPUnit deprecations should be displayed (default: do not display)Changed
--fail-on-phpunit-deprecationCLI option or thefailOnPhpunitDeprecation="true"attribute on the<phpunit>element of the XML configuration file.--display-phpunit-deprecationsCLI option or thedisplayDetailsOnPhpunitDeprecationsattribute on the<phpunit>element of the XML configuration file.How to install or update PHPUnit
v11.3.2: PHPUnit 11.3.2Compare Source
Changed
nameproperty on<testsuites>element in JUnit XML logfile.phpstorm.meta.phpfile as methods such asTestCase::createStub()use generics / template types for their return types and PhpStorm, for example, uses that informationFixed
@operatorHow to install or update PHPUnit
v11.3.1: PHPUnit 11.3.1Compare Source
Changed
How to install or update PHPUnit
v11.3.0: PHPUnit 11.3.0Compare Source
Added
shortenArraysForExportThresholdattribute on the<phpunit>element of the XML configuration file to limit the export of arrays to a specified number of elements (default:0/ do not limit the export of arrays)--extensionCLI option to register a test runner extensionChanged
--generate-configurationnow limits the export of arrays to 10 elements in order to improve performanceHow to install or update PHPUnit
v11.2.9: PHPUnit 11.2.9Compare Source
Fixed
--list-testsand--list-tests-xmlCLI options do not report error when data provider method throws exceptionHow to install or update PHPUnit
v11.2.8: PHPUnit 11.2.8Compare Source
Fixed
Test\Passedevent is not emitted for PHPT tests--coverage-filterCLI option could not be used multiple timesHow to install or update PHPUnit
v11.2.7: PHPUnit 11.2.7Compare Source
Changed
--prefer-lowestCLI option also get recent versions)Fixed
phpunit.xmlare not handled correctly when--generate-configurationis usedHow to install or update PHPUnit
v11.2.6: PHPUnit 11.2.6Compare Source
Changed
How to install or update PHPUnit
v11.2.5: PHPUnit 11.2.5Compare Source
Changed
array_pop()instead ofarray_shift()for processingTestobjects inTestSuite::run()and optimizeTestSuite::isEmpty()How to install or update PHPUnit
v11.2.4: PHPUnit 11.2.4Compare Source
Changed
TestCaseobjects early that use a data providerHow to install or update PHPUnit
v11.2.3: PHPUnit 11.2.3Compare Source
Changed
debug_backtrace()How to install or update PHPUnit
v11.2.2: PHPUnit 11.2.2Compare Source
Changed
TestCaseobject after its test was runFixed
How to install or update PHPUnit
v11.2.1: PHPUnit 11.2.1Compare Source
Fixed
cacheDirectoryattribute from<coverage>element when migrating from PHPUnit 11.1 to PHPUnit 11.2How to install or update PHPUnit
v11.2.0: PHPUnit 11.2.0Compare Source
Added
#[CoversTrait]and#[UsesTrait]attributesreadonlyclassesassertObjectNotEquals()Deprecated
#[CoversClass]and#[UsesClass]attributesHow to install or update PHPUnit
v11.1.3: PHPUnit 11.1.3Compare Source
Fixed
How to install or update PHPUnit
v11.1.2: PHPUnit 11.1.2Compare Source
Fixed
@testWithannotation may generatePHP Warning: Uninitialized string offset 0#[CoversMethod]attribute is not considered for risky test checkHow to install or update PHPUnit
v11.1.1: PHPUnit 11.1.1Compare Source
Fixed
#[CoversClass]and#[UsesClass]attributes can no longer target traitsHow to install or update PHPUnit
v11.1.0: PHPUnit 11.1.0Compare Source
Added
#[DisableReturnValueGenerationForTestDoubles]attribute for disabling return value generation for test doubles created usingcreateMock(),createMockForIntersectionOfInterfaces(),createPartialMock(),createStub(), andcreateStubForIntersectionOfInterfaces()#[CoversMethod]and#[UsesMethod]attributes for more fine-grained code coverage targeting--filter,--exclude-filter,--group, and--exclude-groupwhen listing tests using--list-testsand--list-tests-xmlas well as listing groups with--list-groups#[CoversClass]and#[UsesClass]attributes--only-summary-for-coverage-textCLI option to reduce the code coverage report in text format to a summary--show-uncovered-for-coverage-textCLI option to expand the code coverage report in text format to include a list of uncovered filesChanged
--generate-configurationnow generates<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true">instead of<source restrictDeprecations="true" restrictNotices="true" restrictWarnings="true">--group,--exclude-group,--covers,--uses, and--test-suffixCLI options to be used multiple timesPHPUnit\Framework\TestCase::__construct()is now annotated to be final in preparation for declaring itfinalin PHPUnit 12DeprecationTriggered,ErrorTriggered,NoticeTriggered,PhpDeprecationTriggered,PhpNoticeTriggered,PhpWarningTriggered, andWarningTriggeredevents are represented as textDeprecated
restrictDeprecationsattribute on the<source>element of the XML configuration file is now deprecated in favor of theignoreSelfDeprecations,ignoreDirectDeprecations, andignoreIndirectDeprecationsattributes--group,--exclude-group,--covers,--uses, and--test-suffixCLI optionsHow to install or update PHPUnit
v11.0.10: PHPUnit 11.0.10Compare Source
Changed
PHPUnitPHARinstead of justPHPUnitfor the PHAR distribution of PHPUnitHow to install or update PHPUnit
v11.0.9: PHPUnit 11.0.9Compare Source
Changed
proc_open()if not really neededFixed
How to install or update PHPUnit
v11.0.8: PHPUnit 11.0.8Compare Source
Fixed
How to install or update PHPUnit
v11.0.7: PHPUnit 11.0.7Compare Source
Changed
Groups::groups()NamePrettifier::prettifyTestMethodName()NamePrettifier::prettifyTestMethodName()once againFixed
How to install or update PHPUnit
v11.0.6: PHPUnit 11.0.6Compare Source
Changed
NamePrettifier::prettifyTestMethodName()NamePrettifier::prettifyTestMethodName()TestRunner::runTestWithTimeout()Telemetry\System::snapshot()ExecutionOrderDependency::getTarget()callNamePrettifier::prettifyTestMethodName()Fixed
assertArrayIsIdenticalToArrayOnlyConsideringListOfKeys()does not correctly handle array order-dCLI option multiple times triggers warningHow to install or update PHPUnit
v11.0.5: PHPUnit 11.0.5Compare Source
Fixed
HRTime::duration()throwsInvalidArgumentException--exclude-filterCLI option does not workHow to install or update PHPUnit
v11.0.4Compare Source
v11.0.3Compare Source
v11.0.2Compare Source
v11.0.1Compare Source
v11.0.0Compare Source
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.
⚠️ Artifact update problem
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below:
File name: composer.lock
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.