Thank you for your interest in contributing. This document covers the essentials.
git clone https://github.com/larananas/lumen-json-rpc.git
cd lumen-json-rpc
composer installcomposer check # PHPStan + PHPUnit (fast)
composer qa # Full QA: validate, audit, package verify, lint, stan, test
composer qa:max # Extended local bar: qa + coverage check + mutation testingCI covers the same release areas as qa:max, split across parallel jobs:
quality (validate + audit + package verify + lint + stan) → tests (PHPUnit on PHP 8.2–8.4) → coverage (coverage + threshold check) → mutation (Infection on PHP 8.3).
This library intentionally does not commit composer.lock; contributors resolve dev dependencies from composer.json and CI verifies the unlocked install path.
- PHP >=8.2 syntax with strict types (
declare(strict_types=1)) - No comments in production code unless explicitly requested
- PSR-4 autoloading via the
Lumen\JsonRpc\namespace - No framework dependencies in
require - Every new public method must be covered by tests
composer test # PHPUnit
composer test:coverage # PHPUnit with coverage (requires Xdebug coverage mode or PCOV)
vendor/bin/phpunit --filter=TestName # Run a specific testIf you use Xdebug 3 locally, run coverage commands with XDEBUG_MODE=coverage or enable xdebug.mode=coverage in your PHP configuration.
composer stan # PHPStan at level 9composer mutate # Infection with MSI >= 80, covered MSI >= 85composer mutate has the same coverage-driver requirement as composer test:coverage.
The supported public surface is centered on JsonRpcServer and its documented collaborators such as RequestContext, HandlerFactoryInterface, MiddlewareInterface, RateLimiterInterface, hooks, procedure descriptors, and stable server accessors like getHooks(), getRegistry(), and getLogger().
JsonRpcServer::getEngine() remains an internal escape hatch and is not covered by backward-compatibility guarantees between minor releases.
The documented stable surface is guarded by tests/Integration/StablePublicApiTest.php. Compatibility-sensitive changes should update that test and the docs deliberately.
Release policy follows Semantic Versioning for the stable public API surface: patch releases may fix internals and packaging, minor releases may add stable API, and major releases may break the documented stable surface.
- Create a branch from
main. - Make your changes with tests.
- Run
composer qaand ensure it passes. - Open a pull request with a clear description of what changed and why.
- CI must pass (quality + tests on PHP 8.2–8.4 + coverage + mutation).
- Use GitHub Issues.
- Include PHP version, library version, and a minimal reproduction case.
See SECURITY.md for responsible disclosure details.