- PHP 8.3+ (debug build recommended:
--enable-debug) - LibXL 4.6.0+
- Standard C build tools (gcc, make, autoconf)
Use the GitHub issue tracker. Include:
- PHP version (
php -v) - LibXL version
- Operating system
- Minimal reproducing code
- Expected vs actual behavior
- Any error messages or crash output
Check if the issue is already reported and try to reproduce with the latest master branch before filing.
-
Fork and clone the repo
-
Create a topic branch off
master -
Make your changes
-
Add or update tests in
tests/(PHPT format) -
Build and run the test suite:
phpize ./configure --with-excel \ --with-libxl-incdir=/path/to/libxl/include_c \ --with-libxl-libdir=/path/to/libxl/lib64 make LD_LIBRARY_PATH=/path/to/libxl/lib64 \ TEST_PHP_EXECUTABLE=$(which php) \ TEST_PHP_ARGS="-d extension=$(pwd)/modules/excel.so" \ NO_INTERACTION=1 php run-tests.php tests/
-
Verify zero compiler warnings and all tests pass
-
Push and open a PR against
master
- Tests use PHPT format (see existing tests for examples)
- Write to row 1+ (row 0 is blocked by the libxl trial version)
- Keep cell count under ~300 per workbook (trial read limit); create fresh
ExcelBookinstances to reset - Test both success and failure/edge cases
- Use
new ExcelBook(null, null, true)for xlsx-specific features
Follow the patterns in excel.c: tab indentation, EXCEL_METHOD macro for method implementations, ZEND_PARSE_PARAMETERS_NONE() for zero-arg methods, typed arginfo, ZEND_THIS instead of getThis().
By submitting a patch, you agree to license your work under the same license as the project (PHP License 3.01).