Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 193 lines (148 sloc) 8.022 kb
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
1 Submitting Enhancements and Patches to PHP
2 ==========================================
69d6f1e3 » Yasuo Ohgaki
2002-03-19 Added README.SUBMITTING_PATCH file. Please fix/add/change.
3
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
4 This document describes how to submit an enhancement or patch for PHP.
5 It's easy!
69d6f1e3 » Yasuo Ohgaki
2002-03-19 Added README.SUBMITTING_PATCH file. Please fix/add/change.
6
95af3404 » Christopher Jones
2009-11-20 Mention account access so we can refer account-requestors to this README
7 You don't need any login accounts or special access to download,
b278aba4 » johannes
2013-07-19 Update patch submitting instructions
8 build, debug and begin submitting PHP or PECL code, tests or
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
9 documentation. Once you've followed this README and had several
10 patches accepted, commit privileges are often quickly granted.
95af3404 » Christopher Jones
2009-11-20 Mention account access so we can refer account-requestors to this README
11
afb52093 » Christopher Jones
2009-11-12 Add auroraeos's article URL. Add IRC channels
12 An excellent article to read first is:
13 http://phpadvent.org/2008/less-whining-more-coding-by-elizabeth-smith
14
69d6f1e3 » Yasuo Ohgaki
2002-03-19 Added README.SUBMITTING_PATCH file. Please fix/add/change.
15
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
16 Online Forums
17 -------------
18 There are several IRC channels where PHP developers are often
b278aba4 » johannes
2013-07-19 Update patch submitting instructions
19 available to discuss questions. They include #php.pecl and #php.doc
20 on the EFNet network and #php-dev-win on FreeNode.
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
21
22
23 PHP Patches
24 -----------
25 If you are fixing broken functionality in PHP C source code first
26 create a bug or identify an existing bug at http://bugs.php.net/. A
27 bug can be used to track the patch progress and prevent your changes
28 getting lost in the PHP mail archives.
29
30 If your change is large then create a Request For Comment (RFC) page
31 on http://wiki.php.net/rfc, discuss it with the extension maintainer,
32 and discuss it on the development mail list internals@lists.php.net.
33 RFC Wiki accounts can be requested on
34 http://wiki.php.net/start?do=register. PHP extension maintainers can
35 be found in the EXTENSIONS file in the PHP source. Mail list
36 subscription is explained on http://www.php.net/mailing-lists.php.
37
38 Information on PHP internal C functions is at
39 http://www.php.net/internals, though this is considered incomplete.
40 Various external resources can be found on the web. A standard
41 printed reference is the book "Extending and Embedding PHP" by Sara
42 Golemon.
ea0105a0 » Christopher Jones
2009-11-06 Add pecl mail list
43
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
44 Attach the patch to the PHP bug and consider sending a notification
45 email about the change to internals@lists.php.net. Also CC the
46 extension maintainer. Explain what has been changed by your patch.
47 Test scripts should be included.
5e34310a » Christopher Jones
2010-02-23 Add info on PHP doc contributions and add internals references
48
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
49 Please make the mail subject prefix "[PATCH]". If attaching a patch,
50 ensure it has a file extension of ".txt". This is because only MIME
51 attachments of type 'text/*' are accepted.
5e34310a » Christopher Jones
2010-02-23 Add info on PHP doc contributions and add internals references
52
d65ddb63 » Yasuo Ohgaki
2014-01-27 Fix English and improve by Stas. Thanks :)
53 The preferred way to propose PHP patch is sending pull request from
54 github.
f496aac1 » Yasuo Ohgaki
2014-01-26 Update source docs
55
56 https://github.com/php/php-src
57
d65ddb63 » Yasuo Ohgaki
2014-01-27 Fix English and improve by Stas. Thanks :)
58 Fork the official PHP repository and send a pull request. A
59 notification will be sent to the pull request mailing list. Sending a
60 note to PHP Internals list (internals@lists.php.net) may help getting
61 more feedback and quicker turnaround. You can also add pull requests
62 to bug reports at http://bugs.php.net/.
f496aac1 » Yasuo Ohgaki
2014-01-26 Update source docs
63
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
64
65 PHP Documentation Patches
66 -------------------------
67 If you are fixing incorrect PHP documentation first create a bug or
68 identify an existing bug at http://bugs.php.net/. A bug can be used
69 to track the patch progress and prevent your changes getting lost in
70 the PHP mail archives.
71
72 If your change is large, then first discuss it with the mail list
73 phpdoc@lists.php.net. Subscription is explained on
74 http://www.php.net/mailing-lists.php.
5e34310a » Christopher Jones
2010-02-23 Add info on PHP doc contributions and add internals references
75
76 Information on contributing to PHP documentation is at
77 http://php.net/dochowto and http://wiki.php.net/doc/howto
69d6f1e3 » Yasuo Ohgaki
2002-03-19 Added README.SUBMITTING_PATCH file. Please fix/add/change.
78
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
79 Attach the patch to the PHP bug and consider sending a notification
80 email about the change to phpdoc@lists.php.net. Explain what has been
81 fixed/added/changed by your patch.
82
83 Please make the mail subject prefix "[PATCH]". Include the bug id(s)
84 which can be closed by your patch. If attaching a patch, ensure it
85 has a file extension of ".txt". This is because only MIME attachments
86 of type 'text/*' are accepted.
87
88
89 PECL Extension Patches: http://pecl.php.net/
90 --------------------------------------------
91 If you are fixing broken functionality in a PECL extension then create
b278aba4 » johannes
2013-07-19 Update patch submitting instructions
92 a bug or identify an existing bug at http://bugs.php.net/. A bug
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
93 can be used to track the patch progress and prevent your changes
94 getting lost in the PHP mail archives.
95
96 If your change is large then create a Request For Comment (RFC) page
97 on http://wiki.php.net/rfc, discuss it with the extension maintainer,
98 and discuss it on the development mail list pecl-dev@lists.php.net.
99 PECL mail list subscription is explained on
100 http://pecl.php.net/support.php. RFC Wiki accounts can be requested
101 on http://wiki.php.net/start?do=register
102
103 Information on PHP internal C functions is at
104 http://www.php.net/internals, though this is considered incomplete.
105 Various external resources can be found on the web. A standard
106 printed reference is the book "Extending and Embedding PHP" by Sara
107 Golemon.
108
109 Update any open bugs and add a link to the source of your patch. Send
110 the patch or pointer to the bug to pecl-dev@lists.php.net. Also CC
111 the extension maintainer. Explain what has been changed by your
112 patch. Test scripts should be included.
113
114 Please make the mail subject prefix "[PATCH] ...". Include the patch
115 as an attachment with a file extension of ".txt". This is because
116 only MIME attachments of type 'text/*' are accepted.
117
118
119 PEAR Package Patches: http://pear.php.net/
120 ------------------------------------------
121 Information on contributing to PEAR is available at
122 http://pear.php.net/manual/en/developers-newmaint.php and
123 http://pear.php.net/manual/en/guide-developers.php
afb52093 » Christopher Jones
2009-11-12 Add auroraeos's article URL. Add IRC channels
124
69d6f1e3 » Yasuo Ohgaki
2002-03-19 Added README.SUBMITTING_PATCH file. Please fix/add/change.
125
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
126 How to create your PHP, PHP Documentation or PECL patch
127 -------------------------------------------------------
b278aba4 » johannes
2013-07-19 Update patch submitting instructions
128 PHP and most PECL packages use Git for revision control. Some PECL
129 packages use Subversion (SVN) Read http://www.php.net/git.php for help
130 on using Git to get and build PHP source code. We recommend to look
131 at our workflow on https://wiki.php.net/vcs/gitworkflow and our FAQ
132 https://wiki.php.net/vcs/gitfaq.
69d6f1e3 » Yasuo Ohgaki
2002-03-19 Added README.SUBMITTING_PATCH file. Please fix/add/change.
133
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
134 Generally we ask that bug fix patches work on the current stable PHP
b278aba4 » johannes
2013-07-19 Update patch submitting instructions
135 development branches and on "master". New PHP features only need to
136 work on "master".
69d6f1e3 » Yasuo Ohgaki
2002-03-19 Added README.SUBMITTING_PATCH file. Please fix/add/change.
137
09205f9f » Christopher Jones
2009-11-05 Update and fix grammar
138 Read CODING_STANDARDS before you start working.
69d6f1e3 » Yasuo Ohgaki
2002-03-19 Added README.SUBMITTING_PATCH file. Please fix/add/change.
139
09205f9f » Christopher Jones
2009-11-05 Update and fix grammar
140 After modifying the source see README.TESTING and
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
141 http://qa.php.net/write-test.php for how to test. Submitting test
142 scripts helps us to understand what functionality has changed. It is
ea0105a0 » Christopher Jones
2009-11-06 Add pecl mail list
143 important for the stability and maintainability of PHP that tests are
144 comprehensive.
69d6f1e3 » Yasuo Ohgaki
2002-03-19 Added README.SUBMITTING_PATCH file. Please fix/add/change.
145
ea0105a0 » Christopher Jones
2009-11-06 Add pecl mail list
146 After testing is finished, create a patch file using the command:
69d6f1e3 » Yasuo Ohgaki
2002-03-19 Added README.SUBMITTING_PATCH file. Please fix/add/change.
147
b278aba4 » johannes
2013-07-19 Update patch submitting instructions
148 git diff > your_patch.txt
69d6f1e3 » Yasuo Ohgaki
2002-03-19 Added README.SUBMITTING_PATCH file. Please fix/add/change.
149
09205f9f » Christopher Jones
2009-11-05 Update and fix grammar
150 For ease of review and later troubleshooting, submit individual
151 patches for each bug or feature.
69d6f1e3 » Yasuo Ohgaki
2002-03-19 Added README.SUBMITTING_PATCH file. Please fix/add/change.
152
153
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
154 Checklist for submitting your PHP or PECL code patch
155 ----------------------------------------------------
b278aba4 » johannes
2013-07-19 Update patch submitting instructions
156 - Update git source just before running your final 'diff' and
ea0105a0 » Christopher Jones
2009-11-06 Add pecl mail list
157 before testing.
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
158 - Add in-line comments and/or have external documentation ready.
159 Use only "/* */" style comments, not "//".
160 - Create test scripts for use with "make test".
09205f9f » Christopher Jones
2009-11-05 Update and fix grammar
161 - Run "make test" to check your patch doesn't break other features.
162 - Rebuild PHP with --enable-debug (which will show some kinds of
163 memory errors) and check the PHP and web server error logs after
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
164 running your PHP tests.
165 - Rebuild PHP with --enable-maintainer-zts to check your patch
166 compiles on multi-threaded web servers.
09205f9f » Christopher Jones
2009-11-05 Update and fix grammar
167 - Review the patch once more just before submitting it.
69d6f1e3 » Yasuo Ohgaki
2002-03-19 Added README.SUBMITTING_PATCH file. Please fix/add/change.
168
87e3b970 » Melvyn Sopacua
2002-11-14 Add a note about the mime-type
169
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
170 What happens after submitting your PHP, PHP Documentation or PECL patch
171 -----------------------------------------------------------------------
09205f9f » Christopher Jones
2009-11-05 Update and fix grammar
172 If your patch is easy to review and obviously has no side-effects,
173 it might be committed relatively quickly.
174
175 Because PHP is a volunteer-driven effort more complex patches will
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
176 require patience on your side. If you do not receive feedback in a
177 few days, consider resubmitting the patch. Before doing this think
178 about these questions:
0459ad70 » Sascha Schumann
2002-03-19 some typo fixing, and following The Little Book, omitting needless words
179
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
180 - Did I send the patch to the right mail list?
09205f9f » Christopher Jones
2009-11-05 Update and fix grammar
181 - Did I review the mail list archives to see if these kind of
182 changes had been discussed before?
183 - Did I explain my patch clearly?
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
184 - Is my patch too hard to review? Because of what factors?
69d6f1e3 » Yasuo Ohgaki
2002-03-19 Added README.SUBMITTING_PATCH file. Please fix/add/change.
185
186
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
187 What happens when your PHP or PECL patch is applied
188 ---------------------------------------------------
b278aba4 » johannes
2013-07-19 Update patch submitting instructions
189 Your name will likely be included in the Git commit log. If your
8b1dc1b6 » Christopher Jones
2010-05-11 Restructure into PHP/PECL/PEAR component areas (at the expense of dup…
190 patch affects end users, a brief description and your name might be
191 added to the NEWS file.
69d6f1e3 » Yasuo Ohgaki
2002-03-19 Added README.SUBMITTING_PATCH file. Please fix/add/change.
192
09205f9f » Christopher Jones
2009-11-05 Update and fix grammar
193 Thank you for patching PHP!
Something went wrong with that request. Please try again.