PHPWord is a library written in PHP that create word documents. No Windows operating system is needed for usage because the result are docx files (Office Open XML) that can be opened by all major office software.
This is a fork of upstream project of PHPWord; henceforth referred to as PHPWord 1.0.
While this is distributed as PHPWord 2.0 it strives to maintain backwards compatibility with 1.0 some changes were made to the API that will necessitate breakage.
-
The upstream project does not seem to be maintained (outstanding pull-requests 8+months old).
-
The code does not adhere to any of the Frame Interop Group coding standards (or any standards from what I can tell).
-
Code is not DRY and has a lot of cruft (e.g.,
diff --unified src/PHPWord/Writer/Word2007/Header.php src/PHPWord/Writer/Word2007/Footer.php
). -
There are no tests (yes, I know there are examples).
Patches are always welcome. Fork and submit pull requests. I will help work with you to get the code merged into the codebase.
A couple of things to keep in mind before your patch will be accepted.
- Everything in the
src
directory (excluding examples) shall adhere to the PSR guidelines (upto PSR-2). - If it is a new feature request, tests shall be implemented.
- All tests shall pass before being merged.
- Simple example scripts that illustrate how to utilize the code should be included.
This is how I am going to check PSR-2 compliance. phpcs --standard=PSR2 --ignore=src/Examples/ src/
pear install PHP_CodeSniffer
PHPWord is licensed under LGPL (GNU LESSER GENERAL PUBLIC LICENSE)