eduarguz/shift-php-cs
eduarguz/shift-php-cs is a PHP coding standards package that helps you detect and fix style issues in your codebase. It provides a simple way to enforce consistent formatting, keeping projects clean and readable.
Architecture fit. eduarguz/shift-php-cs is a dev-tooling package, not a runtime library: it ships a PHP-CS-Fixer configuration expressing the Laravel Shift team's recommended code style. That means it has zero production footprint — no service provider, no routes, no migrations, no runtime coupling. It sits in require-dev next to PHPUnit/Pest, PHPStan, and Pint. This is the lowest-risk category of dependency we can adopt, because removal is a one-line composer remove with no data or API migration.
The strategic wrinkle is overlap. Laravel's first-party Pint already ships a Laravel preset and is maintained by the framework team. Adopting this package means either replacing Pint or running a second formatter, and running two opinionated formatters on the same tree produces churn loops. The real value here is the ruleset, not the package — and the ruleset is a static PHP array that can be copied into our own config in minutes.
Integration feasibility. Mechanically trivial: composer require --dev, point the config at our source paths, add a composer cs:fix script, wire a CI step. Half a day for a first spike.
Technical risk.
php-cs-fixer major bump since then (deprecated/renamed fixers, stricter type handling) is a probable break, and nobody upstream is obligated to fix it.friendsofphp/php-cs-fixer to a 3.x minor that may conflict with what our other tooling needs, and may not declare PHP 8.2/8.3 support.Key questions for the spike owner.
php-cs-fixer constraint does it declare, and does it install cleanly on PHP 8.2/8.3?laravel preset, and are those differences we actually want?Stack fit. Fits any Composer-based Laravel/PHP repo. It belongs in the developer-experience lane alongside static analysis and tests, executed in CI and optionally in a pre-commit hook — never in the deploy artifact.
Migration path. Three viable options, in the order I'd evaluate them:
.php-cs-fixer.dist.php or translate it into pint.json. We keep the opinion, drop the dependency, and eliminate the staleness and version-lock risks entirely. Given 11 stars and four years of dormancy, this is almost certainly the right answer.Compatibility checks. Composer 2 resolution against our existing require-dev; php-cs-fixer version unification with any PHPStan/Rector/Psalm toolchain; PHP matrix (8.1–8.3); and a Pint coexistence test.
Sequencing.
.git-blame-ignore-revs.--dry-run --diff) only after the tree is clean; otherwise the build goes red for unrelated PRs.Maintenance. Effectively unmaintained upstream — we own it the day we adopt it. Budget roughly half a day per year to bump php-cs-fixer majors and fix renamed or removed fixers. Vendoring collapses this to "edit one array when we want to," which is the honest cost either way.
Support. No vendor SLA, no release cadence, no security response. Escalation path is PHP-CS-Fixer's upstream documentation and our own config. This is acceptable for style tooling and unacceptable if anyone proposes extending it beyond style.
Scaling. Negligible. The fixer runs at development and CI time only, with no runtime or data-path involvement. Expect 30–90 seconds added per CI job on a mid-sized repo; cache the fixer cache directory and, in a monorepo, shard by path. Cost scales linearly with changed files, not with traffic.
Failure modes to watch.
php-cs-fixer bump breaks the config with deprecation errors, blocking all PRs at once. Pin the version and bump deliberately.Ramp-up. Near zero: any Laravel developer already knows PHP-CS-Fixer or Pint, and the workflow (fix locally, check in CI) is idiomatic. The documentation burden is one short README section explaining why we chose this ruleset over Pint's default and pointing at the ignore-revs commit — otherwise the next developer will quietly swap it for Pint and generate a large spurious diff.
Verdict. Low technical risk, low operational cost, but low and decaying value given dormancy, tiny adoption, and an unverifiable repository. Approve a one-day spike to extract the ruleset into our own config; do not take a standing dependency on the package itself.
How can I help you explore Laravel packages today?