romanzipp/php-cs-fixer-config
A reusable PHP-CS-Fixer configuration from romanzipp for enforcing consistent coding standards across PHP projects. It provides opinionated rules and a simple setup for composer-based workflows, helping teams keep formatting predictable and reduce style-related review noise.
.php-cs-fixer.php in each repo. This package is a single-file "extend and go" config (romanzipp\PhpCsFixerConfig\Config), so it represents the "shared dependency" end of that spectrum.Consider it only when all of the following hold:
php-cs-fixer 3.x (this package adds nothing to Pint, ECS, or PHP_CodeSniffer workflows, and 3.0.0 does not extend reach to 4.x).@PSR12 / @PhpCsFixer / @Symfony sets, which are maintained and versioned with the tool itself.php-cs-fixer v3 shapes, so any existing 2.x pin must be migrated deliberately rather than floated.Look elsewhere when:
php-cs-fixer, ships a laravel preset, and is maintained by the framework team. For any Laravel application this is the default answer, and this package does not compete on maintenance, preset coverage, or ecosystem fit.php-cs-fixer 4.x. 3.0.0 targets v3.0 specifically. Expect to validate rule-name compatibility and config-API changes before pinning, and expect none of that work to arrive from upstream.Net: unchanged. For a Laravel codebase the recommendation is do not adopt; standardize on Pint, and if specific rules from this config are attractive, copy them into a committed config rather than taking the dependency.
To executives: This is a developer-only formatting configuration with no runtime footprint in the product. A new major version (3.0.0) has appeared, and it is worth being precise about what it is: a compatibility update for a single major version of the underlying formatting engine, described in one line, and the first such release since August 2021. It does not add capability, support, or a maintenance commitment. Our assessment is that it carries effectively zero strategic upside and a small but non-zero maintenance liability: one maintainer, no release cadence, no downstream dependents, and a hard ceiling on the engine version it supports. We are not recommending adoption. The underlying business need — consistent code style so reviews focus on logic rather than whitespace — is real and worth solving, but we should solve it with Laravel's first-party Pint, which is maintained by the framework team and already standard in the ecosystem. Net cost of the recommended path is near zero and it removes a future migration risk that this release does nothing to retire.
To engineering: Treat this as a reference, not a dependency. It is a thin subclass of PhpCsFixer\Config that returns one maintainer's rule array — genuinely useful as a curated starting point, and MIT-licensed so we can lift the rules verbatim. The 3.0.0 release is the php-cs-fixer v3 migration and nothing more: it confirms the config API and rule names are v3-shaped, and it is breaking against 2.x. That is useful if we were pinned to 2.x, and irrelevant if we are on 4.x — which 3.0.0 says nothing about. We should still not require-dev it: single author, no test matrix, one-line changelog, and it constrains us to the php-cs-fixer 3.x config API. Instead, commit a .php-cs-fixer.php (or adopt Pint's laravel preset) that reproduces the rules we actually want, then make the style check a required CI gate. If we later want a shared standard across repos, we own it in-house and version it ourselves — the v3 bump is exactly the kind of migration we would end up doing in our own repo anyway, so better to own the config from the start.
How can I help you explore Laravel packages today?