Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 984 Bytes

File metadata and controls

56 lines (39 loc) · 984 Bytes

Setup

Prerequisites

  • PHP >=8.5
  • Composer 2.x
  • Git
  • gitleaks for the default local git hook flow

Install dependencies:

composer install

composer install also installs the local git hooks via captainhook.

Install gitleaks

The repository's pre-commit and pre-push hooks run gitleaks. Install it before relying on the default local workflow.

On macOS:

brew install gitleaks

Verify the installation:

gitleaks version

If hooks were installed before gitleaks was available, reinstall them after setup:

vendor/bin/captainhook install --force --skip-existing

The relevant hook commands are:

gitleaks protect --staged --verbose --redact --config=.gitleaks.toml
gitleaks detect --verbose --redact --config=.gitleaks.toml --log-opts="origin/develop..HEAD"

Useful local commands:

composer lint:all
composer lint:fix
composer test
composer test:coverage
composer check
composer ci