Skip to content

Commit 92665cd

Browse files
authored
update release process doc (#6829)
1 parent 93430e2 commit 92665cd

File tree

1 file changed

+84
-110
lines changed

1 file changed

+84
-110
lines changed

docs/release-process.md

+84-110
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,72 @@
11
# PHP release process
22

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+
321
## General notes and tips
422

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.
725

826
2. Package two days before a release. So if the release is to be on Thursday,
927
package on Tuesday. Think about timezones as well.
1028

11-
3. Ensure that the tests on Travis CI are green.
29+
3. Ensure that the relevant tests on CI are green.
1230

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/
1434

1535
It is recommended to do so a couple of days before the packaging day, to
1636
have enough time to investigate failures, communicate with the authors and
1737
commit the fixes.
1838

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.
2542

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
2844
proceeding. Ideally make sure that for the first releases one of the
2945
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.
5047

51-
* Set remote Git push URL for the PECL extension:
48+
5. Verify the tags to be extra sure everything was tagged properly.
5249

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
7551
with forks available to help releasing.
7652

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
7858

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)
8160

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.
8362

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
8564
the credits files in ext/standard.
8665

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
8867
branch.
8968

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`,
9170
`configure.ac` and possibly `NEWS`. Do not use abbreviations for alpha and
9271
beta. Do not use dashes, you should `#define PHP_VERSION "7.4.22RC1"` and
9372
not `#define PHP_VERSION "7.4.22-RC1"`.
@@ -99,78 +78,79 @@
9978
need to be rebuilt with each bump. Do *not* bump the API versions after
10079
RC1.
10180

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
10382
re2c version (for PHP 7.4, minimum Bison 3.0.0 and re2c 0.13.4 are used).
10483

105-
7. Check `./sapi/cli/php -v` output for version matching.
84+
6. Check `./sapi/cli/php -v` output for version matching.
10685

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:
10887

10988
```sh
11089
git commit -a
11190
```
11291

113-
9. Tag the repository release branch with the version, e.g.:
92+
8. Tag the repository release branch with the version, e.g.:
11493

11594
```sh
11695
git tag -u YOURKEYID php-7.4.2RC2
11796
```
11897

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`,
12099
`configure.ac` and `NEWS` in the *main* branch (PHP-7.4 for example) to
121100
prepare for the **next** version. For example, if the RC is "7.4.1RC1" then
122101
the new one should be `7.4.2-dev` - regardless if we get a new RC or not.
123102
This is to make sure `version_compare()` can correctly work. Commit the
124103
changes to the main branch.
125104
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).
129109
130110
```sh
131111
git push --tags origin HEAD
132112
git push origin {main branch}
133113
git push origin {release branch}
134114
```
135115
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,
137117
create `configure` and build three tarballs (gz, bz2 and xz).
138118
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
140120
tarballs and output verification information to be included in announcement
141121
email.
142122
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
144124
should be a directory `public_html/`. Copy them into there. If you do not
145125
have this directory, create it.
146126
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,
148128
e.g. https://downloads.php.net/~derick/.
149129
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
151131
list so that Windows binaries can be created. Once those are made, they can
152132
be found at https://windows.php.net/download.
153133
154-
## Getting the non stable release (alpha/beta/RC) announced
134+
## Announcing a non stable release (alpha/beta/RC)
155135
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
157137
the documentation within release-qa.php for more information, but all
158138
releases and RCs are configured here. Only `$QA_RELEASES` needs to be
159139
edited.
160140
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
162142
the given version.
163143
164144
Note: Remember to update the sha256 checksum information.
165145
166146
2. Skip this step for non stable releases after GA of minor or major versions
167147
(e.g. announce 7.4.0RC1, but not 7.4.1RC1):
168148
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
170150
highlight the major important things (security fixes) and when it is
171151
important to upgrade.
172152
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
174154
"frontpage" *and* "releases" for all stable releases. Use category
175155
"frontpage" for X.Y.0 non-stable releases only (news only).
176156
@@ -205,7 +185,7 @@
205185
6. For RCs, post tweet with release announcement (and link to news article on
206186
php.net) ([@official_php](https://twitter.com/official_php))
207187
208-
## Rolling a stable release
188+
## Packaging a stable release
209189
210190
1. Checkout your release branch, you should have created when releasing
211191
previous RC and bump the version numbers in `main/php_version.h`,
@@ -245,8 +225,8 @@
245225
email.
246226
247227
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`:
250230
251231
```sh
252232
git submodule init
@@ -259,16 +239,16 @@
259239
git push
260240
```
261241
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.
264244
265245
12. Once the release has been tagged, contact release managers, Windows
266246
builders, and package maintainers so that they can build releases. Do not
267247
send this announcement to any public lists.
268248
269-
## Getting the stable release announced
249+
## Announcing a stable release
270250
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
272252
download archives).
273253
274254
* You can run `php bin/bumpRelease 7 4` where the first number is the major
@@ -277,7 +257,7 @@
277257
* If that fails for any non-trivially fixable reason, you can manually copy
278258
the old information to `include/releases.inc`.
279259
280-
2. Update $data['X.Y'] in `phpweb/include/version.inc`
260+
2. Update $data['X.Y'] in `web-php:include/version.inc`
281261
(X.Y=major.minor release, e.g. '8.0'):
282262
283263
* `version` to the full version number (e.g. '8.0.1')
@@ -287,7 +267,7 @@
287267
288268
3. Create the release file (`releases/x_y_z.php`):
289269
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
291271
a standard announcement template for this and step 6.
292272
Add `--security` for a security release.
293273
@@ -296,7 +276,7 @@
296276
297277
Edit the generated files to expand on the base message if needed.
298278
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
300280
QARELEASE (prepare for next RC). Keep `active => true` until there will be
301281
no more QA releases. Setting the release number to 0 is sufficient to
302282
remove the old QA release from the available QA releases list.
@@ -305,7 +285,7 @@
305285
306286
e.g. `ChangeLog-7.php` from the `NEWS` file
307287
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.
309289
310290
* Go over the list and put every element on one line.
311291
* Check for `&`, `<` and `>` and escape them if necessary.
@@ -322,12 +302,12 @@
322302
323303
V. `s/FR #\([0-9]\+\)/FR <?php bugl(\1); ?>/`
324304
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
326306
highlight the major important things (security fixes) and when it is
327307
important to upgrade.
328308
329309
* Call `php bin/createReleaseEntry -v <version> [ --security ]` in your
330-
local phpweb checkout.
310+
local web-php checkout.
331311
332312
7. Commit and push all the changes to their respective git repos
333313
@@ -352,22 +332,22 @@
352332
353333
## Re-releasing the same version (or -pl)
354334
355-
1. Commit the new binaries to `phpweb/distributions/`
335+
1. Commit the new binaries to `web-php-distributions`
356336
357-
2. Update $data['X.Y'] in `phpweb/include/version.inc`
337+
2. Update $data['X.Y'] in `web-php:/include/version.inc`
358338
(X.Y=major.minor release, e.g. '8.0'):
359339
360340
* `version` to the full version number (e.g. '8.0.1-pl1')
361341
* `date` to the release date in `j M Y` format (e.g. '9 Jan 2021')
362342
* `tags` array should include `security` if this is a security release
363343
* `sha256` array and sub-elements for all SHA256 sums
364344
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
366346
highlight the major important things (security fixes) and when it is
367347
important to upgrade.
368348
369349
* Call `php bin/createReleaseEntry -v <version> [ --security ]` in your
370-
local phpweb checkout.
350+
local web-php checkout.
371351
372352
4. Commit all the changes (`include/version.inc`, `archive/archive.xml`,
373353
`archive/entries/YYYY-MM-DD-N.xml`).
@@ -412,7 +392,7 @@
412392
413393
http://news.php.net/php.internals/99903
414394
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
416396
the new branch. Example:
417397
418398
https://github.com/php/web-php/commit/74bcad4c770d95f21b7fbeeedbd76d943bb83f23
@@ -448,28 +428,22 @@ branch:
448428
449429
3. Help the new release managers with their first steps.
450430
451-
## New Release Manager checklist
431+
## New Release Manager Checklist
452432
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
454434
to the release-managers@ distribution list.
435+
436+
2. Request membership to the Release Managers group on github.
455437
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
457439
`include/gpg-keys.inc` in the `web-php` repository, adding the output of
458440
`gpg --fingerprint "[email protected]"`. Let one or more of the previous RMs
459441
sign your key. Publish your public key to pgp.mit.edu with:
460442
`gpg --keyserver pgp.mit.edu --send-keys $KEYID`
461443
Add new keys in the php-keyring.gpg in distribution repository using:
462444
`gpg2 --export --export-options export-minimal --armor <all RM keys>`
463445
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
473447
[email protected] lists, to be able to moderate your release
474448
announcements. All the announcements should ideally be sent from the
475449
@php.net alias. Note, that for sending emails as @php.net alias a custom

0 commit comments

Comments
 (0)