|  | 
|  | 1 | +# Release checklist | 
|  | 2 | + | 
|  | 3 | +## Before Release | 
|  | 4 | + | 
|  | 5 | +### General | 
|  | 6 | + | 
|  | 7 | +- [ ] Verify, and if necessary, update the version constraints for dependencies in the `composer.json` - PR #xxx | 
|  | 8 | +- [ ] Verify that any new functions have type declarations (ClassName/array/callable) whenever possible. | 
|  | 9 | +- [ ] Verify that the license tags all refer to the _new_ organisation and no longer to Squizlabs. (easily overlooked in new files) | 
|  | 10 | +- [ ] Verify that `@copyright` tags in new files use `@copyright 20xx PHPCSStandards and contributors`. | 
|  | 11 | + | 
|  | 12 | +### Wiki | 
|  | 13 | + | 
|  | 14 | +- [ ] Fetch changes and check against vandalism. | 
|  | 15 | +- [ ] Verify that any new `public` properties are listed on the Customizable Properties page in the Wiki. | 
|  | 16 | +- [ ] Verify that any new sniffs which have `public` properties are listed on the Customizable Properties page in the Wiki. | 
|  | 17 | +- [ ] Verify that any new CLI options are listed in the Wiki. | 
|  | 18 | +- [ ] Verify that any new Reports have a section in the Reports page in the Wiki. | 
|  | 19 | + | 
|  | 20 | +### Majors only | 
|  | 21 | + | 
|  | 22 | +- [ ] Move old changelog entries to `CHANGELOG_OLD.md` file. | 
|  | 23 | +- [ ] Verify that everything deprecated during the previous major was removed. | 
|  | 24 | +- [ ] Update the wiki for any references to anything deprecated/removed. | 
|  | 25 | +- [ ] Change `Config::STABILITY` from "dev" to "stable" for the branch for the new major. - PR #xxx | 
|  | 26 | + | 
|  | 27 | +### Prepare changelog | 
|  | 28 | + | 
|  | 29 | +- [ ] Prepare changelog for the release and submit the PR. - PR #xxx | 
|  | 30 | +    - Based on the tickets in the milestone. | 
|  | 31 | +    - Double-check that any issues which were closed by PRs included in the release, have the milestone set. | 
|  | 32 | +    - Compare with auto-generated release notes to ensure nothing is missed. | 
|  | 33 | +    - :pencil2: Remember to add a release link at the bottom! | 
|  | 34 | +- [ ] Prepare extra sections for the GH release notes. | 
|  | 35 | +    - Use "New contributors" list from the auto-generated notes. | 
|  | 36 | +    - Use the milestone to gather the stats. | 
|  | 37 | +    - Add sponsor link. | 
|  | 38 | +    - Remove square brackets from all ticket links or make them proper full links (as GH markdown parser doesn't parse these correctly). | 
|  | 39 | +    - Change all contributor links to full inline links (as GH markdown parser on the Releases page doesn't parse these correctly). | 
|  | 40 | +    ```md | 
|  | 41 | +--- | 
|  | 42 | + | 
|  | 43 | +### New Contributors | 
|  | 44 | + | 
|  | 45 | +The PHP_CodeSniffer project is happy to welcome the following new contributors: | 
|  | 46 | +@...., @.... | 
|  | 47 | + | 
|  | 48 | +### Statistics | 
|  | 49 | + | 
|  | 50 | +**Closed**: # issues | 
|  | 51 | +**Merged**: ## pull requests | 
|  | 52 | + | 
|  | 53 | +If you like to stay informed about releases and more, follow [@phpcs on Mastodon](https://phpc.social/@phpcs) or [@PHP_CodeSniffer on X](https://x.com/PHP_CodeSniffer). | 
|  | 54 | + | 
|  | 55 | +Please consider [funding the PHP_CodeSniffer project](https://opencollective.com/php_codesniffer). If you already do so: thank you! | 
|  | 56 | +    ``` | 
|  | 57 | + | 
|  | 58 | +### Milestone | 
|  | 59 | + | 
|  | 60 | +- [ ] Close the milestone | 
|  | 61 | +- [ ] Open a new milestone for the next release | 
|  | 62 | +- [ ] If any open PRs/issues which were milestoned for this release did not make it into the release, update their milestone. | 
|  | 63 | + | 
|  | 64 | + | 
|  | 65 | +## Release | 
|  | 66 | + | 
|  | 67 | +- [ ] Merge the changelog PR. | 
|  | 68 | +    For now, cherrypick the changelog to the 4.0 branch. | 
|  | 69 | +- [ ] Make sure all CI builds for `master` are green. | 
|  | 70 | +- [ ] Create a tag for the release & push it. | 
|  | 71 | +- [ ] Make sure all CI builds are green. | 
|  | 72 | +- [ ] Download the PHAR files from the GH Actions test build page. | 
|  | 73 | +- [ ] Sign the PHAR files using: | 
|  | 74 | +    ```bash | 
|  | 75 | +    gpg -u [email protected]  --detach-sign --output phpcs.phar.asc phpcs.phar | 
|  | 76 | +    gpg -u [email protected]  --detach-sign --output phpcbf.phar.asc phpcbf.phar | 
|  | 77 | +    gpg -u [email protected]  --detach-sign --output phpcs-x.x.x.phar.asc phpcs-x.x.x.phar | 
|  | 78 | +    gpg -u [email protected]  --detach-sign --output phpcbf-x.x.x.phar.asc phpcbf-x.x.x.phar | 
|  | 79 | +    ``` | 
|  | 80 | +    - If, for whatever reason, the key is no longer available or has expired: | 
|  | 81 | +      -> generate a new key following the steps here: <https://phar.io/howto/generate-gpg-key.html>. | 
|  | 82 | +      -> upload the new key following the steps here: <https://phar.io/howto/uploading-public-keys.html>. | 
|  | 83 | +      -> update the key information in the README x 3. | 
|  | 84 | +      -> update the key info in the verify-release GHA workflow. | 
|  | 85 | +- [ ] Get the SHA of the files for the phive.xml file | 
|  | 86 | +    ```bash | 
|  | 87 | +    # Linux | 
|  | 88 | +    sha256sum ./phpcs-x.x.x.phar | 
|  | 89 | +    sha256sum ./phpcbf-x.x.x.phar | 
|  | 90 | + | 
|  | 91 | +    # Windows | 
|  | 92 | +    certutil -hashfile ./phpcs-x.x.x.phar SHA256 | 
|  | 93 | +    certutil -hashfile ./phpcbf-x.x.x.phar SHA256 | 
|  | 94 | +    ``` | 
|  | 95 | +- Update the `gh-pages` branch: | 
|  | 96 | +    - [ ] Add the new release to the `phive.xml` file. | 
|  | 97 | +    - [ ] Add the versioned PHAR files + keys in PHAR dir. | 
|  | 98 | +    - [ ] Add the unversioned PHAR files + keys in root dir. | 
|  | 99 | +    - [ ] Verify the attestations of the PHAR files. | 
|  | 100 | +    ```bash | 
|  | 101 | +    gh attestation verify phpcs.phar -o PHPCSStandards | 
|  | 102 | +    gh attestation verify phpcbf.phar -o PHPCSStandards | 
|  | 103 | +    gh attestation verify phars/phpcs-x.x.x.phar -o PHPCSStandards | 
|  | 104 | +    gh attestation verify phars/phpcbf-x.x.x.phar -o PHPCSStandards | 
|  | 105 | +    ``` | 
|  | 106 | +    - [ ] Commit & push the changes. | 
|  | 107 | +    - [ ] Verify that the website regenerated correctly and that the phars can be downloaded. | 
|  | 108 | +- [ ] Create a release & copy & paste the changelog to it. | 
|  | 109 | +    - [ ] Upload the unversioned PHAR files + asc files to the release. | 
|  | 110 | +    - [ ] Announce the release in the discussions forum by checking the checkbox at the bottom of the release page. | 
|  | 111 | +- [ ] Make sure all CI builds are green, including the verify-release workflow. | 
|  | 112 | + | 
|  | 113 | + | 
|  | 114 | +## After Release | 
|  | 115 | + | 
|  | 116 | +- [ ] Update the version number in the `Config::VERSION` class constant in the `src/Config.php` file to the _next_ (patch) version. | 
|  | 117 | +    This can always be adjusted again later if needs be if it is decided that the next version will be a minor/major, but at least for dev | 
|  | 118 | +    it should clearly show that this is bleeding edge/unreleased. | 
|  | 119 | +- [ ] Close release announcement in the "Discussions" for previous minors (leave the announcements related to the current minor open). | 
|  | 120 | + | 
|  | 121 | + | 
|  | 122 | +### Publicize | 
|  | 123 | + | 
|  | 124 | +- [ ] Post on Mastodon about the release (official account). | 
|  | 125 | +- [ ] Post on X about the release (official account). | 
|  | 126 | +- [ ] Post on LinkedIn (personal account). | 
0 commit comments