Releasing
Core uses canonical version files and git tags in vX.Y.Z format.
Version source of truth
- PHP:
VERSIONis authoritative. classes/Core.phpmust matchVERSION(Core::VERSION).- JS:
js/VERSIONis authoritative for JS artifact packaging. js/package.jsonversion must matchjs/VERSION.dist/core.phpand artifact payloads are generated from these version sources.composer.jsonmust not contain aversionfield.release-targets.jsonis authoritative for artifact repo/package destinations.
When to release
Create a new release for substantial changes:
- bug fixes (
fix:) - new features (
feat:) - performance/refactor changes affecting behavior (
perf:,refactor:) - breaking changes (
!orBREAKING CHANGE:)
Mapping:
patch: fixes/perf/refactor/revertminor: featuresmajor: breaking changes
Conventional commits
Release tooling parses commit messages since the last tag:
feat(scope): add xfix(scope): correct yrefactor(scope): simplify zfeat!: change API- body marker:
BREAKING CHANGE: ...
Commands
Plan next release:
composer release:plan
Cut release (auto bump inferred from commits):
composer release:cut
Force bump type:
composer release:cut -- patch
composer release:cut -- minor
composer release:cut -- major
Dry run preview:
composer release:cut -- --dry-run
Create release and push tag:
composer release:cut -- --push
Policy checks:
composer test-security
composer release:check
composer release:check-artifacts
php tools/release-check.php --strict
Changelog contract
Each release entry in CHANGELOG.md includes:
## vX.Y.Z - YYYY-MM-DD### Added### Changed### Fixed### Breaking### Upgrade Notes
The changelog entry is a quick guide, not only a commit dump.
CI enforcement
.github/workflows/tests.ymlrunscomposer test-security..github/workflows/tests.ymlrunscomposer release:check..github/workflows/tests.ymlrunscomposer release:check-artifacts..github/workflows/release-policy.ymlruns release policy onmain/master/developand strict policy on release tags..github/workflows/mirror-artifacts.ymlmirrors PHP/JS artifact repos on pushes tomain/masterwhen artifact-relevant files changed.- On tag builds, version/tag/changelog must match.
- On tag builds,
.github/workflows/release-artifact.ymland.github/workflows/release-artifact-js.ymlpublish mirror artifacts automatically.