Skip to content

GitHooksCommand

github-actions edited this page Apr 17, 2026 · 1 revision

Installs Git hooks and initializes GrumPHP hooks for the consumer repository.


  • Full name: \FastForward\DevTools\Console\Command\GitHooksCommand
  • Parent class: BaseCommand
  • This class is marked as final and can't be subclassed
  • This class is a Final class

Methods

__construct

Creates a new GitHooksCommand instance.

public __construct(\FastForward\DevTools\Filesystem\FilesystemInterface $filesystem, \Symfony\Component\Config\FileLocatorInterface $fileLocator, \FastForward\DevTools\Process\ProcessBuilderInterface $processBuilder, \FastForward\DevTools\Process\ProcessQueueInterface $processQueue, \Symfony\Component\Finder\Finder $finder): mixed

Parameters:

Parameter Type Description
$filesystem \FastForward\DevTools\Filesystem\FilesystemInterface the filesystem used to copy hooks
$fileLocator \Symfony\Component\Config\FileLocatorInterface the locator used to find packaged hooks
$processBuilder \FastForward\DevTools\Process\ProcessBuilderInterface the builder used to assemble GrumPHP processes
$processQueue \FastForward\DevTools\Process\ProcessQueueInterface the queue used to execute GrumPHP initialization
$finder \Symfony\Component\Finder\Finder the finder used to iterate hook files

configure

Configures hook source, target, and initialization options.

protected configure(): void

execute

Initializes GrumPHP hooks and copies packaged hooks.

protected execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output): int

Parameters:

Parameter Type Description
$input \Symfony\Component\Console\Input\InputInterface the command input
$output \Symfony\Component\Console\Output\OutputInterface the command output

Return Value:

the command status code


Clone this wiki locally