Skip to content

Releases: rasuvaeff/property-testing-phpunit

v1.1.0

Choose a tag to compare

@github-actions github-actions released this 02 Oct 19:54
6231af0
  • Added: generators written on the closure's parameters with core's
    #[Generate] (#61). Without auto(), the forAll() map and the
    attributes together have to cover every parameter — the map may be empty;
    under auto() the attributes sit between the map and the @param type.
    Requires rasuvaeff/property-testing-core ^1.2.
  • Changed: without auto(), a parameter neither the map nor #[Generate]
    covers is refused naming the function and the parameter, instead of the
    engine's No generator for parameter "x".
  • Docs: the READMEs and llms.txt now state what follows from driving the
    engine through a single PHPUnit test method: setUp()/tearDown() and
    #[Before]/#[After] run once per property rather than per run, test-double
    expectations are verified after the last run (an unmet once() fails the
    property as a whole and is never shrunk), and per-test coverage counts lines
    reached only while shrinking. The Testo adapter does not share the first one.

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 20 Sep 09:05
e286bf8

The stability release, in step with rasuvaeff/property-testing-core 1.0.0.
The adapter's surface is that of 0.10.0, unchanged: the PropertyTesting
trait, the forAll() chain with its knobs, PropertyCheck, the listeners
and the environment table. A project on ^0.10 upgrades by widening the
constraint to ^1.0.

  • Requires rasuvaeff/property-testing-core ^1.0 (compatibility policy
    §8: a caret on the engine's current major).
  • Docs: the footnotes that dated a behaviour to a core 0.x release
    (since core 0.9, core 0.9 reads only …) are gone from the READMEs,
    llms.txt and AGENTS.md; llms.txt names the current requirement.

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 20 Sep 03:50
430b9a1
  • Added: the core 0.12 knobs on the chain — exhaustive() /
    exhaustiveBudget() (walk the parameter domain instead of sampling it),
    flakyReplays() (re-execute the minimised counterexample; a passing replay
    is reported as flaky) and searchRuns() (targeted search after the random
    phase for a body that calls Target::maximize()/minimize()); each
    validates at the call, naming the property, like the other setters.
  • Added: PROPERTY_EXHAUSTIVE (a flag) and PROPERTY_SEARCH_RUNS (a
    non-negative integer, 0 switches the search off) dial the suite, the way
    PROPERTY_DERANDOMIZE and PROPERTY_RUNS do.
  • Added: every Classify::tabulate() table with its pairwise
    intersections, the exhaustive outcome (walked, on stdout; declined and why,
    on stderr) and the search report are printed beside the distribution line;
    PROPERTY_VERBOSE logs every TargetImproved event.
  • Requires rasuvaeff/property-testing-core ^0.12.

v0.9.2

Choose a tag to compare

@github-actions github-actions released this 19 Sep 16:59
385b0a3
  • Fixed. A wide throws() swallowed a failed assertion: PHPUnit's
    AssertionFailedError extends \RuntimeException, so
    ->throws(\RuntimeException::class) — or \Exception, \Throwable —
    matched a failing assertSame() in the body and the property passed on a
    falsified body, the T-1 of 0.9.0 on the new knob. throws() refuses a
    class the assertion failure is an instance of, naming why; the executor
    never takes an assertion failure for the expected throw, whatever class
    was named (#54).

v0.9.1

Choose a tag to compare

@github-actions github-actions released this 19 Sep 11:18
8c63887
  • Changed. Accepts rasuvaeff/property-testing-core ^0.11 alongside ^0.9/^0.10. Nothing in 0.11.0 reaches this package: the release is additive (the PropertyTestingException marker, AssumptionSkipped promoted to @api, Gen::stringOf() defaults, docblock reading in Gen::forClass()), and the suite is green against it unchanged.

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 18 Sep 19:25
2911981
  • check() validates the forAll() map before the engine runs, and both
    checks are behaviour changes for a suite that relied on the silence: a
    value that is not an ArbitraryInterface is rejected with
    Property "<name>": forAll() expects array<string, ArbitraryInterface>, got int for key "x"
    instead of failing inside the runner as a method call on a non-object with
    neither the key nor the property in the message; and a key that is not a
    parameter of the closure is rejected with or without auto() — before,
    only auto() checked it and a typoed entry ran green in whatever domain
    the real parameter had (#49). Message shapes follow the Testo adapter's.
  • Every outcome of a property registers one assertion on the running
    TestCase, not only a pass: a falsified property whose body performed no
    PHPUnit assertion was reported twice, as Failed and as Risky ("This test
    did not perform any assertions"). A property whose every run was skipped
    still registers none — that test is skipped, not checked (#50).
  • The chain validates at the setters, naming the property: runs(0) throws
    Property "<name>": runs must be greater than or equal to 1 at the call,
    and so do maxShrinks/maxDiscards below 0 and
    timeoutMs/budgetMs/shrinkBudgetMs below 1. A path() or
    PROPERTY_PATH without a seed() or PROPERTY_SEED is refused by
    check() the same way (path() and seed() may come in either order, so
    the setter cannot). The engine used to reject the same values with the
    same bounds, but without saying which property.
  • The distribution report, the discard warning and the unstable-id warnings
    are written as "\n" . $line . "\n": PHPUnit prints its progress dots on
    the same terminal, and a line that started where the cursor was ended up
    glued to ....F... The line content is unchanged and still byte-identical
    to the Testo adapter's; the leading newline is a PHPUnit-only asymmetry
    recorded in AGENTS.md. The VerboseListener trace is untouched.
  • Documentation catches up with core 0.10 (README ×2, llms.txt,
    AGENTS.md): PROPERTY_VERBOSE/PROPERTY_DERANDOMIZE are off on 0,
    false, off, no (case-insensitive, trimmed), not only on ''/0;
    GenerationExhausted is GenerationExhaustedException; auto() no
    longer claims to require core ^0.5. EnvironmentParityTest pins the
    off words (skipped under core 0.9, where only ''/0 are off).
  • psalm.xml lists TestCase::dataName() next to TestCase::name(); the
    comment records that Psalm 6.17 resolves neither call from inside the
    trait, so both entries document the boundary rather than silence anything.

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 10 Sep 07:28
b21c4d6
  • Added PropertyCheck::throws(string $exceptionClass): the property-level
    replacement for expectException(), which cannot see a throw from inside a
    check() closure. Every trial must throw the class (a subclass matches); a
    trial that returns normally fails with "Expected <class> to be thrown, but
    it was not" and shrinks like any other counterexample, a foreign class is
    that trial's failure. Skips and Assume::that() discards keep their own
    meaning. A class string that is not a Throwable is rejected with
    InvalidArgumentException at the throws() call.
  • Accepts rasuvaeff/property-testing-core ^0.10 alongside ^0.9.
  • Documentation catches up with core 0.9 and 0.10, from the family's 1.0
    review: a partly skipped property spends a separate budget rather than
    counting against maxDiscards (README ×2), and maxDiscards() caps both
    budgets when set while leaving them different when unset (fluent-chain table
    ×2). output() leaves that table — the section below it already calls the
    method @internal, and a public table listing it contradicted that inside
    one document.
  • AGENTS.md says four types rather than three (PhpUnitTrialExecutor has
    shipped since 0.6.0), names that executor rather than core's
    CallableTrialExecutor as the one running the closure, and no longer routes
    the corpus through CorpusFromEnv::resolve() — a class this package removed
    in 0.6.0.
  • psalm.xml no longer enables ext-redis and composer-require-checker.json
    no longer whitelists Predis\Client and Redis. Both were left over from
    0.6, when this package parsed the DSN itself; neither src/ file has
    mentioned Redis since. .gitattributes drops export-ignore entries for
    /docs, /benchmarks and /ROADMAP.md, none of which exist here.
  • composer rector is green again: the unused variable in
    EnvironmentParityTest's catch is gone, as RemoveUnusedVariableInCatchRector
    asks. It had been red since that test was written, which is composer release-check red — composer build does not run rector.

v0.7.1

Choose a tag to compare

@github-actions github-actions released this 05 Sep 09:22
263a85a
  • Requires rasuvaeff/property-testing-core ^0.9, where an environmental skip
    no longer spends the discard budget and is counted apart from discards. The
    excessive-discard warning this adapter prints therefore stops firing on a
    machine that was merely missing a dependency, without a change here. ^0.8 is
    not kept alongside: the family moves together, and an adapter accepting both
    is what left -names unable to install beside one.

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 04 Sep 17:41
692dd9a
  • An environmental skip (markTestSkipped(), markTestIncomplete()) is
    reported to the engine as TrialOutcome::skipped() rather than as a plain
    discard, so a recorded regression whose replay only skipped is kept instead
    of pruned. A machine without the dependency the body guards against used to
    delete the counterexample for every machine that has it. Requires
    rasuvaeff/property-testing-core ^0.8.

v0.6.3

Choose a tag to compare

@github-actions github-actions released this 04 Sep 15:55
f80ddf1
  • Allows rasuvaeff/property-testing-core ^0.7.
  • The discard warning is printed before the distribution line, matching the
    Testo adapter; the two emitted the same pair in opposite orders.
  • PropertyCheck::clock() — an internal seam, mirroring the Testo adapter, that
    makes the timeoutMs and budgetMs branches testable without real waiting.
  • The id() documentation is attached to id() again; it had drifted onto
    currentId(), leaving both methods undocumented.