Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Git Hooks Laravel Package

sweetchuck/git-hooks

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Standardizing Git workflows across teams: Enables version-controlled Git hooks (e.g., pre-commit, pre-push) to ensure consistency in linting, testing, or build steps.
  • Build vs. Buy: Avoids reinventing Git hook management (e.g., custom scripts or tools like husky for JS) by leveraging a PHP-native solution.
  • Developer Experience (DX) improvements: Reduces friction in onboarding by automating hook setup via Composer, eliminating manual .git/hooks configuration.
  • Roadmap for CI/CD integration: Supports gradual migration from CI to local hooks (e.g., running tests pre-commit) to reduce flaky builds.
  • Security/compliance: Enforces hooks (e.g., static analysis) at the repo level, not just in CI, to catch issues earlier.

When to Consider This Package

Adopt if:

  • Your team uses PHP/Laravel and needs version-controlled Git hooks (e.g., PHPStan, Pest, or custom scripts).
  • You want to replace manual .git/hooks with a Composer-managed solution (avoids unversioned scripts).
  • Your team has mixed Git versions (supports symlinks for older Git <2.9).
  • You’re using Robo for task automation and want to tie hooks to PHP commands.

Look elsewhere if:

  • Your stack is non-PHP (e.g., Node.js, Python) → Use husky, pre-commit (Python), or language-specific tools.
  • You need complex hook logic (e.g., multi-language repos) → Consider a dedicated tool like lepture/git-hooks (more mature).
  • Your team doesn’t use Composer → Manual setup or alternative tools are required.
  • You require GUI/IDE integration (e.g., VS Code Git hooks) → This is CLI-focused.

How to Pitch It (Stakeholders)

For Executives: "This package lets us standardize and version-control Git hooks—like automated tests or security checks—directly in our PHP repos. Instead of relying on manual .git/hooks scripts (which are often ignored or broken), we’ll use Composer to deploy hooks automatically. This reduces flaky CI builds, speeds up feedback loops, and ensures all devs follow the same workflow. Low maintenance, PHP-native, and integrates with our existing tooling like Robo."

For Engineering: *"Problem: Git hooks are often unversioned, leading to inconsistent workflows (e.g., some devs skip linting). Solution: sweetchuck/git-hooks lets us:

  • Store hooks in the repo (e.g., ./git-hooks/pre-commit).
  • Use Composer to symlink/copy them to .git/hooks/ on composer install.
  • Tie hooks to PHP tasks (e.g., run Pest via Robo). Why now? It’s lightweight, avoids reinventing the wheel, and works with our stack. Tradeoff: Limited to PHP, but we can phase in other tools for non-PHP repos later."*

For Developers: *"No more ‘works on my machine’ hook issues! This package:

  1. Puts hooks in ./git-hooks/ (version-controlled).
  2. Automatically sets them up when you run composer install.
  3. Lets you write hooks in Bash/PHP (e.g., run php artisan test pre-commit). Setup: Add to composer.json, create a pre-commit file, and boom—consistent workflows for everyone."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky