PHPUnit 13.4.0 changes and deprecations
PHPUnit 13.4.0 was tagged on 2 October 2026. Packagist metadata for the release requires
PHP >=8.4.1. This is a feature release of the 13.x line, not a new major version.
Additions
- A
--timeoutCLI option limits the wall-clock time of the whole test run, including bootstrapping. A PHP Foundation post by the PHPUnit maintainer says that when the limit is reached no more tests start, logs and the result are still written, and the exit code is 124 (as with GNUtimeout). With pcntl, a running test is aborted and reported as an error with a stack trace. --coverage-jsonl(and a<jsonl>configuration element) writes a JSON Lines coverage report that lists uncovered code rather than every executable line.- A
#[RequiresClass]attribute skips a test when a class does not exist. - Tests can be ordered by source-file modification time, and selected when they belong to all of several groups. Mock objects can record the order in which their methods are invoked.
requireCoverageMetadataOnSmallTests,…OnMediumTestsand…OnLargeTestsconfiguration attributes take precedence overrequireCoverageMetadata.- A
ChildProcessExtensioninterface lets extensions bootstrap inside process-isolated tests.
Behavior change
Output printed by a test now appears in the compact output as a --- OUTPUT: record attributed
to that test, unless the run already reports such output as risky.
Deprecations aimed at PHPUnit 14
The notes deprecate writing defects before the order in --order-by/executionOrder
("which will change meaning in PHPUnit 14"), the depends/no-depends order values,
configuring more than one order, and unknown executionOrder values. Class-level #[Group],
#[Ticket], #[Small], #[Medium] and #[Large] on parent classes of test classes are also
deprecated, as are Constraint::failureDescriptionInContext() and LogicalNot::negate().
Fixes
Fixes concern process isolation: baseline-listed issues were not ignored in separate processes,
unserializable results (for example an object holding a test double) aborted the run, and
#[DataProviderClosure] tests errored.
Limitations: this page paraphrases the release notes; it does not test the behavior. Check the tagged notes before relying on a specific option. Related: PHPUnit 13.3.6, package signals.