Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Cs Fixer Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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

  • Adoption signal is the headline risk. 0 stars, 0 dependents, score 0.5. This is functionally a public mirror of a private config. There is no demonstrated consumer base, so there is no implicit regression testing and no community to absorb a bad release.
  • Version-coupling risk. The config almost certainly pins or assumes a PHP CS Fixer major (^3.x). When the fixer makes a breaking release, this package becomes the blocker for the whole repo's upgrade path.
  • Supply-chain exposure. Dev dependencies still execute Composer scripts and run in CI with repository credentials. Low but non-zero.
  • Semantic risk. "Opinionated" rulesets frequently include declare_strict_types, native_function_invocation, or final_class-style rules that are behavior-adjacent and can produce very large, review-fatiguing diffs.
  • Pint collision. Two formatters in one repo means IDE auto-format and composer fix disagree, which developers experience as random churn.

Key questions

  1. Is the package a thin rules array, or does it include scripts, CI config, and a pinned fixer version? If it exceeds ~100 lines, read it before adopting.
  2. What PHP and PHP CS Fixer versions does the constraint allow, and does it match our runtime matrix (8.1/8.2/8.3)?
  3. Does it declare a conflict with laravel/pint, and if we adopt it do we remove Pint?
  4. Has anything been tagged in the last 12 months? Is there a CHANGELOG and a release cadence?
  5. What is the blast radius of the first run — how many files and lines change on our codebase?
  6. Who is "Chief Tools," and is there any successor/support commitment if the repo is archived?

Integration Approach

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)

  1. Extract, don't consume. Copy the ruleset into our repo as 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.
  2. If we must depend: pin an exact tag ("chieftools/php-cs-fixer": "1.2.3"), never ^, and add a Dependabot exclusion so a silent reformat cannot land.
  3. Run --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

  1. Spike: extract rules, run dry-run, quantify diff (½ day).
  2. Land the reformat as a single isolated PR with a git blame --ignore-rev entry, merged during a low-traffic window.
  3. Add CI gate (php-cs-fixer fix --dry-run --diff on PRs) and a composer fix script.
  4. Add a pre-commit hook only after the CI gate is stable — otherwise developers get blocked locally on a tool they don't yet trust.
  5. Extend scope directory-by-directory; never big-bang a legacy codebase.

Operational Impact

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

  • Upstream major tag → CI red on every open branch simultaneously.
  • Pint/fixer rule disagreement → developers see contradictory autofixes in IDE vs. CI, eroding trust in the gate.
  • Package archived or deleted from Packagist → composer install breaks in cold-cache CI; blocking hotfix deploys.
  • Mass reformat merged mid-sprint → merge conflicts across in-flight branches; git blame archaeology lost.
  • Silent rule addition in a minor release → unrelated formatting noise buried inside a feature PR, complicating review.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
unabomber/timezone
delatbabel/contacts
astritzeqiri/g-recaptcha
kevinongko/laravel-genode
developeruz/laravel-analytics
robbiep/afterthedeadline
frankkessler/incontact-laravel-oauth2-rest
jlxh/laravel-userlog
davidmgilo/timetables
qylinfly/role-permission
reflect-digital/conduit
takashato/laravel-vietqr
aitor24/laralang
kraenzle-ritter/entity-relations
dindigital/din-image
pomirleanu/image-colors
sawmainek/laravel-api-generator
delatbabel/jsonresponses
mouhamedfd/permissions-generator
eduplus/qr