diff --git a/composer.json b/composer.json index 7853733..4380eab 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "laravel/pint": "^1.2", "mockery/mockery": "^1.5.1", "larastan/larastan": "^2.9", - "orchestra/testbench": "^v8.0.0|^v9.0.0", + "orchestra/testbench": "^v7.0.0|^v8.0.0|^v9.0.0", "pestphp/pest": "^2.0", "squizlabs/php_codesniffer": "^3.7" }, diff --git a/config/git-hooks.php b/config/git-hooks.php index 47d4cb1..180f0b0 100644 --- a/config/git-hooks.php +++ b/config/git-hooks.php @@ -290,4 +290,15 @@ | */ 'debug_commands' => false, + + /* + |-------------------------------------------------------------------------- + | Git hooks path + |-------------------------------------------------------------------------- + | + | This configuration option allows you to configure where the git hooks + | are stored for this project, you might need to change this if you + | are using git submodules as part of a wider project. + */ + 'git_hooks_path' => base_path('.git'.DIRECTORY_SEPARATOR.'hooks'), ]; diff --git a/src/GitHooks.php b/src/GitHooks.php index 7e52bec..eeab6f2 100644 --- a/src/GitHooks.php +++ b/src/GitHooks.php @@ -84,6 +84,6 @@ public function getHookStub() */ public function getGitHooksDir() { - return base_path('.git'.DIRECTORY_SEPARATOR.'hooks'); + return config('git-hooks.git_hooks_path', base_path('.git'.DIRECTORY_SEPARATOR.'hooks')); } }