Repository navigation
Build codecept.phar with Box and attach it to GitHub releases - #6960
Merged
Merged
Conversation
The phar is built by phar/build.sh from `git archive <tag>`, bundled with the same modules as the Robo build in codeception.github.com. The workflow runs on published releases and via workflow_dispatch for backfills. Codeception and module files are added uncompacted because their docblocks are read at runtime (@part, generated actor actions).
The extension whitelist dropped runtime resources such as the shell completion scripts of symfony/console, which broke every command. Now all files are included except documentation and development metadata, so resources of bundled packages cannot go missing unnoticed.
This was referenced Nov 14, 2026
Naktibalda
approved these changes
Nov 17, 2026
This was referenced Nov 18, 2026
W0rma
added a commit
to W0rma/Codeception
that referenced
this pull request
Nov 19, 2026
self-update read codecept.phar and codecept.version from codeception.com/php80/, which hasn't been updated since 5.1. The phar is now attached to GitHub releases (Codeception#6960), so self-update uses those. GithubReleaseStrategy reads the released versions from Packagist and updates to the newest release which - is stable and newer than the installed version, - has the same major version, - supports the running PHP version (require.php of the release), - has a phar attached (releases still being built are skipped). The download is verified against the codecept.phar.sha256 of the release.
W0rma
added a commit
to W0rma/codeception.github.com
that referenced
this pull request
Nov 19, 2026
The phar is now built automatically and attached to GitHub releases (Codeception/Codeception#6960), so link downloads there and remove the local phar build tasks.
W0rma
added a commit
to W0rma/codeception.github.com
that referenced
this pull request
Nov 19, 2026
The phar is now built automatically and attached to GitHub releases (Codeception/Codeception#6960), so link downloads there and remove the local phar build tasks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Build codecept.phar with Box and attach it to GitHub releases
Up to now the phar was built by hand with Robo in codeception.github.com. This PR builds it automatically in this repo with Box and
uploads it to the GitHub release. The Robo build stays as a manual fallback.
Changes
phar/build.sh <tag>builds the phar fromgit archive <tag>, soexport-ignorerules apply. It bundles the same modules as the Robo build pluslaravel-zero/phar-updater, resolves dependencies for PHP 8.2.0, and ignoresext-apcu,ext-mongodbandext-phalcon.phar/box.jsonuses the same stub as before (Phar::mapPhar('codecept.phar')) and per-file GZ compression.codeception/*(core and modules) are added unchanged, because their docblocks are read at runtime (@part, generated actor actions)..github/workflows/phar.ymlruns onrelease: publishedand onworkflow_dispatchwith ataginput (for backfills). It builds the phar, smoke-tests it in an empty directory (--version,bootstrap,build,run), and uploadscodecept.pharandcodecept.phar.sha256withgh release upload --clobber..gitattributes:/pharis export-ignored.Notes
composer update:module-ftpdepends on aphpseclibversion with a security advisory (Add support for phpseclib v3 and v4 module-ftp#12 already fixed that but a new release is still missing).build.sh,box.json) comes from the release tag. Withworkflow_dispatchit comes from the selected branch. That's needed for older tags that don't contain it, and for rebuilding a release after fixing the build config.5.3.7are accepted. A pre-release orv-prefixed tag makes the workflow fail without attaching a phar. Could be added if we want to start creating tags for release candidates etc.self-updateto GitHub releases is planned for a separate PR.Testing
--versionpasses, vendor code is compacted, Codeception files are unchanged.pharfile to the github release: https://github.com/W0rma/Codeception/releases/tag/5.3.7Follow-ups
tag: 5.3.7self-updateto GitHub releases (phar-updaterGithubStrategy), separate PRhttps://codeception.com/php80/codecept.versionandcodecept.phar, so these must stay current or point to the latest GitHub releasequickstart.html,builds.markdown,thanks*.html,docs/reference/Commands.md) tohttps://github.com/Codeception/Codeception/releases/latest/download/codecept.pharCOMPOSER_NO_SECURITY_BLOCKINGfromphar/build.shoncemodule-ftpallows aphpseclibversion without security advisories (see above, a new release forcodeception/module-ftpis necessary)buildPhar82,package/) fromcodeception/codeception.github.comonce a few releases have been built by this workflowGenerated with Claude Code
Fixes #6864