How to contribute code for PHP _php tutorial

Source: Internet
Author: User
Tags php source code
PHP has previously migrated the source code to git, and also mirrored it on GitHub (HTTPS://GITHUB.COM/PHP/PHP-SRC), which makes it easier for more developers to contribute code to PHP.
Write this article today, is to give in the domestic students, willing to contribute to the open source of PHP Community students, do an example, how to contribute your wisdom to PHP.
Now, assuming you're going to contribute a new feature, you'll need to submit an RfC on Wiki.php.net in addition to the steps below, and I'll introduce this later, so let's just say that you're only going to fix a bug for PHP (in general, You can find here that PHP has reported bug:php Bugs). Now suppose you've figured out how to fix this bug.
1. First, you need to have a GitHub account, if not, to register here: Register for GitHub.
2. Fork PHP Source code, on the PHP GitHub page in the upper right corner there is a Fork button, point it
3. After fork, you have a copy of your own PHP source code warehouse, now you can in this warehouse, modify the source of PHP to fix the bug.
There's nothing to say about the development, but if you have a problem with Git's use, you can refer to the GIT manual, like this: Progit
I am here to provide you with a simple explanation, if you start development on GitHub, on your own PHP code warehouse page, there will be a description, such as on my PHP warehouse page https://github.com/laruence/php-src:
SSH Git@github.com:laruence/php-src.git
Then, I'll do it on the local development environment:
$git Clone Git@github.com:laruence/php-src.git
Then you get a php-src directory, go in and develop it,
4. When you are done, you are submitted to your own PHP repository, and then, in the upper-right corner of the GitHub page of your PHP source code repository, there is a pull request button. Point it.
When submitting, please pay attention to the format of your submission instructions, first line should be a short description (up to 79 characters), indicating what changes you have made. If the sentence is not complete, insert a blank line and enter a description of the large segment (see new Commit Message Format):
\ n
\ n

\ n
If you are fixing a bug that is listed on the bugs.php.net, your short description should look like the following format:
1 Fixed bug #bug号 (description of bug)
5. Then, to fill in the relevant information, GitHub will send a pull request message containing your update to the Pull request Mail Group of PHP (you don't have to worry about your English, as long as you can say it, we can understand, of course, if you really do not want to write English, Also do not matter, write Chinese bar, I see will deal with, I can't handle, I also will for everybody translation).
6. Finally, if PHP committers think your fix is correct (there are some options for PHP contribution code to note, I'll stay below). It will merge your pull request into the source code of PHP.
Now, assuming you're committing an update (adding a new function and adding a new syntax), you'll also need to send a message to the Internals@lists.php.net Mail group to explain why you're submitting the update when you submit the pull request. Let the people in this mailing group discuss it and help you refine your ideas.
Finally, after you have contributed some updates to PHP (updates accepted by committer), you can try to apply for your own PHP developer account in the Register Svn accout.
Appendix:
There are a few things to note about contributing source code to PHP (common issues):
1. Write only C89-compatible code, for example, do not use a single-line comment (//), the definition of the variable must be before all statements (block start):
2. Name the variable, follow the existing PHP specifications, do not use the hump name.
3. For some very small updates, such as spelling errors in the code, or encouraging people to submit patches on bugs.php.net, the merge pull request is sometimes cumbersome.

Excerpted from Laruence

http://www.bkjia.com/PHPjc/478258.html www.bkjia.com true http://www.bkjia.com/PHPjc/478258.html techarticle PHP has previously migrated the source code to git management and also mirrored on GitHub (HTTPS://GITHUB.COM/PHP/PHP-SRC), which makes it easier for developers to contribute code to PHP ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.