Thank you for considering contributing to the Pollora framework! This document outlines our guidelines and conventions.
- Fork the repository and clone your fork.
- Install PHP and Composer dependencies:
composer install
- Install Node dependencies (for commit hooks and formatting):
npm install
- Create a new branch from
developfollowing the Gitflow pattern, e.g.feature/my-awesome-featureorhotfix/important-fix.
- Follow Laravel coding conventions. The project is formatted using
Laravel Pint. Run
composer lintto check your code style. - The WordPress coding standard is not used. All PHP code should follow Laravel guidelines.
- The framework is written using hexagonal architecture. New features should respect this structure by isolating domain logic from infrastructure and framework concerns.
- Add unit tests whenever you introduce new behaviour or fix a bug.
- The test suite uses Pest. Run all checks with:
This executes Rector, Pint, PHPStan and the unit tests.
composer test - Pull requests must pass the CI pipeline. Aim for 100% coverage as enforced by the test configuration.
- Commits are validated by commitlint. Use the conventional commit format,
for example
feat: add new moduleorfix: handle invalid input. - Run
npm installonce to enable the Git hooks that perform this check.
- Target the
developbranch and describe the feature or fix clearly. - Explain how to test the change. Include relevant commands or steps.
- Ensure your branch is up to date with
developand that the CI checks pass.
- We follow Gitflow for branch management: start feature branches from
develop. Release branches are handled by the project maintainers. - Keep the documentation up to date when you change public behaviour.
We appreciate your help in making the Pollora framework better!