PHPUnit 13.1 introduces several notable features. The new `#[DataProviderClosure]` attribute (requiring PHP 8.5+) lets you define data providers as inline static closures instead of referencing separate methods by name. Open Test Reporting (OTR) XML logfiles now capture unexpected test output, deprecation/notice/warning issues with structured metadata, and test group information. Custom issue trigger resolvers allow frameworks like Symfony to correctly attribute deprecations triggered by infrastructure code such as DebugClassLoader. The release also ships with php-code-coverage 14.0, which uses relative paths in serialised coverage data, and PHPCOV 13.0, which supports merging coverage files across different machines and CI environments. HTML coverage reports gain a new colour-blind-friendly palette with customisation support.

5m read timeFrom phpunit.expert
Post cover image
Table of contents
Data providers meet closuresRicher Open Test ReportingCustom issue trigger resolversCode Coverage and PHPCOVExclusive insights delivered to your inbox

Sort: