Thank you for considering contributing to the JOOservices Client!
We adhere to strict coding standards to ensure high quality and maintainability.
- PSR-12: Code style is enforced via Laravel Pint.
- Static Analysis: We use PHPStan at the highest level.
- Testing: All features must be covered by tests using PHPUnit (PHPUnit 12).
-
Fork the repository.
-
Clone your fork locally.
-
Install Dependencies:
composer install -
Sync Develop:
git checkout develop && git pull --ff-only origin develop -
Create a Branch:
git checkout -b feature/my-new-feature -
Develop your changes.
-
Run Quality Checks: Ensure everything passes before pushing.
composer lint:fix composer lint:all composer test composer checkUse
composer test:coveragewhen you need the enforced 98% coverage gate. Runcomposer ciwhen workflow files, Composer metadata, or release-surface files change. -
Commit: Use Conventional Commit messages such as
feat(http): Add retry header propagation. -
Push and Create Pull Request into
develop.
Release preparation is separate from normal feature work: create release/<version> from develop, stabilize there, then open the release PR into master.
composer installauto-installs CaptainHook hooks.- Pre-commit runs PHP linting,
gitleaks protect --staged,composer lint:pint,composer lint:phpcs,composer lint:phpstan,composer lint:phpmd, andcomposer lint:cs. - Pre-push runs
composer testand an unpushed-commits gitleaks scan against the current upstream branch whengitleaksis available locally.
We use a "Real Component" testing strategy:
- Feature Tests (
tests/Feature/): Verify real side effects (file I/O) and integrations usingGuzzle\MockHandlerfor the network layer only. - Benchmarks (
tests/Benchmark/): Ensure no performance regression.
Run tests:
composer test
composer test:coverageIf you discover a security vulnerability, please report it privately instead of using the issue tracker.