Skip to content

fix(phar): leave the packages' tests and features out of the phar - #1946

Merged
mrrobot47 merged 2 commits into
EasyEngine:developfrom
mrrobot47:fix/phar-exclude-package-tests
Oct 12, 2026
Merged

mrrobot47 merged 2 commits into
EasyEngine:developfrom
mrrobot47:fix/phar-exclude-package-tests

Conversation

@mrrobot47

Copy link
Copy Markdown
Member

utils/make-phar.php reused the previous Finder (still matching *.php) for the ee-*.json step, so every PHP file below each *-command package went into the phar, including the packages' features/ and tests/ directories. The step now uses a fresh Finder, and CI gets a "Check phar contents" step that fails when vendor/easyengine/*/(tests|features)/ paths end up in the phar.

Checked: the step fails on a phar built before the change and passes after it, and the new phar lost exactly those files.

The ee-*.json step of make-phar.php reused the previous Finder, which still matched *.php, and added every PHP file below each *-command package: features/bootstrap of the released phars and, with the incremental engine, site-command's 60 PHPUnit test files. It now starts from a new Finder, and the build job fails when a package's tests/ or features/ is in the phar.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation correctly fixes the packaging issue; only a minor diagnostic wording issue remains.

1 open finding
What changed in this PR

Prevents package test and feature files from entering the Phar archive.

Changes:

  • Uses a fresh Finder for package JSON files.
  • Adds CI validation for excluded directories.
File Description
utils/​make-phar.php Resets Finder filters before collecting JSON files.
.github/​workflows/​test_and_build.yml Verifies excluded package content is absent.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/test_and_build.yml Outdated
@mrrobot47
mrrobot47 merged commit df6a922 into EasyEngine:develop Oct 12, 2026
11 checks passed
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.

2 participants