PHP in the previous source code to the git management, but also in the github (https://github.com/php/php-src) on the image, so that more developers to contribute code for PHP.
Today, I wrote this article to help students in China who are willing to contribute to the PHP open-source community. I will give an example of how to contribute your wisdom to PHP.
Now, if you want to contribute a new feature, you need to submit an RFC on wiki.php.net in addition to the following steps. I will introduce this later, now let's make it simple. Suppose you just want to fix a bug for PHP (in general, you can find the bug already reported by PHP: PHP Bugs here ). now let's assume you have figured out how to fix this Bug.
1. First, you need to have a github account. If not, register here: Register github.
2. Fork PHP source code, there is a fork button in the top right corner of the PHP Github page, click it
3. After Fork, you will have a PHP source code repository of your own. Now you can modify the source code of PHP in this repository to fix bugs.
I will provide you with a simple description here. If you start development on Github, there will be a description on the page of your own PHP code repository, for example, on the my PHP repository page, https://github.com/laruence/php-src:
ssh git@github.com:laruence/php-src.git
Then, in the local development environment, execute:
$git clone git@github.com:laruence/php-src.git
Then, you get a php-src directory. Go to the Development page.
4. after the repair is completed, you submit it to your own PHP repository. Then, in the upper right corner of the Github page of your PHP source code repository, there will be a pull request button. click it.
Note the format of your submission description when submitting. the first line should be a brief description (up to 79 characters), indicating what changes you have made. if one sentence is not enough, insert a blank line and enter the description of the large segment (see New Commit Message Format ):
<max 79 characters short description>\n\n<long description, 79 chars per line>\n
If you fixed a bug in bugs.php.net, your brief description should be similar to the following format:
Fixed Bug # bug number (Bug description)
5. then, fill in the relevant information, Github will send a new pull request email containing your updated Pull Request to the PHP pull request contact group (you do not have to worry about your English, as long as you can say it, we can understand it. Of course, if you really don't want to write English, it doesn't matter. If you write Chinese, I can handle it. I can't handle it, I will also translate for you ).
6. finally, if PHP Committers think that your repair is correct (there are some options to pay attention to contributing code to PHP, I will stay below ). it will Merge your Pull Request to the PHP source code.
Now, if you want to submit an update (Add a new function and add a new syntax), when you submit a Pull Request, you also need to send an email to the internals@lists.php.net Contact Group to illustrate why you want to submit this update and let people in this contact group discuss it and help you improve your thinking.
Finally, after you have made some updates to PHP (updates accepted by the Committer), you can try to apply for a PHP Developer account on: Register Svn Accout.
Appendix:
There are several notes for contributing source code to PHP (Common Problems ):
- Write only the code compatible with C89. For example, do not use a single line comment (//). The variable definition must be prior to all statements (the beginning of block )..
- Variable naming, which follows the existing PHP specifications. Do not use hump naming.
- For some minor updates, such as spelling errors in the code, we encourage you to submit patches on bugs.php.net. After all, Merge Pull Request may be troublesome sometimes.
For more PHP code specifications, see Submitting patch.