Skip to content

v1.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 03 Nov 19:55
· 1 commit to master since this release
39a17fa
  • Added: Gen::naughtyString() — whole string values known to break
    text-handling code, drawn from a curated list kept in the package (#172, after
    BlackBox's Set::strings()->unsafe()): empty and whitespace-only strings, a
    trailing newline ("a\n" passes /^[a-z]+$/), NUL and control bytes,
    numeric-looking text, "null"/"true", quotes and escapes, SQL, markup,
    template, format-string, shell and header injection shapes, path traversal,
    Unicode normalisation, case-mapping, direction and homoglyph traps, invalid
    UTF-8, and lengths past common limits. A failing value shrinks through the
    entries listed before it; the generator is Enumerable, so exhaustive: true
    checks every entry.
  • Added: Gen::mixed() — a value of any PHP type, for properties about
    code that takes mixed and must narrow it without a TypeError (#173, after
    BlackBox's Set::type()): null, booleans, ints, floats including NAN,
    ±INF and -0.0, Unicode strings, DateTimeImmutable, and lists, string-
    and int-keyed arrays, stdClass and ArrayObject nested up to $maxDepth.
    A value shrinks to null, false, 0, '' and [] first. Closures,
    anonymous classes, resources and enums are left out; a counterexample holding
    an object is stored in the corpus as a seed entry. Gen::forParameters()
    keeps refusing a mixed parameter.
  • Changed: Gen::string(), Gen::stringAscii(), Gen::stringOf() and
    Gen::char() are boundary-biased like the numeric generators: about one draw
    in ten is '', ' ', '0', and for the Unicode generators "\n", "a\n" or
    a decomposed é, whichever fit the length range. EdgeCases::None turns it
    off. Gen::stringFrom() and Gen::bytes() are unchanged.
  • Changed: what a given seed generates through the string generators —
    and every generator built on them, Gen::forClass()/forParameters() string
    parameters included — has shifted (compatibility policy §2).
    FilesystemCorpus::SEQUENCE_EPOCH is now 3: seed entries recorded under
    epoch 2 are dropped on recall, values entries keep replaying.