phppdf Docs

Organization-wide documentation for the phppdf projects

Source ↗

Documentation

Contributing

Thanks for your interest in contributing to a phppdf project. These guidelines apply across all repositories in the organization unless a project’s own CONTRIBUTING.md says otherwise.

Code principles

  • Apply SOLID principles where they improve maintainability.
  • Prefer simple solutions over clever abstractions (KISS).
  • Avoid duplication, but do not abstract prematurely (DRY).
  • Favor composition over inheritance.
  • Keep classes focused on a single responsibility.
  • Keep functions small and deterministic where possible.
  • Prefer explicitness over magic.
  • Optimize for readability and maintainability first.
  • Avoid unnecessary dependencies and frameworks.

Testing

  • All unit tests follow the AAA pattern (Arrange, Act, Assert).
  • Aim for 100% code coverage on new and changed code.
  • Each method under test has its own test class.
  • All functionality is backed by unit tests, and benchmarks where performance matters.

Submitting changes

  1. Fork the repository and create a branch for your change.
  2. Make sure the test suite and coding standard checks pass locally.
  3. Open a pull request describing the change and its motivation.
  4. Be responsive to review feedback — small, focused PRs are easiest to review and merge.

Code of conduct

Be respectful and constructive. Disagreements about code are normal; assume good intent and focus on the technical merits of a change.