Thanks for taking the time to contribute! 🎉
git clone https://github.com/khaledalam/unit.git
cd unit
composer installRun the full quality suite before opening a pull request:
composer test # PHPUnit test suite
composer analyse # PHPStan (level max)
composer cs # PHP-CS-Fixer (dry run)
composer cs-fix # PHP-CS-Fixer (apply fixes)All three must pass — CI enforces the same checks.
- Add the case to the
Nameenum insrc/Unit/Name.phpand its label inlabel(). - Register it (factor, dimension, and offset if it is an affine scale) in
src/Unit/bootstrap.php. - Add a
.phpttest undertests/covering a conversion round-trip.
- Keep changes focused; one logical change per PR.
- Add or update tests for any behavior change.
- Update
README.mdandCHANGELOG.mdwhen user-facing behavior changes. - Write a clear description of what changed and why.
Open an issue using the bug report template and include a minimal reproduction.
By contributing, you agree that your contributions are licensed under the MIT License.