All notable changes of the PHPUnit 12.5 release series are documented in this file using the Keep a CHANGELOG principles.
12.5.8 - 2026-01-27
- To prevent Poisoned Pipeline Execution (PPE) attacks using prepared
.coveragefiles in pull requests, a PHPT test will no longer be run if the temporary file for writing code coverage information already exists before the test runs
12.5.7 - 2026-01-24
- #6362: Manually instantiated test doubles are broken since PHPUnit 11.2
- #6470: Infinite recursion in
Count::getCountOf()for unusal implementations ofIteratororIteratorAggregate
12.5.6 - 2026-01-16
- Reverted a change that caused a build failure for the PHP project's nightly community job
12.5.5 - 2026-01-15
PHPUnit\Framework\MockObjectexceptions are now subtypes ofPHPUnit\Exception
- #6461:
any()matcher (soft deprecation)
- #6470: Mocking a class with a property hook setter accepting more types than the property results in a fatal error
12.5.4 - 2025-12-15
- The
#[AllowMockObjectsWithoutExpectations]attribute can now be used on the method level
- #6446: Test runner crashes with
Timer::start() has to be called before Timer::stop()
12.5.3 - 2025-12-11
- The message emitted when a test method creates a mock object but does not configure any expectations for it has been improved
12.5.2 - 2025-12-08
- Attribute
#[AllowMockObjectsWithoutExpectations]for excluding tests from the check that emits the notice for test methods that create a mock object but do not configure an expectation for it
12.5.1 - 2025-12-06
TestCase::getStubBuilder()(analogous toTestCase::getMockBuilder()) for creating (partial) test stubs using a fluent API
12.5.0 - 2025-12-05
- #6376:
--allCLI option to ignore test selection configured in XML configuration file - #6422: Make
<source>element in XML code coverage report optional
- #6380: Allow
ThrowableinexpectExceptionObject() - A PHPUnit notice is now emitted for test methods that create a mock object but do not configure an expectation for it