PHPUnit 12.5 Released with New CLI Options and Testing Enhancements

PHPUnit 12.5 Released with New CLI Options and Testing Enhancements

PHPUnit 12.5 has been officially released, delivering new features and improvements aimed at enhancing PHP developers’ testing workflows. The update brings added flexibility, clearer reporting, and smarter test handling for projects of all sizes.

The 12.5 release introduces a new --all CLI option that lets users bypass XML configuration filters to run the entire test suite — particularly useful in large projects needing full coverage. The update also makes the <source> elements in XML code‑coverage reports optional, simplifying configurations when source paths are dynamic or complex.

For exception handling, PHPUnit now allows Throwable instances with expectExceptionObject(), widening compatibility with PHP’s error-handling system. Additionally, the framework will now issue a notice when a test method creates a mock object without setting any expectations, helping developers identify and rectify incomplete or misconfigured tests early.

The full changelog reflects 33 commits since the previous release. Developers can consult the official release notes and documentation for installation or upgrade instructions.

A detailed analysis of PHPUnit 12.5’s changes will be published on the maintainer’s blog on January 2, 2026. Subscribers get early access to insights and previews of PHPUnit 13.0, expected in February 2026.

Review the complete changelog and download PHPUnit 12.5 here: PHPUnit 12.5 Release Page.

Source: LinkedIn post by Sebastian Bergmann.

Disclosure: This content is produced with the assistance of AI.

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please reach out to us at #thedroptimes channel on Drupal Slack and we will try to address the issue as best we can.

Related Organizations

Related People

Upcoming Events

Latest Opportunities