API overview
This page maps every @api-tagged type in src/ — the actual public contract, taken from a reflection pass (docs/scripts/reflect-api.php), not from what the README happens to mention. Every class name links to a generated reference page (docs/scripts/generate-api.mjs) listing its public properties and method signatures straight from that same reflection pass.
Where to start
| Type | Role |
|---|---|
Property | The #[Property] attribute — runs, seed, generators, maxShrinks, examples, maxDiscards, timeoutMs, budgetMs. |
Gen | Static factory for every built-in generator — see the generators overview. |
Assume | Assume::that(bool) — discard the current attempt. |
ArbitraryInterface | Implement this to write a custom generator. |
Shrinkable | Value + lazy shrink tree — leaf(), of(), map(). See Shrinking. |
CounterExample | The falsified run's data — toArray(), toJson(), toExamplesCode(). |
Classify | label(), when(), cover() — see Distribution. |
State machine testing
| Type | Role |
|---|---|
Command | Interface: preCondition/nextState/run/postCondition + \Stringable. |
CommandSequence | The generated, shrinkable sequence of commands. |
StateMachine | StateMachine::check() — runs a sequence against a fresh system. |
Failures
Every exception this package throws, with its actual readonly fields and getters (not just a name-drop): Exceptions reference.
Public, but not where you start
Two @api members exist for narrower, more advanced use than "write a #[Property] test":
Random::__construct(int $seed)— build aRandomby hand to exercise a customArbitraryInterfacein isolation, outside of a running property. Inside a property,Randomis always injected by the runner.Classify::beginRun()/flushRun()/flushRequirements()— the runner-lifecycle hooksPropertyInterceptorcalls to reset and drain the per-run distribution buffer. Public because the interceptor lives in a different namespace (Internal\), not because test code is expected to call them.
AssumptionSkipped is deliberately absent from this map — it's public but not @api; see the note at the bottom of the exceptions reference.
This page and Exceptions are checked against a live reflection snapshot of src/, not hand-maintained from memory — see issue #29 for the gaps this closed.