LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

grumphp

PHP code quality enforcement via git hooks

TLDR

Generate a starter configuration file
$ grumphp configure
copy
Run all configured tasks
$ grumphp run
copy
Run specific tasks
$ grumphp run --tasks=[phpcs,phpunit]
copy
Run a specific testsuite
$ grumphp run --testsuite=[mytestsuite]
copy
Register GrumPHP's git hooks
$ grumphp git:init
copy
Unregister GrumPHP's git hooks
$ grumphp git:deinit
copy
Manually run the pre-commit hook tasks
$ grumphp git:pre-commit
copy

SYNOPSIS

grumphp command [options]

DESCRIPTION

GrumPHP is a PHP code quality tool that runs checks on git commits. It enforces coding standards by running tasks like PHPStan, PHP_CodeSniffer, and PHPUnit before allowing commits.The tool integrates with git hooks to prevent commits that fail quality checks. It is configurable via a grumphp.yml file in the project root.

PARAMETERS

COMMAND

Command to run.
configure
Generate a starter grumphp.yml configuration file, guessing sensible defaults.
run
Execute all configured tasks against the codebase.
git:init
Register GrumPHP's git hooks (run automatically after `composer install`).
git:deinit
Unregister GrumPHP's git hooks.
git:pre-commit
Run the tasks bound to the pre-commit hook.
git:commit-msg
Run the tasks that validate the commit message.
--tasks TASK1,TASK2
Only run the given comma-separated tasks.
--testsuite NAME
Only run tasks belonging to the given testsuite.
--help
Display help information.

CONFIGURATION

grumphp.yml

Project-level configuration file defining tasks, parameters, and git hook settings.

CAVEATS

PHP project specific. Requires Composer. May slow down commits with many tasks.

HISTORY

GrumPHP was created by phpro to automate PHP code quality enforcement through git hooks.

SEE ALSO

composer(1), phpcs(1), phpstan(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid