Skip to content

v0.10.2 — an environment change no longer runs nothing and calls it green

Choose a tag to compare

@manuglopez manuglopez released this 30 Sep 17:05
· 9 commits to main since this release
d05f111

After an environment change, a run ran nothing and said it passed

When the environment changes (PHP minor, coverage driver, OS or coverage format), phpunit-replay throws away the cached results on purpose: a result recorded on PHP 8.3 says nothing about PHP 8.4. It keeps the graph and its edges, because which files a test depends on does not change with the environment.

The run list is built from what changed and from what holds no result. It had no bucket for a test file the graph knows that simply has no result any more. Nothing selected those files, and there was nothing to replay, so the run printed

phpunit-replay: environment change (driver): cached results cleared
Replay  ✓ 0 executed (0 affected, 0 uncached) · 0 replayed · 0 quarantined

and exited 0 on a suite that plain PHPUnit fails. It never recovered on its own either: the stored fingerprint was never updated, so every later run found the same drift and did the same thing, until --fresh. A routine PHP minor upgrade was enough to trigger it.

What changed

  • A known test file never goes both unexecuted and unreplayed. Any test file the graph knows that holds no result in the layers the pass serves from now executes. --explain shows it as Uncached (no cached result). The rule is not specific to environment drift: it covers any way results go missing, such as an interrupted record or a cleared layer. It applies to both the CLI pipeline and the in-process path.
  • It recovers on its own. Clearing results on drift now updates the stored fingerprint to the current environment. The first pass after a change executes and records, the next one replays, and the warning no longer repeats forever.

Content keys, fingerprint composition, the remote layout and the graph format are unchanged. No cache is invalidated beyond the one the environment change already cleared.