Skip to content

Releases: rasuvaeff/property-testing-testo

v1.2.0

Choose a tag to compare

@github-actions github-actions released this 08 Oct 12:35
c1e9fd5
  • Changed: Testo assertion and test-double expectations now run for every generated property input, so an unmet expectation identifies and shrinks the failing input. #[ExpectException] is evaluated per run. (#66)
  • Added: #[Property(failOn: ...)] converts selected PHP warnings, notices and deprecations into ErrorException failures for the generated input; the failure shrinks with that input, while @ suppression remains effective. (#67)

v1.1.0

Choose a tag to compare

@github-actions github-actions released this 02 Oct 19:54
93bd030
  • Added: generators written on the property's parameters with core's
    #[Generate] (#68). Without auto, the attributes alone are enough
    when they cover every parameter — no generators method needed — and they may
    share the parameters with a provider; under auto: true they sit between
    the provider and the @param type. Requires rasuvaeff/property-testing-core
    ^1.2.
  • Changed: without auto, a parameter neither the provider nor
    #[Generate] covers is refused naming the method and the parameter, instead
    of the engine's No generator for parameter "x".

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 20 Sep 09:05
0e741eb

The stability release, in step with rasuvaeff/property-testing-core 1.0.0.
The adapter's surface is that of 0.12.0, unchanged: #[Property] with its
knobs, PropertyInterceptor, TestoTrialExecutor, VerboseListener, the
environment table and the drop-in contract with the frozen
rasuvaeff/property-testing 2.8. A project on ^0.12 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, under core 0.9 …) are gone from the READMEs and
    llms.txt — every 1.0 install has the current behaviour.

v0.12.0

Choose a tag to compare

@github-actions github-actions released this 20 Sep 03:49
c618f33
  • Added: the core 0.12 knobs on #[Property] — 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()); the
    interceptor refuses an out-of-range value by name like the other knobs.
  • 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: the interceptor reports every Classify::tabulate() table with
    its pairwise intersections, whether exhaustive mode walked the domain (or
    why it sampled, as a warning), and the search report, beside the
    distribution line; PROPERTY_VERBOSE logs every TargetImproved event.
  • Requires rasuvaeff/property-testing-core ^0.12; the
    tests/Support/CoreCompat shim that spanned the 0.9–0.11 lines is gone.

v0.11.2

Choose a tag to compare

@github-actions github-actions released this 19 Sep 16:58
b3dfb5e
  • Fixed. A wide throws: swallowed a failed assertion: Testo's
    AssertionException and ExpectationFailed extend \LogicException, so
    throws: \LogicException::class — or \Exception, \Throwable —
    matched a failing Assert in the body and the property passed on a
    falsified body, the T-1 of 0.11.0 on the new knob. The interceptor
    refuses such a class when the property is set up, naming why; the
    executor never takes an assertion failure for the expected throw,
    whatever class was named (#61). testo/assert is a direct requirement,
    as the executor now reads its types.

v0.11.1

Choose a tag to compare

@github-actions github-actions released this 19 Sep 11:18
80e655f
  • 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.11.0

Choose a tag to compare

@github-actions github-actions released this 18 Sep 19:28
6d4ae4a
  • #[Property] combined with Testo's #[ExpectException] is refused as an
    error of the test (cannot be combined with #[ExpectException]; use throws: instead), the way a data provider already was. The expectation interceptor
    runs outside the property and sees only the aggregate
    PropertyViolationException — a RuntimeException — so
    #[ExpectException(\RuntimeException::class)] was satisfied by any
    falsification, a failed assertion included, and the test came back green
    (#56).
  • #[Property(throws: SomeException::class)], appended as the last
    parameter: the exception class every run must throw, with the PHPUnit
    adapter's PropertyCheck::throws() semantics — throwing it (or a subclass)
    passes the run, returning normally fails it with Expected <class> to be thrown, but it was not and shrinks the input, another class is that run's
    failure; a skip and an Assume::that() discard keep their meaning. The
    matching throw is recorded as an assertion, so a body that only throws is
    not reported as risky (#57).
  • A generators key that is not a parameter of the property is refused with or
    without auto: true; it used to be ignored silently without auto. A
    provider shared by two properties of different arity is therefore refused —
    give each property its own (#58).
  • The attribute is a data holder and the interceptor validates it. Testo
    instantiates #[Property] before the interceptor runs, so runs: 0, a
    negative cap, path without seed or generators: [Cls::class, 'missing']
    used to abort the pipeline (Error during test execution pipeline., reason
    in previous); they are now the test's own error, #[Property] on "<method>" cannot be set up: …. Property::$generators/$examples
    accordingly accept — and keep as written — a non-callable array, which
    widens their type from \Closure|string|null to
    \Closure|array|string|null; the attribute constructor no longer throws.
  • PropertyInterceptor::__construct(listeners:) is documented (README ×2,
    llms.txt) with the testo.php plugin recipe for attaching a
    PropertyListener, which the suite now executes end to end.
  • The environment table says what core 0.10 does: PROPERTY_VERBOSE and
    PROPERTY_DERANDOMIZE are off for false/off/no as well as ''/0
    (README ×2, llms.txt); the package AGENTS.md had it since 0.10.0.
  • examples/ are a Testo suite of their own: vendor/bin/testo --suite=Examples runs them (no documented command did before), the
    stateful example carries #[ExpectNoAssertions] instead of coming back
    risky, and property_test.php demonstrates throws:.
  • testo/testo is required as ^0.10.39; the || ^1.0 half promised
    compatibility with a major that has not been released.

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 12 Sep 18:31
3f27cb4
  • 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), maxDiscards caps both budgets
    when set and leaves them different when unset (attribute table ×2), and the
    two flag variables are off for false/off/no as well as 0
    (AGENTS.md).
  • AGENTS.md no longer routes the corpus through CorpusFromEnv::resolve(),
    a class this package removed in 0.7.0; it is core's CorpusFactory::fromDsn().
  • 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.
  • composer rector is green again: the anonymous CaseInstance stub in the
    interceptor's suite is a readonly class, as ReadOnlyAnonymousClassRector
    asks. It had been red since the stub was introduced, which is composer release-check red — composer build does not run rector.
  • Three characterizations resolve the engine's own spelling instead of pinning
    the one core 0.9 uses, so they stay exact while this package's constraint
    spans two core lines: the exception a bounded-attempt generator gives up with
    (GenerationExhausted in 0.9, GenerationExhaustedException from 0.10) and
    the counterexample field counting Assume::that() discards (skips in 0.9,
    discards from 0.10, where skips becomes the environmental count). The new
    Tests\Support\CoreCompat provokes the exception rather than naming it — a
    literal for either spelling is a reference to a class the other engine does
    not have — and reads the field through CounterExample::toArray(). It is
    temporary by construction and goes away when the constraint narrows again.

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 05 Sep 09:22
7904578
  • The Classify distribution line is written to Messenger::CHANNEL_STDERR
    instead of CHANNEL_STDOUT, so it survives a run that contains a failure.
    Testo's terminal renderer writes the stderr channel through as-is and streams
    every other channel only at -v, rescuing a stdout message at normal
    verbosity solely when the whole run holds one passing test — so in a real
    suite the distribution was never shown, and specifically not on the red run,
    which is when Classify::when() and Classify::label() are read at all. The
    level stays Info; only the channel decides visibility. The PHPUnit adapter
    already printed both lines unconditionally.
  • Requires rasuvaeff/property-testing-core ^0.9, where an environmental skip
    no longer spends the discard budget: a machine missing a dependency is no
    longer told to narrow generators that were never at fault. The excessive-
    discard warning printed here reads the engine's discard counter, so it stops
    firing on such a machine without a change of its own.

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 04 Sep 17:39
14125cd
  • A skipped run — from the body or from a lifecycle hook — 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.
  • A SkipTest or CancelTest raised from a lifecycle hook now skips the
    property, the way README.md has always described it. The lifecycle
    interceptor is innermost, so a hook's throw never reached the handler that
    turns a skip from the body into a status: the engine took it as a
    falsification and shrank around the skip, re-running the hook on every trial.
  • PROPERTY_PATH without a pinned seed is refused instead of doing nothing.
    The adapter draws a random seed for an unseeded property, so the engine's own
    "a path needs a seed" check never fired and the path silently described a
    descent of a run that never happened.
  • An attribute argument PHP rejects with a TypeError or ValueError —
    generators: [Provider::class, 'missingMethod'] is not a callable — is
    reported as this test's error with the reason in the message, instead of
    escaping the pipeline and coming back as Status::Aborted with the reason
    buried in previous. A generators or examples provider that is not static
    and has no test-case instance to run on says so by name.