fix: honor all stop-on-* flags in parallel mode (#1684)

* fix: honor all stop-on-* flags in parallel mode

Previously --stop-on-failure was the only flag honored in parallel
mode, and it only cleared pending tests when the exit code was
non-zero. The rest (--stop-on-defect, --stop-on-error, --stop-on-risky,
--stop-on-incomplete, --stop-on-warning, --stop-on-notice,
--stop-on-deprecation, --stop-on-skipped) were silently ignored.

WrapperRunner now precomputes the set of progress-file characters that
should trigger a stop (F, E, R, I, W, N, D, S) based on the configured
flags, and scans each worker's progress file for them after every
cycle. Once any matching outcome is seen, the pending queue is cleared.

Up to N-1 in-flight tests (where N is --processes) can still complete
after the first stop-worthy outcome — stopping them mid-run would risk
corrupting shared state.

Closes #1463.

* fix: preserve parallel stop conditions on Pest 5

* test: expand parallel stop-on regression coverage
This commit is contained in:
Aleksandr Štšepelin
2026-11-16 22:19:46 +02:00
committed by GitHub
parent fbaa7fe8e9
commit 9dc8c1d5cb
39 changed files with 735 additions and 11 deletions
@@ -0,0 +1,7 @@
<?php
return static fn (int $severity): Closure => function () use ($severity): void {
trigger_error('shared issue', $severity);
expect(true)->toBeTrue();
};