Repository navigation
v0.2.0
-
Added the 0.2 run knobs, as fluent setters and as environment variables:
shrink()/shrinkBudgetMs()(report a counterexample as generated, or bound
the descent),phases()(PROPERTY_PHASES),derandomize()
(PROPERTY_DERANDOMIZE) andpath()(PROPERTY_PATH, replaying a recorded
shrink descent instead of searching for it again). Precedence follows one
rule, now stated in the README: the environment dials the suite and wins for
PROPERTY_RUNS/PROPERTY_PHASES/PROPERTY_DERANDOMIZE, while the code pins
the property and wins forseed()/path(). -
A property whose id was derived from a closure now says so on stderr, through
the channel that already carries the excessive-discard warning. Such an id
keys the regression corpus by something that moves —{closure}on PHP 8.3
collapses every closure of a class onto one key, and{closure:file:line}
from 8.4 moves when a line is inserted above.id()is the fix. -
Requires
rasuvaeff/property-testing-core^0.2. The knobs above are
0.2 engine fields; there is no version of this adapter that offers them
against core 0.1. -
Added
PropertyCheck::id(): names the property, replacing the id derived
from the calling method. The string is used verbatim — as the
regression-corpus key, as the id on every event, and as the property's
display name. It exists for the case the derived id cannot serve: a
forAll()called from a closure, where PHP has no stable name to derive
from. On PHP 8.3 every closure of a class is{closure}, so two properties
in one file share a corpus key and overwrite each other's counterexample;
from 8.4 the name carries a line number, so an edit above the property
orphans yesterday's entry. Neither throws — the corpus simply stops
replaying. Pest'sit()/test()bodies are the common source of both.