phpro/grumphp-shim
A lightweight Composer shim that provides GrumPHP as a single PHAR, so you can run code quality checks via vendor/bin/grumphp.phar without installing all of GrumPHP's dependencies yourself. Ideal for fast, simple Git hook automation.
.grumphp.yml, so "build" is mostly "configure."composer require --dev, one YAML file, no application dependency footprint. It's a low-cost way to validate whether local quality gates actually reduce CI churn before committing to a broader platform investment.vendor/ (PHPUnit, php-parser, Symfony versions). Adopting it is effectively a decision that dev tooling must never constrain runtime dependency choices — which is a meaningful architectural stance for Laravel projects with tight version pinning or long upgrade tails.vendor/bin/grumphp.phar run and the same checks the maintainers run" is a simpler instruction than "replicate our CI environment." It lowers the cost of the first accepted PR.Consider adopting when:
php-parser, PHPUnit, or Symfony constraints are the canonical trigger.Look elsewhere when:
--no-verify and the config will rot.Mitigation to plan for either way: pin the shim version like any other dev dependency, ensure developers can run the same command in CI (so an environment mismatch is detectable), and decide up front whether hook bypass is allowed and under what conditions.
Executives — one paragraph, framed as cost and risk, not tooling:
We can add automated code-quality gates to our PHP/Laravel work at essentially zero integration cost. Today, standards enforcement happens in CI, which means we pay for compute to discover problems that a developer could have caught in seconds before pushing. This package lets us run the same checks locally without touching our application's dependencies — the reason we haven't done this already is that the standard tool can conflict with the libraries our product actually depends on. The change is a dev-only dependency, MIT-licensed, requires no new infrastructure, and is reversible in one commit. I'd propose piloting it on one service for a sprint and measuring PR review cycles and CI failure rate before rolling it out. I'd flag honestly that this is a thin wrapper around an open-source project with a small maintainer base — the risk is maintenance continuity, not security or lock-in, and the exit cost is negligible.
Engineering — the practical case, plus the caveats they'll ask about:
composer require --dev phpro/grumphp-shim, then vendor/bin/grumphp.phar run. Config lives in the .grumphp.yml you already know..grumphp.yml semantics are identical to the direct install; the only difference is packaging. That means documentation, task configs, and tribal knowledge transfer directly, and swapping back to the direct install later is trivial."grumphp": "vendor/bin/grumphp.phar run") plus a .git/hooks/pre-commit that calls it, or a CI step in parallel so local and CI can't silently diverge.--no-verify, and a decision on whether the PHAR is cached in the CI image. Also: confirm the minimum PHP version across all target services clears GrumPHP v2's requirement.Quality/Security stakeholders — brief, and avoid overclaiming:
The gate runs whatever tasks we configure — static analysis, coding-standard checks, test suites — at the point of commit, which means non-compliant code is less likely to reach review. It improves consistency; it is not a security control in itself, and should sit alongside, not replace, dependency scanning and code review. Configuration is version-controlled and reviewable, so what's enforced is auditable.
What I would explicitly not claim: precise percentage reductions in CI failures or CI spend. Those depend on your pipeline volume and current failure mix. Set a baseline first — CI failure rate, mean PR review cycle time, and CI minutes per merged PR — then pilot on one repository and compare. If the numbers don't move, drop it; the switching cost is one commit.
How can I help you explore Laravel packages today?