The notification subscriber still works when pcntl_fork()
is
unavailable. Forking only makes notification delivery less blocking on
platforms that support it.
PHPUnit Extension
The packaged phpunit.xml
is intentionally opinionated. Besides enabling
strict PHPUnit flags, it registers
FastForward\DevTools\PhpUnit\Runner\Extension\DevToolsExtension
and
Ergebnis\PHPUnit\AgentReporter\Extension
.
Runtime Chain
FastForward\DevTools\PhpUnit\Runner\Extension\DevToolsExtensionregisters a tracer and two subscribers with PHPUnit.FastForward\DevTools\PhpUnit\Event\TestSuite\ByPassfinalsStartedSubscriberenablesDG\BypassFinalsat suite start.FastForward\DevTools\PhpUnit\Event\EventTracerrecords the events emitted during the run.FastForward\DevTools\PhpUnit\Event\TestSuite\JoliNotifExecutionFinishedSubscriberbuilds a summary notification and sends it when the run finishes.Ergebnis\PHPUnit\AgentReporter\Extensionreplaces PHPUnit's normal output with a compact JSON report when an agent runtime is detected.- In structured DevTools runs,
testsforces the same reporter path for the PHPUnit subprocess so the final nested payload remains deterministic even when the surrounding process would not naturally look agent-driven.
Why This Helps Consumer Projects
- tests can double final classes and final methods when the test environment needs it;
- developers get a quick desktop summary without reading the full terminal scrollback;
- agent-driven runs consume far less terminal context while still keeping failure details and PHPUnit exit semantics intact;
- DevTools can preserve a single top-level JSON document while nesting the
compact PHPUnit summary under
context.outputfor bot-friendly parsing; - event counts are available to the notification layer without adding ad-hoc test code.
What to Remember When Overriding phpunit.xml
If a consumer project replaces the packaged phpunit.xml
, it also replaces
these extensions unless it re-registers them manually. That is usually fine,
but it explains why notifications, BypassFinals behavior, or compact
agent-oriented output may disappear after a local override.