Skip to content

1.1.6

Latest

Choose a tag to compare

@deminy deminy released this 09 Nov 20:49
· 1 commit to master since this release
41847ae

Bug-fix release for the 1.x series: follows PHPUnit's changed after-test hook rules (12.5.43 / 13.4.6) and prepares for PHPUnit 13.5. Supported versions are unchanged (~12.5.24 on PHP >= 8.3, ~13.0 on PHP >= 8.4.1), and no test needs changing. Upgrade if your lock file resolves PHPUnit 12.5.43 / 13.4.6 or later: with 1.1.5, a skip or markTestIncomplete() in tearDown() / #[After] failed the test under Swoole, where PHPUnit now skips it.

Bug fixes

  • After-test hook outcomes match PHPUnit's current rules. PHPUnit changed how it treats a Throwable from tearDown() / #[After] twice in patch releases (12.5.40 / 13.4.3 and 12.5.43 / 13.4.6); counit now mirrors whichever rules the installed version applies, including PHPUnit 13.5's new deprecation for a skip or incomplete in an after-test hook. (3e90fbe, 3eccbab)
  • A test body that never yields leaves its after-test hooks to PHPUnit. Before, an expected exception could make counit drop a tearDown() failure (exit 0 where PHPUnit exits 1), and a joined test (a mock with expects(), an output expectation) ran tearDown() twice. Under PHPUnit's older rules, a hook error after a failed body no longer displaces the body's own failure. (3eccbab)
  • --timeout (PHPUnit 13.4+) works under Swoole. The time limit never fired; while it is set, the run is now serialized so PHPUnit sees each test's real end, announced by a counit notice: line. (469a28a)
  • Exceptions registered with registerFailureType() are reported as failures after a yield, not errors (exit code 1, <failure> in the JUnit report); a failed test is exempt from the "did not perform any assertions" check on exactly the PHPUnit releases that exempt it. (5b379a1)

Changes

  • docs/compatibility.md lists three remaining gaps for verdicts reached after a yield: TestDox output, requireCoverageMetadata's risky check, and onNotSuccessfulTest(). Summaries and exit codes are exact in all three. (489e457, b4d4962)

Full changelog: 1.1.5...1.1.6