GrumPHP comes shipped with a configuration tool. Run following command to create a basic configuration file:
php ./vendor/bin/grumphp configureThis command gets invoked during installation. It wil not ask you for anything, but it will try to guess the best possible configuration.
To enable or disable GrumPHP, you can run one of the following commands:
php ./vendor/bin/grumphp git:init
php ./vendor/bin/grumphp git:deinitThe git:init is triggered by the composer plugin during installation.
GrumPHP will be triggered with GIT hooks. However, you can run following commands:
php ./vendor/bin/grumphp git:pre-commit
php ./vendor/bin/grumphp git:commit-msgBoth commands support raw git diffs as STDIN input.
This way it is possible to pass changes triggered by git commit -a from the GIT hook to the GrumPHP commands.
If you want to run the tests on the full codebase, you can run the command:
php ./vendor/bin/grumphp run
php ./vendor/bin/grumphp run --testsuite=mytestsuiteThis command can also be used for continious integration. More information about the testsuites can be found in the testsuites documentation.
If you want to run only a subset of the configured tasks, you can run the command with the --tasks option:
php ./vendor/bin/grumphp run --tasks=task1,task2The --tasks value has to be a comma-separated string of task names that match the keys in the tasks section
of the grumphp.yml file. See #580 for a more exhaustive explanation.