Skip to content

fix: exit code with --shard and --parallel - #1883

Merged
nunomaduro merged 2 commits into
pestphp:5.xfrom
lazerg:fix/issue-1882-shard-parallel-exit-code
Aug 24, 2026
Merged

fix: exit code with --shard and --parallel#1883
nunomaduro merged 2 commits into
pestphp:5.xfrom
lazerg:fix/issue-1882-shard-parallel-exit-code

Conversation

@lazerg

@lazerg lazerg commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

What:

  • Bug Fix
  • New Feature

Description:

--shard builds its own --filter for the tests assigned to that shard. In parallel mode, a worker's serialized PHPUnit result reports zero tests whenever the last file it happened to process falls outside that filter, and the merged result inherits that false zero, so --parallel exits 1 even though every test actually passed. Since the shard already knows its filter matched real tests, it now also passes --do-not-fail-on-empty-test-suite alongside that filter.

Related:

Fixes #1882

@nunomaduro
nunomaduro merged commit aba2b79 into pestphp:5.x Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: --shard + --parallel exits 1 with all tests passing when a worker's last file belongs to another shard

2 participants