chieftools/php-cs-fixer
chieftools/php-cs-fixer provides a convenient integration for PHP-CS-Fixer in Laravel/PHP projects, making it easier to configure and run automated code style checks and fixes so your codebase stays clean, consistent, and compliant.
Architecture fit
This is not an application-layer package. It carries no runtime code, no service provider, no migrations, no facades — it is a shared developer tooling artifact: a PHP CS Fixer ruleset ("opinionated configuration for Chief Tools projects") published to Packagist. Architecturally it belongs in require-dev and the CI lint stage, nowhere else. Its only real architectural decision is whether a Laravel codebase should take its formatting standard from an external, single-maintainer opinion rather than from Laravel's own Pint preset, which wraps the same underlying friendsofphp/php-cs-fixer engine. Treating it as a dependency rather than as a reference implementation of a ruleset is the central architectural call.
Integration feasibility
Mechanically trivial: composer require --dev chieftools/php-cs-fixer, then a .php-cs-fixer.dist.php that returns the package's config (typically require __DIR__.'/vendor/chieftools/php-cs-fixer/config.php' or similar). Realistic effort is under an hour for a proof of concept. The friction is not installation — it is that the package's opinion was calibrated for someone else's codebase. Expect a first run to produce a large diff, and expect possible overlap with Pint, which Laravel scaffolds by default and which will fight the same files with different rules.
Technical risk
^3.x). When the fixer makes a breaking release, this package becomes the blocker for the whole repo's upgrade path.declare_strict_types, native_function_invocation, or final_class-style rules that are behavior-adjacent and can produce very large, review-fatiguing diffs.composer fix disagree, which developers experience as random churn.Key questions
conflict with laravel/pint, and if we adopt it do we remove Pint?CHANGELOG and a release cadence?Stack fit
PHP/Laravel is fine — the package is framework-agnostic and only touches static analysis. The genuine stack fit question is Pint vs. raw PHP CS Fixer. Our default posture should be: one formatter per repo. If we want this ruleset, we either (a) import its rules into pint.json, or (b) drop Pint and own a .php-cs-fixer.dist.php. Running both is the only genuinely bad option.
Migration path (recommended: vendor, don't depend)
pint.json or .php-cs-fixer.dist.php. We get the opinion with zero third-party runtime exposure and full control over the pin. This is the TPM-recommended path given 0 dependents."chieftools/php-cs-fixer": "1.2.3"), never ^, and add a Dependabot exclusion so a silent reformat cannot land.--dry-run --diff against a single bounded directory (app/) first and count churn before committing to a repo-wide sweep.Compatibility
Verify the fixer version constraint resolves against our locked friendsofphp/php-cs-fixer, confirm PHP floor, and check composer why-not for existing Pint conflicts. Also validate the config loads under our CI PHP version — configs using newer PHP syntax fail at bootstrap, not at lint time.
Sequencing
git blame --ignore-rev entry, merged during a low-traffic window.php-cs-fixer fix --dry-run --diff on PRs) and a composer fix script.Maintenance Ongoing cost is near zero if vendored: one config file, updated deliberately. Cost is unbounded if depended upon: every upstream commit is a potential repo-wide reformat, and with no release discipline we cannot distinguish a cosmetic tweak from a 4,000-line diff. Budget one owner and a quarterly review.
Support There is no support channel. Zero dependents means zero Stack Overflow answers, zero issue history, zero people who have hit our problem before. Escalation path is "read the source," which is acceptable only because the source is presumably small. Plan for the package to be archived without notice; the mitigation is that a vendored ruleset cannot be abandoned.
Scaling
Technically this scales without thought — PHP CS Fixer runs in parallel, has a cache file, and adds seconds to CI. Organizationally it does not scale: an unpinned external style opinion across many repos produces drift the moment one team pins a different tag. If the style is genuinely wanted, promote it to an internal package or a shared pint.json in a platform template. That is also the honest answer to "how would a TPM leverage this": leverage the ruleset as a starting point and a negotiating artifact, not the artifact as a dependency.
Failure modes
composer install breaks in cold-cache CI; blocking hotfix deploys.git blame archaeology lost.Ramp-up Technical ramp is effectively nil — one config file, one command. Process ramp is the real cost: developers must understand why their code is being rewritten, how to run the fixer locally, and the team norm that formatting commits are isolated. Estimate ~1 day of engineering setup and CI wiring, plus roughly one sprint of elevated diff noise and merge-conflict tax before the codebase reaches steady state. With Pint already in the stack, add half a day for deciding and documenting which formatter wins.
How can I help you explore Laravel packages today?