@@ -26,6 +26,7 @@ had several contributions accepted, commit privileges are often quickly granted.
26
26
* [ What happens when your contribution is applied?] ( #what-happens-when-your-contribution-is-applied )
27
27
* [ Git commit rules] ( #git-commit-rules )
28
28
* [ Copyright and license headers] ( #copyright-and-license-headers )
29
+ * [ NEWS file] ( #news )
29
30
30
31
## Pull requests
31
32
@@ -385,11 +386,8 @@ The next few rules are more of a technical nature:
385
386
later branches) an empty merge should be done.
386
387
387
388
2 . All news updates intended for public viewing, such as new features, bug
388
- fixes, improvements, etc., should go into the NEWS file of * any stable
389
- release* version with the given change. In other words, news about a bug fix
390
- which went into PHP-5.4, PHP-5.5 and master should be noted in both
391
- PHP-5.4/NEWS and PHP-5.5/NEWS but not master, which is not a public released
392
- version yet.
389
+ fixes, improvements, etc., should go into the NEWS file. See the section on
390
+ [ NEWS] ( #news ) below.
393
391
394
392
3 . Do not commit multiple files and dump all messages in one commit. If you
395
393
modified several unrelated files, commit each group separately and provide a
@@ -422,14 +420,13 @@ An Example from the git project (commit 2b34e486bc):
422
420
'arg' variable no longer is available.
423
421
424
422
If you fix some bugs, you should note the bug ID numbers in your commit message.
425
- Bug ID should be prefixed by ` # ` .
426
423
427
424
Example:
428
425
429
- Fixed bug #14016 (pgsql notice handler double free crash bug.)
426
+ Fixed GH-14009: Fix prototype for trait method.
430
427
431
- When you change the NEWS file for a bug fix, then please keep the bugs sorted in
432
- decreasing order under the fixed version.
428
+ When you change the NEWS file for a bug fix, then please keep the bugs sorted
429
+ under the fixed version.
433
430
434
431
## Copyright and license headers
435
432
@@ -453,4 +450,90 @@ New source code files should include the following header block:
453
450
*/
454
451
```
455
452
453
+ ## NEWS
454
+
455
+ The purpose of the NEWS file is to record all the changes that are relevant for
456
+ users and developers alike. These could be bug fixes, feature additions, syntax
457
+ additions, or deprecations.
458
+
459
+ ### Format
460
+
461
+ Each PHP version has a section, starting with the format:
462
+
463
+ {DD} {MMM} {YYY}, PHP {version}
464
+
465
+ Such as:
466
+
467
+ 06 Jun 2024, PHP 8.1.29
468
+
469
+ In each section, entries are ordered by their extension. Extensions are listed
470
+ alphabetically, with the exception of "Core", which MUST be listed first. Each
471
+ extension's section starts with: ` - {name}:\n `
472
+
473
+ For each extension, entries are indented by two spaces, followed by ` . ` (a
474
+ period and a space).
475
+
476
+ Entries MUST start with a capital and end with a period (` . ` ). The period goes
477
+ outside of the ` {issue-description} ` .
478
+
479
+ Each entry SHOULD be followed by the name of the contributor, their php.net
480
+ account name, or their GitHub handle if they so choose.
481
+
482
+ Entries MUST be wrapped at 80 characters.
483
+
484
+ If an entry pertains a bug fix, they MUST be formatted as:
485
+
486
+ Fixed bug GH-{number} ({issue-description}). ({contributor})
487
+
488
+ Bug fix entries SHOULD be clustered together, and ordered according to their
489
+ issue number. The ` {issue-description} ` SHOULD represent what the actual bug
490
+ fix is about, and not necessarily what the user reported. Edit the description
491
+ in the GitHub ticket to match.
492
+
493
+ On the rare occasion where a bug from our deprecated bug system is fixed, the
494
+ entry MUST be formatted as:
495
+
496
+ Fixed bug #{number} ({issue-description}). ({contributor})
497
+
498
+ An example:
499
+
500
+ ```
501
+ 31 Jul 2025, PHP 8.5.0alpha4
502
+
503
+ - Core:
504
+ . Added PHP_BUILD_PROVIDER constant. (timwolla)
505
+ . Fixed bug GH-16665 (\array and \callable should not be usable in
506
+ class_alias). (nielsdos)
507
+ . Fixed bug GH-19326 (Calling Generator::throw() on a running generator with
508
+ a non-Generator delegate crashes). (Arnaud)
509
+
510
+ - OPcache:
511
+ . Make OPcache non-optional. (Arnaud, timwolla)
512
+
513
+ - OpenSSL:
514
+ . Add $digest_algo parameter to openssl_public_encrypt() and
515
+ openssl_private_decrypt() functions. (Jakub Zelenka)
516
+ ```
517
+
518
+ ### Branches
519
+
520
+ Depending on what sort of fix it is, or where in the release cycle we are,
521
+ different NEWS files must be updated.
522
+
523
+ * Security fixes* : In the lowest security-supported branch which received the
524
+ security fix, and in each newer branch, except for master unless alpha releases
525
+ have been tagged, and a release branch has not been created.
526
+
527
+ * Bug fixes* : In the lowest supported branch, and in each newer branch, except
528
+ for master unless alpha releases have been tagged, and a release branch has not
529
+ been created.
530
+
531
+ * Feature additions* : In master only.
532
+
533
+ If for some reason a feature is introduced in a branch lower than master,
534
+ although this is strictly prohibited by other policies, then the entry must
535
+ also be in master.
536
+
537
+ ## Thanks
538
+
456
539
Thank you for contributing to PHP!
0 commit comments