Contributing
Contributions are always welcome! Feel free to submit a pull request to the main or current-release branch:
- Non-breaking changes must target the
V.xbranch (whereVis the latest major version). If accepted, the PR will also be merged into the applicable branches for other maintained versions. - Breaking changes must target the
mainbranch. These will be released in a new major version and won't be backported.
Provide as much detail as possible in your pull request, unless it's a trivial change.
Development Environment
This package uses Docker for local development. You don't need PHP, Composer, or WeasyPrint installed on your machine - everything runs inside the container.
TIP
A justfile is provided for convenience. If you don't have Just installed, you can substitute just <recipe> with the equivalent docker compose run --rm wp <command>.
To get started, make sure you have Docker installed and then build the image:
just buildThen install dependencies:
just composer installYou can run any Composer command via just composer <args>.
Tests
If your changes impact existing tests, update them. If you're adding new functionality:
- New feature: Create a new test case covering all functionality.
- Existing feature improvement: Add a test to the applicable test case.
Run tests before submitting your PR:
just testFormatting
This package uses PHP CS Fixer for code formatting. Format all your changes before committing:
just fixCommit Messages
Keep commit messages short and to the point - for example, "fix timeout handling when binary is unresponsive" or "add support for PDF/UA-2 variant". Long messages are strongly discouraged. Avoid generic messages like "fix bug" or "update code".
For bug reports or feature requests, open an issue.