You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(execution): reinterpret tools' empty-input failures as skipped (BUG-1)
PHPStan and PHPCS exit non-zero when their internal exclusion lists
(excludePaths.analyse / --ignore) strip every input file, breaking
pipelines on mono-domain MRs where the wrapper feeds them files that
match a job's paths but fall entirely inside the tool's own exclusions.
Each accelerable Job now declares isEmptyInputTolerated(exitCode, output)
mirroring the existing isFixApplied() pattern. JobExecutor and FlowExecutor
reinterpret matching results as JobResult::skipped with skipReason, emit
onJobSkipped instead of onJobError, and bypass threshold evaluation —
the tool didn't do real work, so comparing its near-zero duration against
warn-after/fail-after would be meaningless.
PhpstanJob: exit==1 + "No files found to analyse".
PhpcsJob: exit in {1,2,3,16} + "All specified files were excluded" /
"No files were checked" (defensive across PHPCS 3.x and the PHPCSStandards
fork; the marker check is what actually decides).
PHPMD already tolerates this natively (exit 0 on empty set); the other
accelerable tools (parallel-lint, psalm, rector, php-cs-fixer) silently
ignore non-matching inputs and need no override.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/changelog.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,12 @@
2
2
3
3
All notable changes to this project are documented here.
4
4
5
+
## [3.3.3]
6
+
7
+
### Fixed
8
+
9
+
- **Fast-branch / fast no longer fail with spurious "no files" errors when a job's tool config strips every input via its internal exclusion list.** Repro: a branch only touches files in one domain (e.g. `src/Gas/...`); the wrapper hands those files to a job whose `.neon` declares `excludePaths.analyse: [src/Gas]` (PHPStan) or whose `--ignore` CSV covers them (PHPCS). The tool then drops 100 % of the input and exits non-zero with `[ERROR] No files found to analyse.` (PHPStan, exit 1) or `ERROR: All specified files were excluded or did not match filtering rules.` (PHPCS, exit 16 on older versions and the PHPCSStandards fork). Before this fix the wrapper reported the job as failed, breaking mono-domain MRs (observed in consumer projects with per-domain flow structure). Each accelerable Job now declares an empty-input tolerance heuristic via `isEmptyInputTolerated(int $exitCode, string $output): bool` (mirror of the existing `isFixApplied()` pattern). `PhpstanJob` recognises `exit === 1` + `No files found to analyse`; `PhpcsJob` recognises `exit ∈ {1,2,3,16}` + `All specified files were excluded` / `No files were checked` (defensive across PHPCS 3.x and the PHPCSStandards fork). When tolerated, the JobResult is reinterpreted as `skipped: true` with `skipReason` instead of `success: false`, and the OutputHandler emits `onJobSkipped` rather than `onJobError`. Threshold evaluation is also bypassed for tolerated jobs — the tool didn't do real work, so comparing its near-zero duration against `warn-after`/`fail-after` would be meaningless. PHPMD already tolerates this case natively (`exit 0` when its `--exclude` empties the set); the other accelerable tools (parallel-lint, psalm, rector, php-cs-fixer) silently ignore non-matching inputs and do not need an override.
10
+
5
11
## [3.3.2] ⚠️ Do not use — broken release
6
12
7
13
**This release is functionally identical to 3.3.1.** The git tag `v3.3.2` was published against a master commit whose bundled `.phar` binaries (`builds/githooks`, `builds/php7.4/githooks`) had never been updated from the `rc-3.3.2` branch where CI compiled them. Since GitHooks runs as a standalone `.phar`, installing `wtyd/githooks:3.3.2` ships the v3.3.1 binary under the v3.3.2 tag name. The fixes listed below are present in the source code of the tag but **not** in the executed binary.
0 commit comments