0.3.1
Documentation and diagnostics release for the PHPUnit 8/9 maintenance series, mirroring 1.1.1. Supported versions
are unchanged (PHPUnit ~8.0 / ~9.0 on PHP >= 7.2), and no test needs changing.
Upgrade note. A run whose phpunit.xml does not register CounitExtension now prints one notice line on
STDERR. Exit codes are untouched, and COUNIT_SILENCE_TEARDOWN_NOTICE=1 silences it alongside counit's other
notices.
Added
- A missing
CounitExtensionregistration is announced instead of quietly invalidating the run. The extension
is what waits for every coroutine to drain before PHPUnit takes its summary; without it nothing does, so the run
reports a time that can understate the truth by orders of magnitude and assertion totals that are neither correct
nor consistent between a full run and the same tests run in isolation — while exiting 0 and looking entirely
healthy. The run's first coroutine now writes a notice to STDERR naming the omission, what it costs, and the
<extensions><extension class="Deminy\Counit\CounitExtension"/></extensions>element that fixes it. PHPUnit 8/9
have no extensionbootstrap()method, so registration is observed through theBeforeFirstTestHookthis class
already implements — PHPUnit calls it for every registered extension before the first test — which no
configuration shape can register the extension without firing; a run without Swoole, or a suite that creates no
coroutine, stays quiet. Verified on PHPUnit 9.6.36 and on 8.0.6, the matrix floor. (d2742ec)
Changes
CounitExtensionis documented as required, not optional. README.md listed registering it under "Optional
steps" anddocs/compatibility.mdnever mentioned it at all, though nearly every
guarantee in that matrix depends on it. Both now say so, and both record
that the registration element differs by release line —<extension class>on PHPUnit 8/9 (counit^0.3) versus
<bootstrap class>on PHPUnit 10+ (counit^1.1), since the class implements different interfaces on each — so
a snippet copied across lines fails silently. The class docblock carries the snippet too, for anyone arriving
from a stack trace rather than the README. (9e01e12)- The install instructions point at the current releases. The documented constraint
~0.2.0reads as= 0.2.0 < 0.3.0, so anyone following the README pinned themselves to the previous line. It is now
^0.3, which
stops at the next 0.x minor — on a zero-major, where a breaking change may land, and the opt-in boundary 0.3.0's
behavioral changes want; the table's 1.x rows become^1.1in step. The branch note is corrected as well: it
promised bug fixes and security updates only, which 0.3.0 was not — this line now takes the compatibility work
the 1.x line develops, back-ported where it applies. (8243c5c)
Full changelog: 0.3.0...0.3.1