Skip to content

test(ci): harden PHAR tests against silent phar.readonly skips (closes #340)#554

Merged
s2x merged 2 commits into
masterfrom
feat/issue-340-phar-readonly-test-hardening
Jul 3, 2026
Merged

test(ci): harden PHAR tests against silent phar.readonly skips (closes #340)#554
s2x merged 2 commits into
masterfrom
feat/issue-340-phar-readonly-test-hardening

Conversation

@s2x

@s2x s2x commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Description

Closes #340

PHAR-build tests were silently skipping when phar.readonly was set, hiding potential regressions behind a green CI build.

Changes

  • Add -d phar.readonly=0 to composer test and composer test:coverage scripts so PHAR tests always run locally
  • Add phar.readonly=0 to CI workflow ini-values for visibility in the workflow file
  • Add PharReadOnlyGuardTest — a guard test that fails under CI when phar.readonly is set without the WORKERMAN_ALLOW_PHAR_READONLY_SKIP opt-out env var
  • Refactor BuildPharCommandTest::testCommandFailsWhenPharReadonlyIsSet to use injected PharCapabilities(true, true) instead of depending on the runtime INI setting (this test was previously always skipped with phar.readonly=0)

Changelog

  • CHANGELOG.md: entry under [Unreleased] > Tests describing the test hardening

Code Review

  • All linters pass (php-cs-fixer, phpstan, rector)
  • All 1510 tests pass with 0 failures
  • PHAR tests execute (not skip) when phar.readonly=0

Piotr Hałas added 2 commits July 3, 2026 23:23
…#340)

- Add -d phar.readonly=0 to composer test and test:coverage scripts
- Add phar.readonly=0 to CI workflow ini-values for visibility
- Add PharReadOnlyGuardTest: fails under CI when phar.readonly is set
  without WORKERMAN_ALLOW_PHAR_READONLY_SKIP opt-out
- Refactor BuildPharCommandTest::testCommandFailsWhenPharReadonlyIsSet
  to use injected PharCapabilities instead of runtime INI check
- Rector removes now-unused createCommand() helper
@s2x s2x self-assigned this Jul 3, 2026
@s2x
s2x merged commit b45a722 into master Jul 3, 2026
12 checks passed
@s2x
s2x deleted the feat/issue-340-phar-readonly-test-hardening branch July 3, 2026 21:31
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.

[Tests] PHAR-build tests silently skip when phar.readonly is set; CI must validate this path

1 participant