Weave Code
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

Facile Coding Standard Laravel Package

facile-it/facile-coding-standard

PHP coding standard based on PHP-CS-Fixer by Facile.it. Installs via Composer with an interactive setup that generates a .php-cs-fixer.dist.php, auto-detects files from composer autoload (psr-0/psr-4/classmap), and adds cs-check/cs-fix scripts.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: The updated package (v1.5.0) remains a Composer-friendly dev dependency but now enforces stricter PER-CS 3.0 rules with broader scope (e.g., trailing_comma_in_multiline now applies to all multi-line statements, not just arrays). While Laravel’s default PSR-12 alignment may conflict with some rules (e.g., multiline_promoted_properties, no_redundant_readonly_property), the package’s modularity allows selective adoption. The deprecation of PHP 7.4/8.0 and internal upgrades (PHPUnit 10+, Psalm 6, Rector) introduce dependency risks if the team’s CI/CD or testing stack isn’t modernized.

Integration feasibility: High for PHP 8.1+ projects, but breaking changes (e.g., stricter comma enforcement, risky rule updates) require manual review of existing codebases. The @PER-CS3x0:risky group replaces deprecated @PER-CS2.0:risky, necessitating rule-set migration. Rector integration (internal) could enable automated refactoring but adds complexity.

Technical risk:

  • Backward compatibility: Rules like no_useless_printf or phpdoc_no_duplicate_types may flag legitimate Laravel patterns (e.g., legacy printf-style logging).
  • Dependency bloat: PHPUnit 10+/Psalm 6/Rector may conflict with existing tooling or require CI/CD updates.
  • Performance: Stricter rules (e.g., trailing_comma_in_multiline) could slow down static analysis in large codebases.

Key questions:

  1. Does the team’s Laravel codebase already comply with PSR-12, or will PER-CS 3.0’s deviations require policy alignment?
  2. How will risky rules (e.g., no_useless_printf) interact with Laravel’s legacy or third-party code (e.g., Blade templates)?
  3. Can the team upgrade CI/CD tools (PHPUnit/Psalm) to support the package’s new dependencies?
  4. Should Rector be leveraged for automated fixes, or will manual overrides be needed?

Integration Approach

Stack fit: Optimized for PHP 8.1+ Laravel projects with modern tooling (PHPUnit 10+, Psalm). Teams using older PHP versions or custom PSR-12 variants will face blockers. The package’s Composer integration remains seamless, but rule conflicts (e.g., multiline_promoted_properties vs. Laravel’s promotedProperties syntax) may require custom config overrides.

Migration path:

  1. Audit: Run php-cs-fixer fix --dry-run to identify violations before enforcing rules.
  2. Selective adoption: Use --rules=@PER-CS3x0 --exclude-rules=... to opt out of problematic rules (e.g., no_useless_printf).
  3. Dependency updates: Align CI/CD with PHPUnit 10+/Psalm 6 requirements (e.g., update phpunit/phpunit and vimeo/psalm).
  4. Rector (optional): Leverage Rector for automated fixes (e.g., trailing commas) via rector/rector integration.

Compatibility:

  • Laravel-specific: Rules like no_redundant_readonly_property may conflict with Laravel’s readonly properties in models/config.
  • Blade templates: Stricter rules (e.g., trailing_comma_in_multiline) could break Blade syntax if not excluded.
  • Third-party packages: Vendor code may violate new rules (e.g., phpdoc_no_duplicate_types), requiring vendor-specific exclusions.

Sequencing:

  1. Phase 1: Test in a dev branch with --dry-run and address critical violations.
  2. Phase 2: Gradually enforce rules via CI (e.g., fail builds on risky violations).
  3. Phase 3: Adopt Rector for automated refactoring (if needed).

Operational Impact

Maintenance:

  • Rule drift: PER-CS 3.0’s evolving defaults may require periodic config updates.
  • Tooling overhead: PHPUnit/Psalm/Rector add maintenance complexity (e.g., version pinning, plugin updates).

Support:

  • Developer ramp-up: Teams unfamiliar with PER-CS 3.0 will need training on new rules (e.g., multiline_promoted_properties).
  • Conflict resolution: Custom exclusions for Laravel-specific patterns (e.g., Blade, printf-style logging) will require documentation.

Scaling:

  • Performance: Stricter rules increase static analysis time; consider parallelizing fixes in large codebases.
  • CI/CD impact: PHPUnit 10+ and Psalm 6 may slow down pipelines; cache results where possible.

Failure modes:

  • False positives: Rules like no_useless_printf may incorrectly flag Laravel’s legacy patterns.
  • Tooling failures: Incompatible PHPUnit/Psalm versions could break CI pipelines.
  • Lock-in risk: Proprietary PER-CS standards may complicate future migrations to PSR-12 or other frameworks.

Ramp-up:

  • Onboarding: Allocate time for:
    • Rule education (e.g., PER-CS 3.0 vs. PSR-12 differences).
    • CI/CD updates (PHPUnit/Psalm/Rector).
    • Custom config tuning (exclusions for Laravel-specific code).
  • Pilot group: Test with a subset of developers before full adoption.
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope