Skip to content

GitHooksActivator ​

php
final readonly class Zairakai\LaravelDevTools\Services\GitHooksActivator

Activates the git hooks of zairakai/laravel-dev-tools.

The hooks are the same for every PHP project of zairakai: git reads them in place through git config core.hooksPath vendor/zairakai/laravel-dev-tools/stubs/githooks, nothing is copied into the project. They run the Composer scripts of the project: quality:fast before a commit, quality before a push.

Source: src/Services/GitHooksActivator.php

Constants ​

NameValueDescription
HOOKS_PATH'vendor/zairakai/laravel-dev-tools/stubs/githooks'The hooks directory, relative to the root of the project.

Methods ​

__construct() ​

php
public function __construct(PublishOutput $output)

activate() ​

php
public function activate(string $basePath): bool

Point core.hooksPath of the project at the hooks of laravel-dev-tools.

ParameterDescription
$basePathAbsolute path to the project root

Returns bool True when git is configured

Documentation of 5.5.0 , built from 92a7387 on 5.5.0 by pipeline #3086393151 on 2026-11-18.