All notable changes of the PHPUnit 13.2 release series are documented in this file using the Keep a CHANGELOG principles.
13.2.0 - 2026-06-05
- #3387: Specify a list of tests to run
- #4201: Handle interrupts and display current test results
- #4501: Option to mark test as risky when it does not contribute to code coverage
- #5757: Add assertions for ignoring whitespace differences in strings
- #5810: Do not dump arrays and objects in failure messages of
IsTrue,IsFalse,IsNull,IsFinite,IsInfinite, andIsNanconstraints - #5838: Inherit
#[RunTestsInSeparateProcesses]from parent test classes - #5922:
assertContainsEquals()should usesebastian/comparatorfor element comparison - #6000: Report PHPT test as risky when
--SKIPIF--does not have standard-output side-effect - #6075: Support test execution order sorted by descending duration
- #6346: Emit warning when conflicting CLI options are used
- #6534: Make
$_dataNameavailable to#[TestDoxFormatter]callbacks - #6559: Improved API for exception message expectations
- #6565: Optional
$skipWhenEmptyparameter for#[DataProvider]and#[DataProviderExternal] - #6566: Allow
--stop-on-defect,--stop-on-error, etc. to accept an optional threshold - #6567: Make diff context lines configurable
- #6574: Improve
willReturnMap()with constraint support and strict matching - #6575:
--list-test-idsCLI option and enhance--filterCLI option to support test ID syntax - #6577:
--run-test-id <test-id>CLI option that accepts a single test ID for exact matching - #6579: Properly handle issues triggered outside of tests
- #6597: Compact output (activated through
--compactCLI option andPHPUNIT_COMPACT_OUTPUT=1environment variable) - The
executionOrderattribute 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 PHPUnit- 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 randomized
- #5873: Chain previously registered error handler instead of silently disabling PHPUnit's error handling
- #6535: Use
sebastian/file-filterinSourceFilter::includes()for issue trigger identification - #6581: Allow
#[IgnoreDeprecations]to be repeated - 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)
- #6075:
--order-by durationCLI option, use--order-by duration-ascendinginstead - #6075:
--order-by sizeCLI option, use--order-by size-ascendinginstead - #6075:
executionOrder="duration"XML configuration attribute value, useexecutionOrder="duration-ascending"instead - #6075:
executionOrder="size"XML configuration attribute value, useexecutionOrder="size-ascending"instead - #6560: Soft-deprecate
expectExceptionMessage(), useexpectExceptionMessageIsOrContains()instead