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

fabpot/php-cs-fixer

PHP CS Fixer automatically detects and fixes coding standards issues in your PHP code. It offers built-in rule sets like @PER-CS, @Symfony, and @PhpCsFixer, plus migration rules to modernise your codebase toward newer PHP and PHPUnit versions.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: PHP CS Fixer is a framework-agnostic, dev-only CLI for detecting and fixing PHP coding-standard issues. It has no runtime role in a Laravel application, introduces no application architecture coupling, and is not consumed as an application library API. Its architectural fit is strong as a quality gate and developer-productivity tool, but it is optional: Laravel teams often use Laravel Pint, which is built on PHP CS Fixer. The TPM should decide whether PHP CS Fixer is the underlying engine or whether Pint is the approved developer interface.
  • Integration feasibility: High. It installs through Composer as a dev dependency (friendsofphp/php-cs-fixer or php-cs-fixer/shim when dependency conflicts exist), uses a project-level .php-cs-fixer.dist.php config, and runs via vendor/bin/php-cs-fixer fix or check. It can be wired into Composer scripts, CI, pre-commit hooks, and IDE integrations without application code changes.
  • Technical risk: Low runtime risk, moderate change-management risk. Initial formatting of an existing Laravel codebase can create large diffs and merge conflicts. Frequent releases and evolving rule sets can cause CI failures after upgrades. Risky or migration rule sets can change behavior and should be adopted deliberately. Recent releases include cache permission/path hardening, which reinforces the need to pin versions and patch deliberately. The release metadata shows a future-dated release (2026-09-22) relative to this assessment; verify the release feed. “Dependents: 0” is not meaningful for a Composer dev tool; validate adoption through Packagist/downloads and ecosystem usage instead.
  • Key questions: Is Laravel Pint already the standard? If so, is direct PHP CS Fixer necessary? Which rule sets or presets are approved? What PHP/Laravel version matrix must be supported? Will CI enforce check or only provide auto-fix locally? How are rule-set upgrades reviewed? Who owns config exceptions? Is a one-time baseline reformat acceptable now? Do we need pre-commit and IDE enforcement, or CI only?

Integration Approach

  • Stack fit: Fits Laravel/PHP through Composer and is independent of the Laravel framework version. Keep it in require-dev so production installs can exclude it with composer install --no-dev. It works in GitHub Actions, GitLab CI, Docker, and local development. It is compatible with Pint, but the team should avoid two competing formatter configurations.
  • Migration path: Inventory existing Pint or PHP CS Fixer usage first. If neither exists, add a pinned dev dependency, create one shared config, run the fixer on an isolated branch/PR, then add check to CI. If Pint already exists, prefer Pint as the developer interface and add PHP CS Fixer only for rules Pint does not expose; document one source of truth. Never mix baseline formatting with functional changes in the same PR.
  • Compatibility: The README lists PHP 7.4–8.5 support; the newest PHP release may lag. Verify the project’s PHP version and CI images. Composer dependency conflicts are possible, with php-cs-fixer/shim as the intended escape hatch. Rule sets evolve across releases, so pin to a known-good version and upgrade deliberately. If both Pint and PHP CS Fixer are installed, verify their compatibility and prevent conflicting presets.
  • Sequencing: (1) Confirm tool ownership and current Pint/CS Fixer usage. (2) Select the approved preset or rule set. (3) Pin the Composer version. (4) Apply a one-time baseline cleanup PR if needed. (5) Add a CI check --diff gate. (6) Add Composer scripts and optional pre-commit/IDE integration. (7) Schedule rule-set and dependency review. (8) Track adoption and CI failure trends.

Operational Impact

  • Maintenance: Low-to-moderate. The config is small, but the project releases frequently. Assign an owner for config, version pinning, and rule-set upgrades. Avoid auto-updating the dev dependency without review.
  • Support: Community-driven open source under MIT, with GitHub Discussions/issues and no commercial SLA. Internal support is mainly developer education and triage of style-only CI failures. Editor and CI integration are mature.
  • Scaling: Suitable for large Laravel codebases, especially with caching and targeted paths. Full-repo formatting can be slow and noisy; use changed-file enforcement initially if the baseline is large, but keep periodic full checks. CI sharding or parallel execution can help if runtime becomes a bottleneck.
  • Failure modes: CI breaks after a new release or rule change; formatting churn creates merge conflicts; risky fixers alter code behavior; cache corruption or permission/symlink issues appear; unsupported PHP versions cause runtime failures; developers bypass hooks; duplicate Pint/CS Fixer configs produce inconsistent results; style gates block hotfixes. Mitigate with version pinning, a documented exception process, and separating formatting PRs from functional PRs.
  • Ramp-up: Low for Laravel developers, particularly if Pint is already familiar. Provide a short onboarding note covering the fix/check commands, approved preset, CI expectations, and exception process. Expect a few hours of initial setup and a one-time baseline cleanup cost; ongoing operational cost is small but non-zero.
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.
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table