diff --git a/captainhook.json b/captainhook.json new file mode 100644 index 0000000..c588223 --- /dev/null +++ b/captainhook.json @@ -0,0 +1,16 @@ +{ + "pre-commit": { + "enabled": true, + "actions": [ + { + "action": "lando phpcs" + }, + { + "action": "lando phpstan" + }, + { + "action": "lando phpunit" + } + ] + } +} diff --git a/composer.json b/composer.json index 73b5e33..621beaa 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,9 @@ "phpunit/phpunit": "^9.5", "phpstan/phpstan": "^2.1", "phpstan/extension-installer": "^1.4", - "phpstan/phpstan-strict-rules": "^2.0" + "phpstan/phpstan-strict-rules": "^2.0", + "captainhook/captainhook": "^5.24", + "captainhook/hook-installer": "*" }, "autoload": { "psr-4": { @@ -38,7 +40,8 @@ "config": { "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, - "phpstan/extension-installer": true + "phpstan/extension-installer": true, + "captainhook/hook-installer": true } } }