laranail/git-commit-checker is not published to Packagist, so there is no registry-version badge to show: see Install.
Git pre-commit hooks for coding-standard and syntax checks in Laravel projects.
Requires PHP ^8.4.1 || ^8.5 and Laravel ^13.0.
composer require laranail/git-commit-checker-
Run it from a Git checkout in a local environment:
laranail::git-commit-checker.installrefuses to write a hook whenAPP_ENVis notlocalor there is no.gitdirectory. -
Optionally publish the config to change the hooks or the Pint presets. The pre-commit check is on by default;
GIT_COMMIT_CHECKER_ENABLED=falseswitches it off.php artisan vendor:publish --tag=laranail::git-commit-checker-config
# Write .git/hooks/pre-commit and, optionally, a pint.json preset
php artisan laranail::git-commit-checker.install
# Every commit now runs Pint in --test mode over the changed PHP files;
# run the same check by hand without committing
php artisan laranail::git-commit-checker.pre-commit-hook
git-commit-checker:installandgit-commit-checker:pre-commit-hookare deprecated aliases of these two commands. They still run, print a deprecation line, and may be removed in the next minor after 0.1. A hook installed before the rename calls the old name and keeps working; runlaranail::git-commit-checker.installagain to rewrite it with the new one.
How the hook is wired is in Architecture; everything else is in the documentation index.
Full documentation is at opensource.simtabi.com/documentation/laranail/git-commit-checker.
- Architecture — what this package registers, and under which names.
MIT. See LICENSE.