Submiting Patches

If you have modified a package to expand its functionality or to fix a bug, you should contribute your changes back to the community (some licenses force you to do so, and it is generally considered immoral not to).

Before creating the patch, you must first obtain the latest sources of the package you wish to patch from CVS by running the commands (the package in this example is Foo_Bar):
cvs -d:pserver:cvsread@cvs.php.net:/repository login
    password is "phpfi"
    
     cvs -z3 -d:pserver:cvsread@cvs.php.net:/repository co Foo_Bar
    
Now that you have the latest sources, you can edit the relevant file(s). Make sure that your patch is fully compatible with the PEAR
coding standards..

After you have finished adding/changnig the code, TEST it, we will not accept code that hasn't been carefully tested. When you are absolutely sure the new code doesn't introduce bugs, create a unified diff by running:
cd pear/Foo_Bar
    cvs diff -u >Foo_Bar.diff
The resulting .diff file contains your patch.

Next step is to submit the patch. Send a mail to pear-dev@lists.php.net and Cc the maintainer(s) of the package. The subject of the mail should be prefixed by '[PATCH]' to make it clear you are submitting a patch. Also include a verbose explanation of what the patch does. Don't forget to attach the .diff file to the mail.

Note: If you are using Outlook or Outlook Express, please add .txt to the diff file, because Outlook's MIME-Type detection depends on the file extension and only text/plain MIME-Type is allowed in PEAR mailing lists.

Note: Our general policy about patches that break backward compatibality is to reject them, unless they are introducing some groundshaking functionality or fix a critical bug. However, the final decision wether to accept a patch or not is done by the package lead maintainer(s).