First of all: Thanks for your interest in contributing to WoltLab Community Framework! However, you have to meet some requirements in order to get your changes accepted.
Notice: This is the stable tree of WCF 2.1.x, if you wish to submit pull requests for WCF 2.0.x, please select the branch "2.0".
- API changes are undesirable, we want to maintain full backwards compatibility to WCF 2.0.x
- Testing is the key, you MUST try out your changes before submitting pull requests. It saves us and yourself a lot of time.
- The code SHOULD be written by yourself, otherwise you have to check the license beforehand with regard to compatibility and give the proper credit to the original author.
- Unix newlines (\n) MUST be used in every file (php, tpl, less, js, etc.)
- All files MUST be saved in ASCII encoding, except language files, which MUST be UTF-8 encoded
- Tabs MUST be used for indentation, you HAVE TO use a tab size of 8
- empty lines MUST be indentated as deep as the previous line
- All identifiers and comments MUST be written in English
- PHP
- The closing PHP tag MUST be omitted
- Every file MUST end with a newline character (\n)
Additionally: Have a look at existing files to find out what they should look like.
We are running PHP Codesniffer to ensure most of our formatting rules. You SHOULD test your changes before submitting them with it.
-
Install PHP Codesniffer, either via PEAR or via cloning it
-
Execute the following command in the root of your clone of Community Framework:
$ phpcs -p --extensions=php --standard="`pwd`/CodeSniff/WCF" .
-
Fix any errors
-
Repeat it until no more errors occur