Tools Reference¶
GitHooks provides native support for the most common PHP QA tools, a custom type that can run any command, and a commit-msg type that validates commit messages.
Supported tools¶
| Tool | Type | Accelerable | Internal threading |
|---|---|---|---|
| PHPStan | phpstan |
Yes | Workers from .neon config |
| PHP CodeSniffer | phpcs |
Yes | --parallel flag |
| PHP Code Beautifier | phpcbf |
Yes | --parallel flag |
| PHP Mess Detector | phpmd |
Yes | No |
| PHPUnit | phpunit |
No | No |
| Paratest | paratest |
No | --processes flag |
| Psalm | psalm |
Yes | --threads flag |
| Parallel Lint | parallel-lint |
Yes | -j flag |
| PHP Copy Paste Detector | phpcpd |
No | No |
| PHP CS Fixer | php-cs-fixer |
Yes | No |
| Rector | rector |
Yes | No |
| Custom Jobs | custom |
Opt-in | No |
| Custom Jobs | script |
No | No |
| Commit Message | commit-msg |
No | Inline (no process) |
Accelerable¶
An accelerable job supports --fast mode: when running with --fast, GitHooks replaces the job's paths with only the staged files that fall within those paths. Jobs with no matching staged files are skipped entirely.
See Execution Modes for details.
Internal threading¶
Some tools support internal parallelism (running multiple analysis threads). When processes > 1 in the flow options, GitHooks distributes the thread budget across these tools automatically.
See How-To: Parallel Execution for details.
Auto-detection of executables¶
When executable-path is omitted, GitHooks auto-detects the binary:
- First checks
vendor/bin/{tool}. - Falls back to the tool name resolved via system PATH.
This means you usually don't need to set executable-path if the tool is installed via Composer.