Tools Reference¶
GitHooks provides native support for the most common PHP QA tools, plus a custom type that can run any command.
Supported tools¶
| Tool | Type | Accelerable | Internal threading |
|---|---|---|---|
| PHPStan | phpstan |
Yes | Workers from .neon config |
| PHP CodeSniffer | phpcs / phpcbf |
Yes | --parallel flag |
| PHP Mess Detector | phpmd |
Yes | No |
| PHPUnit | phpunit |
No | No |
| Psalm | psalm |
Yes | --threads flag |
| Parallel Lint | parallel-lint |
Yes | -j flag |
| PHP Copy Paste Detector | phpcpd |
No | No |
| Custom Jobs | custom |
Opt-in | No |
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 executablePath 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 executablePath if the tool is installed via Composer.