Skip to content

chore: set $_ENV in the test sandbox and raise the coverage ratchet to 92 - #14

Merged
ogorzalka merged 5 commits into
mainfrom
chore/cli-sandbox-ratchet
Nov 14, 2026
Merged

ogorzalka merged 5 commits into
mainfrom
chore/cli-sandbox-ratchet

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

Two follow-ups to the coverage work merged in #12.

  • Sandbox. tests/Support/Sandbox.php set the fake binaries' PATH in putenv() and $_SERVER only. Symfony Process builds the environment of a child from $_SERVER, then lets $_ENV override it: $_ENV is empty with the php.ini of macOS (variables_order GPCS) and filled on a PHP without php.ini (the official php:8.4-cli image), where it brought back the original PATH and made the fake composer unreachable (sh: composer: not found, 12 tests failing). $_ENV is now set too, and restored in restore(). The CI does not have the problem, but the suite now passes in that Linux image as well.
  • Ratchet. .harness.json goes from 36.86 to 92: the CI measures 93.55 % on main since test: raise the coverage to 90.7 % #12 (the Line coverage line of the Quality gates job, recorded as improved). The merged test: raise the coverage to 90.7 % #12 had also reformatted the whole file; its original layout is restored, and only the number changes.

117 tests pass on macOS and in a php:8.4-cli container; Pint, PHPStan, Rector (--dry-run) and tests/Arch.php are clean.

@ogorzalka
ogorzalka merged commit 1a32248 into main Nov 14, 2026
12 checks passed
@ogorzalka
ogorzalka deleted the chore/cli-sandbox-ratchet branch November 14, 2026 14:03
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.

1 participant