PHPUnit 12.4 Boosts Developer Flexibility with Reusable Data Providers and Smarter Deprecation Handling
Sebastian Bergmann’s latest blog post introduces key updates in PHPUnit 12.4, aimed at giving developers more control and less friction when working with automated tests.
The release adds a long-requested feature, allowing tests to bypass validation that normally prevents data providers from supplying more values than a test method accepts. This makes it possible to reuse data providers across methods with different parameter counts—useful in scenarios like security testing, where different methods need subsets of the same data.
Another notable enhancement is the ability to use regular expressions with the #[IgnoreDeprecations] attribute, as implemented in pull request #6341. This allows developers to ignore only specific deprecation warnings rather than all of them, helping teams manage third-party deprecations while focusing on their own code quality.
PHPUnit 12.4 is fully compatible with PHP 8.5, which is scheduled for release on November 20, 2025. Sebastian has also started testing all supported PHPUnit versions (8 through 12) with nightly builds of PHP 8.6 in the CI pipeline.
With every feature release, Sebastian sends subscribers a comprehensive analysis of new capabilities, technical reasoning, and implementation insights. The newsletter content is later published on his site for public access.

