Skip to content

Commit d094ca8

Browse files
committed
Catch up with current procedures
- Git is used for moving existing extensions to PECL - PHP versions with the PHP 7.4 examples - Some minor tweaks here and there - Mention re2c also - Mention Docker image as a helper tool
1 parent 5017676 commit d094ca8

File tree

1 file changed

+58
-45
lines changed

1 file changed

+58
-45
lines changed

docs/release-process.md

Lines changed: 58 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -37,34 +37,43 @@
3737

3838
Moving extensions from php-src to PECL:
3939

40-
* Checkout the pecl directory, most likely you want a sparse-root checkout
40+
* Ask someone with Git admin access to create a new empty repository on
41+
https://git.php.net under the PECL projects and a belonging GitHub mirror.
4142

42-
```
43-
svn co --depth=empty https://svn.php.net/repository/pecl
43+
* Clone a new copy of the php-src repository (it will rewrite history, keep
44+
contributors commits and include only the extension folder):
45+
46+
```sh
47+
git clone https://git.php.net/repository/php-src.git ext-name
48+
cd ext-name
49+
git filter-branch --prune-empty --subdirectory-filter ext/ext-name master
4450
```
4551

46-
* Create a directory for the extension including branch and tag structure,
47-
no trunk at this point and commit this to svn
52+
* Set remote Git push URL for the PECL extension:
4853

49-
```
50-
cd pecl; mkdir foo foo/tags foo/branches; svn add foo; svn commit
51-
```
54+
```sh
55+
git remote set-url origin [email protected]:pecl/category/ext-name
56+
```
5257

53-
* Move the extension from php-src to the new location
58+
* Create branch and tags structure appropriate for the extension and push:
5459

55-
```
56-
svn mv https://svn.php.net/repository/php/php-src/trunk/ext/foo \
57-
https://svn.php.net/repository/pecl/foo/trunk
58-
```
60+
```sh
61+
git push -u origin master
62+
```
5963

6064
If the extension is still usable or not dead, in cooperation with the
6165
extension maintainers if any:
66+
6267
* Create the pecl.php.net/foo package and its content, license, maintainer
6368
* Create the package.xml, commit
6469
* Release the package
6570

66-
For moving extensions from PECL to php-src the svn mv has to be done the
67-
other way round.
71+
For moving extensions from PECL to php-src the procedure needs to go through
72+
the RFC process and a new Git commit without rewriting the php-src Git
73+
commit history.
74+
75+
8. There is a PHP release Docker image https://github.com/sgolemon/php-release
76+
with forks available to help releasing.
6877

6978
## Rolling a non stable release (alpha/beta/RC)
7079

@@ -76,42 +85,43 @@
7685
3. Run the `scripts/dev/credits` script in php-src and commit the changes in
7786
the credits files in ext/standard.
7887

79-
4. Checkout the release branch for this release (e.g., PHP-5.4.2) from the main
88+
4. Checkout the release branch for this release (e.g., PHP-7.4.2) from the main
8089
branch.
8190

8291
5. Bump the version numbers in `main/php_version.h`, `Zend/zend.h`,
8392
`configure.ac` and possibly `NEWS`. Do not use abbreviations for alpha and
84-
beta. Do not use dashes, you should `#define PHP_VERSION "5.4.22RC1"` and
85-
not `#define PHP_VERSION "5.4.22-RC1"`
93+
beta. Do not use dashes, you should `#define PHP_VERSION "7.4.22RC1"` and
94+
not `#define PHP_VERSION "7.4.22-RC1"`
8695

87-
6. Compile and run `make test`, with and without ZTS, using the right Bison
88-
version (for example, for PHP 7.4, minimum Bison 3.0.0 is used).
96+
6. Compile and run `make test`, with and without ZTS, using the right Bison and
97+
re2c version (for PHP 7.4, minimum Bison 3.0.0 and re2c 0.13.4 are used).
8998

9099
7. Check `./sapi/cli/php -v` output for version matching.
91100

92101
8. If all is right, commit the changes to the release branch:
93102

94-
```
103+
```sh
95104
git commit -a
96105
```
97106

98107
9. Tag the repository release branch with the version, e.g.:
99108

100-
```
101-
git tag -u YOURKEYID php-5.4.2RC2
109+
```sh
110+
git tag -u YOURKEYID php-7.4.2RC2
102111
```
103112

104113
10. Bump the version numbers in `main/php_version.h`, `Zend/zend.h`,
105-
`configure.ac` and `NEWS` in the *main* branch (PHP-5.4 for example) to
106-
prepare for the **next** version. F.e. if the RC is "5.4.1RC1" then the new
107-
one should be `5.4.2-dev` - regardless if we get a new RC or not. This is to
114+
`configure.ac` and `NEWS` in the *main* branch (PHP-7.4 for example) to
115+
prepare for the **next** version. F.e. if the RC is "7.4.1RC1" then the new
116+
one should be `7.4.2-dev` - regardless if we get a new RC or not. This is to
108117
make sure `version_compare()` can correctly work. Commit the changes to the
109118
main branch.
110119
111120
11. Push the changes to the main repo, the tag, the main branch and the release
112-
branch:
121+
branch. Release branches for alpha/beta/.0RCx releases before to GA release
122+
don't need to be pushed (a local temporary branch should be used).
113123
114-
```
124+
```sh
115125
git push --tags origin HEAD
116126
git push origin {main branch}
117127
git push origin {release branch}
@@ -139,15 +149,16 @@
139149
140150
1. Update `qa.git/include/release-qa.php` with the appropriate information. See
141151
the documentation within release-qa.php for more information, but all
142-
releases and RCs are configured here. Only $QA_RELEASES needs to be edited.
152+
releases and RCs are configured here. Only `$QA_RELEASES` needs to be
153+
edited.
143154
144-
Example: When rolling an RC, set the 'rc' with appropriate information for
155+
Example: When rolling an RC, set the `rc` with appropriate information for
145156
the given version.
146157
147158
Note: Remember to update the sha256 checksum information.
148159
149160
2. Skip this step for non stable releases after GA of minor or major versions
150-
(e.g. announce 7.3.0RC1, but not 7.3.1RC1):
161+
(e.g. announce 7.4.0RC1, but not 7.4.1RC1):
151162
152163
Add a short notice to phpweb stating that there is a new release, and
153164
highlight the major important things (security fixes) and when it is
@@ -159,9 +170,9 @@
159170
160171
* Add the content for the news entry. Be sure to include the text:
161172
162-
```
163-
"THIS IS A DEVELOPMENT PREVIEW - DO NOT USE IT IN PRODUCTION!"
164-
```
173+
```text
174+
"THIS IS A DEVELOPMENT PREVIEW - DO NOT USE IT IN PRODUCTION!"
175+
```
165176
166177
3. Commit and push changes to qa and web.
167178
@@ -181,7 +192,7 @@
181192
setup as a moderator for `[email protected]` by having someone
182193
(Hannes, Dan, Derick) run the following commands for you:
183194
184-
```
195+
```sh
185196
ssh lists.php.net
186197
sudo -u ezmlm ezmlm-sub ~ezmlm/primary-qa-tester/mod moderator-email-address
187198
```
@@ -194,7 +205,7 @@
194205
195206
2. If a CVE commit needs to be merged to the release, then have it committed to
196207
the base branches and merged upwards as usual (f.e commit the CVE fix to
197-
5.3, merge to 5.4, 5.5 etc...). Then you can cherry-pick it in your release
208+
7.2, merge to 7.3, 7.4 etc...). Then you can cherry-pick it in your release
198209
branch. Don't forget to update `NEWS` manually in an extra commit then.
199210
200211
3. Commit those changes. Ensure the tests at
@@ -203,8 +214,8 @@
203214
4. Run the `scripts/dev/credits` script in php-src and commit the changes in
204215
the credits files in ext/standard.
205216
206-
5. Compile and make test, with and without ZTS, using the right Bison version
207-
(for example, for PHP 7.4, minimum Bison 3.0.0 is used).
217+
5. Compile and run `make test`, with and without ZTS, using the right Bison and
218+
re2c version (for PHP 7.4, minimum Bison 3.0.0 and re2c 0.13.4 are used).
208219
209220
6. Check `./sapi/cli/php -v` output for version matching.
210221
@@ -229,7 +240,7 @@
229240
`web/php-distributions.git`, then update the git submodule reference in
230241
`web/php.git`:
231242
232-
```
243+
```sh
233244
git submodule init
234245
git submodule update
235246
cd distributions
@@ -252,8 +263,8 @@
252263
1. Update `phpweb/include/releases.inc` with the old release info (updates the
253264
download archives).
254265
255-
* You can run `php bin/bumpRelease 7 2` where the first number is the major
256-
version, and the second number is the minor version (7.2 in this example).
266+
* You can run `php bin/bumpRelease 7 4` where the first number is the major
267+
version, and the second number is the minor version (7.4 in this example).
257268
258269
* If that fails for any non-trivially fixable reason, you can manually copy
259270
the old information to `include/releases.inc`.
@@ -263,12 +274,12 @@
263274
* `$PHP_X_Y_VERSION` to the correct version
264275
* `$PHP_X_Y_DATE` to the release date
265276
* `$PHP_X_Y_SHA256` array and update all the SHA256 sums
266-
* `$PHP_X_Y_TAGS` array should include 'security' if this is a security
277+
* `$PHP_X_Y_TAGS` array should include `security` if this is a security
267278
release
268279
* Make sure there are no outdated "notes" or edited "date" keys in the
269280
`$RELEASES[X][$PHP_X_VERSION]["source"]` array.
270281
271-
3. Create the release file (releases/x_y_z.php)
282+
3. Create the release file (`releases/x_y_z.php`)
272283
273284
Usually we use the same content as for point 6, but included in php template
274285
instead of the release xml.
@@ -308,7 +319,7 @@
308319
309320
8. **Check website has been synced before announcing or pushing news**
310321
311-
Try, f.e. https://www.php.net/distributions/php-7.3.4.tar.xz
322+
Try, f.e. https://www.php.net/distributions/php-7.4.0.tar.xz
312323
313324
Website may update slowly (may take an hour).
314325
@@ -428,4 +439,6 @@
428439
429440
5. Request moderation access to [email protected] and
430441
[email protected] lists, to be able to moderate your release
431-
announcements. All the announcements should be sent from the @php.net alias.
442+
announcements. All the announcements should ideally be sent from the
443+
@php.net alias. Note, that for sending emails as @php.net alias a custom
444+
SMTP server needs to be used.

0 commit comments

Comments
 (0)