irstea/php-cs-fixer-shim
A compatibility shim for php-cs-fixer that provides a stable entry point for PHP coding-style checks and fixes, helping projects avoid dependency and version conflicts while keeping formatting tooling consistent.
friendsofphp/php-cs-fixer) is the mature, widely adopted fixer for PSR-12 and framework conventions. Adopting it as a CI gate and pre-commit hook turns style debates into automated, non-blocking fixes — a measurable reduction in review friction and onboarding time.Adopt only if at least one of these is true:
php-cs-fixer (e.g., a PHP-version compatibility constraint your platform requires).replace/alias semantics across a dependency graph you don't control.Look elsewhere if:
Risk flags to weigh: the package's value is entirely derived from upstream; a shim adds a failure layer between you and fixes, and version drift in the shim can silently pin you to an outdated, potentially vulnerable fixer. Verify the shim tracks upstream releases on a defined cadence before depending on it.
To executives: This is low-cost internal plumbing, not a product investment. It standardizes PHP formatting across our codebase automatically, which reduces review time, shortens onboarding, and prevents style churn from consuming engineering hours. The underlying formatter is industry-standard and widely used. Our cost is one small internal wrapper that someone must own; the risk is that it is unmaintained and invisible outside our organization, so we should either assign an owner and a quarterly upgrade check, or skip the wrapper and use the upstream package or Laravel's built-in Pint.
To engineering: Treat this as infrastructure, not a library choice. Decide the wrapper question on three facts: (1) do we actually need a mirror, pin, or patch? (2) who is on the hook for tracking upstream releases? (3) what is our fallback if it breaks? Default recommendation for Laravel work is Pint; for non-Laravel or mixed PHP, require php-cs-fixer upstream unless our network or compliance posture forbids it. Measure success by adoption (repos with the check wired into CI), CI pass rate, and the volume of formatting-only review comments — not by stars or dependents on the shim itself.
How can I help you explore Laravel packages today?