Repository navigation
v2.1.0
Consumer-driven additions (Wave 3); no BC breaks, seed sequences of existing
generators are unchanged.
- Add
Classify::cover($condition, $label, $minPercent): a coverage
requirement — the property fails with the newCoverageViolationException
when the label occurs in fewer than$minPercentof passing runs, making
vacuous passes a CI failure instead of a printed hint. - Add
Gen::stringFrom($alphabet, $min, $max)(CharsetStringArbitrary):
strings over a fixed (possibly multibyte) alphabet; shrinks by length, then
each character toward the first alphabet character. - Add
Gen::bytes($min, $max)(BytesArbitrary): raw byte strings for
parsers/codecs; shrinks by length, then each byte toward"\x00". - Add
Gen::enum(SomeEnum::class): one enum case, shrinking toward
earlier-declared cases. - Add
Gen::uniqueArrayOf($element, $min, $max)(UniqueArrayArbitrary):
lists of pairwise-distinct elements; shrinking preserves distinctness. - Add
Gen::intRange($min, $max): ordered pairs[lo, hi]withlo <= hi
built onflatMap, replacingAssume::that()discards for intervals. - Add
Gen::floatSpecial(): opt-inNAN/±INF/-0.0/representation-edge
floats (the defaultfloat()/floatBetween()stay finite and in range). - Add
Gen::recursive($leaf, $wrap, $maxDepth): bounded recursive structures
built by lifting the previous level's arbitrary. - Add
Gen::sampleShrinks(): generate one value and list its first shrink
candidates — a debugging aid for custom arbitraries. - Add optional size bounds to
Gen::arrayOf(),Gen::nonEmptyArrayOf()and
Gen::dictOf(). - Honour
PROPERTY_VERBOSEto log every run's generated arguments.