This is the maintainer runbook for the repository-setting change. Complete it only after the release integration pull request is approved and all required checks are green. The SDK workflows already accept both branch names during the transition.
- Confirm the reviewed release-integration commit is the desired tip for both branches.
- Create
mainfrom that exact commit and push it without rewritingmaster. - Configure the protected
releaseenvironment and its required approvers. - Add required checks for quality/contracts, the PHP compatibility matrix, exact coverage, mutation baseline, archive consumers, Composer audit/license metadata, dependency review, secret scanning, and CodeQL.
- Add the
POSTMAN_API_KEYActions secret used only by the disposable official-collection workflow. - Confirm the Packagist webhook owner and target repository.
In GitHub, open Settings → Branches → Default branch, choose main, and confirm. Do not delete or force-update master during this change.
Immediately verify:
- a new pull request targets
mainby default; - CI and security workflows run on a push to
main; - the API contract-drift and disposable-contract workflows are visible in Actions and can be manually dispatched;
- release validation rejects publishing from every branch except
main; - CodeQL/default setup, Dependabot, repository rules, badges, and external integrations use
main; - Packagist exposes
dev-mainand its webhook still receives events; - a clean clone checks out
main.
Keep master protected and read-only during the agreed transition period. Add a final pointer commit only if maintainers decide consumers need one; do not continually mirror changes between the branches. Consumers following tagged releases are unaffected.
For existing local clones:
git fetch origin
git branch -m master main
git branch --set-upstream-to=origin/main main
git remote set-head origin -aRemove master only after repository search, webhook review, Packagist verification, documentation checks, and the agreed transition window show that no maintained integration still depends on it.
If a required integration fails, set the GitHub default branch back to master and repair the integration without rewriting either branch. A default-branch setting change does not require deleting main or changing published tags.