|
1 | 1 | # PHP release process
|
2 | 2 |
|
| 3 | +A release managers role includes making packaged source code from the canonical repository |
| 4 | +available according to their release schedule. |
| 5 | + |
| 6 | +The release schedule for their branch is available on a Wiki page, for example |
| 7 | + [PHP 8.0 release schedule](https://wiki.php.net/todo/php80) |
| 8 | + |
| 9 | +There are two types of release: |
| 10 | + |
| 11 | + - non stable (alpha/beta/RC) |
| 12 | + - stable |
| 13 | + |
| 14 | +The process of making packaged source available and announcing availability is explained |
| 15 | +in detail below. The process differs slightly for non-stable and stable releases. |
| 16 | + |
| 17 | +Before a release manager can begin their work, there are several things that must happen, |
| 18 | +explained at the end of this document in |
| 19 | + [New Release Manager Checklist](#new-release-manager-checklist). |
| 20 | + |
3 | 21 | ## General notes and tips
|
4 | 22 |
|
5 |
| - 1. Do not release on Fridays, Saturdays or Sundays because the sysadmins cannot |
6 |
| - upgrade stuff then. |
| 23 | + 1. Do not release on Fridays, Saturdays, or Sundays as this gives poor lead time for |
| 24 | + downstream consumers adhering to a typical work week. |
7 | 25 |
|
8 | 26 | 2. Package two days before a release. So if the release is to be on Thursday,
|
9 | 27 | package on Tuesday. Think about timezones as well.
|
10 | 28 |
|
11 |
| - 3. Ensure that the tests on Travis CI are green. |
| 29 | + 3. Ensure that the relevant tests on CI are green. |
12 | 30 |
|
13 |
| - See: https://travis-ci.org/php/php-src/builds |
| 31 | + See: |
| 32 | + https://ci.appveyor.com/project/php/php-src |
| 33 | + https://dev.azure.com/phpazuredevops/PHP/ |
14 | 34 |
|
15 | 35 | It is recommended to do so a couple of days before the packaging day, to
|
16 | 36 | have enough time to investigate failures, communicate with the authors and
|
17 | 37 | commit the fixes.
|
18 | 38 |
|
19 |
| - The RM for the branch is also responsible for keeping the CI green on |
20 |
| - ongoing basis between the releases. Check the CI status for your branch |
21 |
| - periodically and resolve the failures ASAP. See more in |
22 |
| - https://wiki.php.net/rfc/travis_ci. |
23 |
| - |
24 |
| - 4. Ensure that Windows builds will work before packaging. |
| 39 | + Check the CI status for your branch periodically and resolve the failures ASAP. |
| 40 | + |
| 41 | + See more in https://wiki.php.net/rfc/travis_ci. |
25 | 42 |
|
26 |
| - 5. Follow all steps to the letter. When unclear ask previous RM's (David, |
27 |
| - Julien, Johannes, Stas, Derick, Ilia, Sara, Remi, or Christoph) before |
| 43 | + 4. Follow all steps to the letter. When unclear ask previous RM's before |
28 | 44 | proceeding. Ideally make sure that for the first releases one of the
|
29 | 45 | previous RM's is around to answer questions. For the steps related to the
|
30 |
| - php/QA/bug websites try to have someone from the webmaster team (Bjori) on |
31 |
| - hand. |
32 |
| - |
33 |
| - 6. Verify the tags to be extra sure everything was tagged properly. |
34 |
| - |
35 |
| - 7. Moving extensions from/to PECL requires write access to the destination. |
36 |
| - Most developers should have this. |
37 |
| - |
38 |
| - Moving extensions from php-src to PECL: |
39 |
| - |
40 |
| - * Ask someone with Git admin access to create a new empty repository GitHub. |
41 |
| - |
42 |
| - * Clone a new copy of the php-src repository (it will rewrite history, keep |
43 |
| - contributors commits and include only the extension folder): |
44 |
| - |
45 |
| - ```sh |
46 |
| - git clone [email protected]:php/php-src.git ext-name |
47 |
| - cd ext-name |
48 |
| - git filter-branch --prune-empty --subdirectory-filter ext/ext-name master |
49 |
| - ``` |
| 46 | + php/QA/bug websites try to have someone from the webmaster team on hand. |
50 | 47 |
|
51 |
| - * Set remote Git push URL for the PECL extension: |
| 48 | + 5. Verify the tags to be extra sure everything was tagged properly. |
52 | 49 |
|
53 |
| - ```sh |
54 |
| - git remote set-url origin [email protected]:php/pecl-ext-name.git |
55 |
| - ``` |
56 |
| - |
57 |
| - * Create branch and tags structure appropriate for the extension and push: |
58 |
| - |
59 |
| - ```sh |
60 |
| - git push -u origin master |
61 |
| - ``` |
62 |
| - |
63 |
| - If the extension is still usable or not dead, in cooperation with the |
64 |
| - extension maintainers if any: |
65 |
| - |
66 |
| - * Create the pecl.php.net/foo package and its content, license, maintainer |
67 |
| - * Create the package.xml, commit |
68 |
| - * Release the package |
69 |
| - |
70 |
| - For moving extensions from PECL to php-src the procedure needs to go through |
71 |
| - the RFC process and a new Git commit without rewriting the php-src Git |
72 |
| - commit history. |
73 |
| - |
74 |
| - 8. There is a PHP release Docker image https://github.com/sgolemon/php-release |
| 50 | + 6. There is a PHP release Docker image https://github.com/sgolemon/php-release |
75 | 51 | with forks available to help releasing.
|
76 | 52 |
|
77 |
| -## Rolling a non stable release (alpha/beta/RC) |
| 53 | + 7. Communication with previous release managers should be conducted via |
| 54 | + |
| 55 | + |
| 56 | + 8. References to repositories in this document refer to the canonical source |
| 57 | + located at https://github.com/php |
78 | 58 |
|
79 |
| - 1. Check Windows snapshot builder logs https://windows.php.net/downloads/snaps/ |
80 |
| - the last revision. |
| 59 | +## Packaging a non stable release (alpha/beta/RC) |
81 | 60 |
|
82 |
| - 2. Check the tests at https://travis-ci.org/php/php-src/builds. |
| 61 | + 1. Check the tests at https://travis-ci.org/php/php-src/builds. |
83 | 62 |
|
84 |
| - 3. Run the `scripts/dev/credits` script in php-src and commit the changes in |
| 63 | + 2. Run the `scripts/dev/credits` script in php-src and commit the changes in |
85 | 64 | the credits files in ext/standard.
|
86 | 65 |
|
87 |
| - 4. Checkout the release branch for this release (e.g., PHP-7.4.2) from the main |
| 66 | + 3. Checkout the release branch for this release (e.g., PHP-7.4.2) from the main |
88 | 67 | branch.
|
89 | 68 |
|
90 |
| - 5. Bump the version numbers in `main/php_version.h`, `Zend/zend.h`, |
| 69 | + 4. Bump the version numbers in `main/php_version.h`, `Zend/zend.h`, |
91 | 70 | `configure.ac` and possibly `NEWS`. Do not use abbreviations for alpha and
|
92 | 71 | beta. Do not use dashes, you should `#define PHP_VERSION "7.4.22RC1"` and
|
93 | 72 | not `#define PHP_VERSION "7.4.22-RC1"`.
|
|
99 | 78 | need to be rebuilt with each bump. Do *not* bump the API versions after
|
100 | 79 | RC1.
|
101 | 80 |
|
102 |
| - 6. Compile and run `make test`, with and without ZTS, using the right Bison and |
| 81 | + 5. Compile and run `make test`, with and without ZTS, using the right Bison and |
103 | 82 | re2c version (for PHP 7.4, minimum Bison 3.0.0 and re2c 0.13.4 are used).
|
104 | 83 |
|
105 |
| - 7. Check `./sapi/cli/php -v` output for version matching. |
| 84 | + 6. Check `./sapi/cli/php -v` output for version matching. |
106 | 85 |
|
107 |
| - 8. If all is right, commit the changes to the release branch: |
| 86 | + 7. If all is right, commit the changes to the release branch: |
108 | 87 |
|
109 | 88 | ```sh
|
110 | 89 | git commit -a
|
111 | 90 | ```
|
112 | 91 |
|
113 |
| - 9. Tag the repository release branch with the version, e.g.: |
| 92 | + 8. Tag the repository release branch with the version, e.g.: |
114 | 93 |
|
115 | 94 | ```sh
|
116 | 95 | git tag -u YOURKEYID php-7.4.2RC2
|
117 | 96 | ```
|
118 | 97 |
|
119 |
| -10. Bump the version numbers in `main/php_version.h`, `Zend/zend.h`, |
| 98 | + 9. Bump the version numbers in `main/php_version.h`, `Zend/zend.h`, |
120 | 99 | `configure.ac` and `NEWS` in the *main* branch (PHP-7.4 for example) to
|
121 | 100 | prepare for the **next** version. For example, if the RC is "7.4.1RC1" then
|
122 | 101 | the new one should be `7.4.2-dev` - regardless if we get a new RC or not.
|
123 | 102 | This is to make sure `version_compare()` can correctly work. Commit the
|
124 | 103 | changes to the main branch.
|
125 | 104 |
|
126 |
| -11. Push the changes to the main repo, the tag, the main branch and the release |
127 |
| - branch. Release branches for alpha/beta/.0RCx releases before the GA release |
128 |
| - don't need to be pushed (a local temporary branch should be used). |
| 105 | +10. Push the changes to the `php-src`. |
| 106 | +
|
| 107 | + Non stable release branches don't need to be pushed |
| 108 | + (a local temporary branch should be used). |
129 | 109 |
|
130 | 110 | ```sh
|
131 | 111 | git push --tags origin HEAD
|
132 | 112 | git push origin {main branch}
|
133 | 113 | git push origin {release branch}
|
134 | 114 | ```
|
135 | 115 |
|
136 |
| -12. Run: `./scripts/dev/makedist php-7.4.0RC2`, this will export the tree, |
| 116 | +11. Run: `./scripts/dev/makedist php-7.4.0RC2`, this will export the tree, |
137 | 117 | create `configure` and build three tarballs (gz, bz2 and xz).
|
138 | 118 |
|
139 |
| -13. Run `scripts/dev/gen_verify_stub <version> [identity]`, this will sign the |
| 119 | +12. Run `./scripts/dev/gen_verify_stub <version> [identity]`, this will sign the |
140 | 120 | tarballs and output verification information to be included in announcement
|
141 | 121 | email.
|
142 | 122 |
|
143 |
| -14. Copy those tarballs (scp, rsync) to downloads.php.net, in your homedir there |
| 123 | +13. Copy those tarballs (scp, rsync) to downloads.php.net, in your homedir there |
144 | 124 | should be a directory `public_html/`. Copy them into there. If you do not
|
145 | 125 | have this directory, create it.
|
146 | 126 |
|
147 |
| -15. Now the RC can be found on https://downloads.php.net/~yourname, |
| 127 | +14. Now the RC can be found on https://downloads.php.net/~yourname, |
148 | 128 | e.g. https://downloads.php.net/~derick/.
|
149 | 129 |
|
150 |
| -16. Once the release has been tagged, contact the release-managers@ distribution |
| 130 | +15. Once the release has been tagged, contact the release-managers@ distribution |
151 | 131 | list so that Windows binaries can be created. Once those are made, they can
|
152 | 132 | be found at https://windows.php.net/download.
|
153 | 133 |
|
154 |
| -## Getting the non stable release (alpha/beta/RC) announced |
| 134 | +## Announcing a non stable release (alpha/beta/RC) |
155 | 135 |
|
156 |
| - 1. Update `qa.git/include/release-qa.php` with the appropriate information. See |
| 136 | + 1. Update `web-qa:include/release-qa.php` with the appropriate information. See |
157 | 137 | the documentation within release-qa.php for more information, but all
|
158 | 138 | releases and RCs are configured here. Only `$QA_RELEASES` needs to be
|
159 | 139 | edited.
|
160 | 140 |
|
161 |
| - Example: When rolling an RC, set the `rc` with appropriate information for |
| 141 | + Example: When packaging an RC, set the `rc` with appropriate information for |
162 | 142 | the given version.
|
163 | 143 |
|
164 | 144 | Note: Remember to update the sha256 checksum information.
|
165 | 145 |
|
166 | 146 | 2. Skip this step for non stable releases after GA of minor or major versions
|
167 | 147 | (e.g. announce 7.4.0RC1, but not 7.4.1RC1):
|
168 | 148 |
|
169 |
| - Add a short notice to phpweb stating that there is a new release, and |
| 149 | + Add a short notice to web-php stating that there is a new release, and |
170 | 150 | highlight the major important things (security fixes) and when it is
|
171 | 151 | important to upgrade.
|
172 | 152 |
|
173 |
| - * Call `php bin/createNewsEntry` in your local phpweb checkout. Use category |
| 153 | + * Call `php bin/createNewsEntry` in your local web-php checkout. Use category |
174 | 154 | "frontpage" *and* "releases" for all stable releases. Use category
|
175 | 155 | "frontpage" for X.Y.0 non-stable releases only (news only).
|
176 | 156 |
|
|
205 | 185 | 6. For RCs, post tweet with release announcement (and link to news article on
|
206 | 186 | php.net) ([@official_php](https://twitter.com/official_php))
|
207 | 187 |
|
208 |
| -## Rolling a stable release |
| 188 | +## Packaging a stable release |
209 | 189 |
|
210 | 190 | 1. Checkout your release branch, you should have created when releasing
|
211 | 191 | previous RC and bump the version numbers in `main/php_version.h`,
|
|
245 | 225 | email.
|
246 | 226 |
|
247 | 227 | 11. Commit and push all the tarballs and signature files to
|
248 |
| - `web/php-distributions.git`, then update the git submodule reference in |
249 |
| - `web/php.git`: |
| 228 | + `web-php-distributions`, then update the git submodule reference in |
| 229 | + `web-php`: |
250 | 230 |
|
251 | 231 | ```sh
|
252 | 232 | git submodule init
|
|
259 | 239 | git push
|
260 | 240 | ```
|
261 | 241 |
|
262 |
| - This is to fetch the last commit id from php-distributions.git and commit |
263 |
| - this last commit id to `web/php.git`, then, website will now sync. |
| 242 | + This is to fetch the last commit id from `web-php-distributions` and commit |
| 243 | + this last commit id to `web-php`, then, website will now sync. |
264 | 244 |
|
265 | 245 | 12. Once the release has been tagged, contact release managers, Windows
|
266 | 246 | builders, and package maintainers so that they can build releases. Do not
|
267 | 247 | send this announcement to any public lists.
|
268 | 248 |
|
269 |
| -## Getting the stable release announced |
| 249 | +## Announcing a stable release |
270 | 250 |
|
271 |
| - 1. Update `phpweb/include/releases.inc` with the old release info (updates the |
| 251 | + 1. Update `web-php:include/releases.inc` with the old release info (updates the |
272 | 252 | download archives).
|
273 | 253 |
|
274 | 254 | * You can run `php bin/bumpRelease 7 4` where the first number is the major
|
|
277 | 257 | * If that fails for any non-trivially fixable reason, you can manually copy
|
278 | 258 | the old information to `include/releases.inc`.
|
279 | 259 |
|
280 |
| - 2. Update $data['X.Y'] in `phpweb/include/version.inc` |
| 260 | + 2. Update $data['X.Y'] in `web-php:include/version.inc` |
281 | 261 | (X.Y=major.minor release, e.g. '8.0'):
|
282 | 262 |
|
283 | 263 | * `version` to the full version number (e.g. '8.0.1')
|
|
287 | 267 |
|
288 | 268 | 3. Create the release file (`releases/x_y_z.php`):
|
289 | 269 |
|
290 |
| - Optionally use `phpweb/bin/createReleaseEntry -v x.y.z -r` to create |
| 270 | + Optionally use `bin/createReleaseEntry -v x.y.z -r` to create |
291 | 271 | a standard announcement template for this and step 6.
|
292 | 272 | Add `--security` for a security release.
|
293 | 273 |
|
|
296 | 276 |
|
297 | 277 | Edit the generated files to expand on the base message if needed.
|
298 | 278 |
|
299 |
| - 4. Update `php-qa/include/release-qa.php` and add the next version as an |
| 279 | + 4. Update `web-qa:include/release-qa.php` and add the next version as an |
300 | 280 | QARELEASE (prepare for next RC). Keep `active => true` until there will be
|
301 | 281 | no more QA releases. Setting the release number to 0 is sufficient to
|
302 | 282 | remove the old QA release from the available QA releases list.
|
|
305 | 285 |
|
306 | 286 | e.g. `ChangeLog-7.php` from the `NEWS` file
|
307 | 287 |
|
308 |
| - * You may want to try `php-web/bin/news2html` to automate this task. |
| 288 | + * You may want to try `web-php:bin/news2html` to automate this task. |
309 | 289 |
|
310 | 290 | * Go over the list and put every element on one line.
|
311 | 291 | * Check for `&`, `<` and `>` and escape them if necessary.
|
|
322 | 302 |
|
323 | 303 | V. `s/FR #\([0-9]\+\)/FR <?php bugl(\1); ?>/`
|
324 | 304 |
|
325 |
| - 6. Add a short notice to phpweb stating that there is a new release, and |
| 305 | + 6. Add a short notice to `web-php` stating that there is a new release, and |
326 | 306 | highlight the major important things (security fixes) and when it is
|
327 | 307 | important to upgrade.
|
328 | 308 |
|
329 | 309 | * Call `php bin/createReleaseEntry -v <version> [ --security ]` in your
|
330 |
| - local phpweb checkout. |
| 310 | + local web-php checkout. |
331 | 311 |
|
332 | 312 | 7. Commit and push all the changes to their respective git repos
|
333 | 313 |
|
|
352 | 332 |
|
353 | 333 | ## Re-releasing the same version (or -pl)
|
354 | 334 |
|
355 |
| - 1. Commit the new binaries to `phpweb/distributions/` |
| 335 | + 1. Commit the new binaries to `web-php-distributions` |
356 | 336 |
|
357 |
| - 2. Update $data['X.Y'] in `phpweb/include/version.inc` |
| 337 | + 2. Update $data['X.Y'] in `web-php:/include/version.inc` |
358 | 338 | (X.Y=major.minor release, e.g. '8.0'):
|
359 | 339 |
|
360 | 340 | * `version` to the full version number (e.g. '8.0.1-pl1')
|
361 | 341 | * `date` to the release date in `j M Y` format (e.g. '9 Jan 2021')
|
362 | 342 | * `tags` array should include `security` if this is a security release
|
363 | 343 | * `sha256` array and sub-elements for all SHA256 sums
|
364 | 344 |
|
365 |
| - 3. Add a short notice to phpweb stating that there is a new release, and |
| 345 | + 3. Add a short notice to `web-php` stating that there is a new release, and |
366 | 346 | highlight the major important things (security fixes) and when it is
|
367 | 347 | important to upgrade.
|
368 | 348 |
|
369 | 349 | * Call `php bin/createReleaseEntry -v <version> [ --security ]` in your
|
370 |
| - local phpweb checkout. |
| 350 | + local web-php checkout. |
371 | 351 |
|
372 | 352 | 4. Commit all the changes (`include/version.inc`, `archive/archive.xml`,
|
373 | 353 | `archive/entries/YYYY-MM-DD-N.xml`).
|
|
412 | 392 |
|
413 | 393 | http://news.php.net/php.internals/99903
|
414 | 394 |
|
415 |
| - 4. Update php-web:git.php and https://wiki.php.net/vcs/gitworkflow to reflect |
| 395 | + 4. Update `web-php:git.php` and https://wiki.php.net/vcs/gitworkflow to reflect |
416 | 396 | the new branch. Example:
|
417 | 397 |
|
418 | 398 | https://github.com/php/web-php/commit/74bcad4c770d95f21b7fbeeedbd76d943bb83f23
|
@@ -448,28 +428,22 @@ branch:
|
448 | 428 |
|
449 | 429 | 3. Help the new release managers with their first steps.
|
450 | 430 |
|
451 |
| -## New Release Manager checklist |
| 431 | +## New Release Manager Checklist |
452 | 432 |
|
453 |
| - 1. Email systems@ to get setup for access to downloads.php.net and to be added |
| 433 | + 1. Email systems@php.net to get setup for access to downloads.php.net and to be added |
454 | 434 | to the release-managers@ distribution list.
|
| 435 | + |
| 436 | + 2. Request membership to the Release Managers group on github. |
455 | 437 |
|
456 |
| - 2. Create a GPG key for your @php.net address and publish it by editing |
| 438 | + 3. Create a GPG key for your @php.net address and publish it by editing |
457 | 439 | `include/gpg-keys.inc` in the `web-php` repository, adding the output of
|
458 | 440 | `gpg --fingerprint "[email protected]"`. Let one or more of the previous RMs
|
459 | 441 | sign your key. Publish your public key to pgp.mit.edu with:
|
460 | 442 | `gpg --keyserver pgp.mit.edu --send-keys $KEYID`
|
461 | 443 | Add new keys in the php-keyring.gpg in distribution repository using:
|
462 | 444 | `gpg2 --export --export-options export-minimal --armor <all RM keys>`
|
463 | 445 |
|
464 |
| - 3. Request karma to edit `main/php_version.h` and `Zend/zend.h`. Possibly karma |
465 |
| - for other restricted parts of php-src might come in question. To edit |
466 |
| - `main/php_version.h` in a release branch, you need release manager karma in |
467 |
| - `global_avail`. |
468 |
| -
|
469 |
| - 4. Request karma for `web/qa.git` and `web/php.git` for publishing release |
470 |
| - announcements. |
471 |
| -
|
472 |
| - 5. Request moderation access to [email protected] and |
| 446 | + 4. Request moderation access to [email protected] and |
473 | 447 | [email protected] lists, to be able to moderate your release
|
474 | 448 | announcements. All the announcements should ideally be sent from the
|
475 | 449 | @php.net alias. Note, that for sending emails as @php.net alias a custom
|
|
0 commit comments