PHPWord is built by the crowd and for the crowd. Every contribution is welcome; either by submitting bug issues or suggesting improvements, or in a more active form like requesting a pull.
We want to create a high quality document writer and reader library that people can use with more confidence and less bugs. We want to collaborate happily, code joyfully, and get alive merrily. Thus, below are some guidelines, that we expect to be followed by each contributor.
- Be brief, but be bold. State your issues briefly. But speak out your ideas loudly, even if you can't or don't know how to implement it right away. The world will be better with limitless innovations.
- Follow PHP-FIG standards. We follow PHP Standards Recommendations (PSRs) by PHP Framework Interoperability Group. If you're not familiar with these standards, please, familiarize yourself now. Also, please, use PHPCodeSniffer to validate your code against PSRs.
- Test your code. Nobody else knows your code better than you. So, it's completely your mission to test the changes you made before pull request submission. We use PHPUnit for our testing purposes and recommend you using this tool too. Here you can find documentation on how to write tests with PHPUnit, which helps us making PHPWord better day to day. Do not hesitate to smoke it carefully. It's a great investment in quality of your work, and it saves you years of life.
- Request pull in separate branch. Do not submit your request to the master branch. But create a separate branch named specifically for the issue that you addressed. Read GitHub manual to find out more about this. If you are new to GitHub, read this short manual to get yourself familiar with forks and how git works in general. This video explains how to synchronize your Github Fork with the Branch of PHPWord.
That's it. Thank you for your interest in PHPWord, and welcome!
May the Force be with you.