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.
Pros:
psr-0, psr-4, classmap), reducing configuration overhead.composer.json scripts (cs-check, cs-fix).class_keyword, long_to_shorthand_operator).Cons:
trailing_comma_in_multiline for all statements), which may conflict with existing codebases..php-cs-fixer.dist.php generation.composer cs-check and cs-fix scripts enable easy integration into GitHub Actions, GitLab CI, or Laravel Forge..php-cs-fixer.php without modifying the auto-generated config.class_keyword) may introduce runtime issues if misconfigured.trailing_comma_in_multiline for all statements), which could require bulk fixes.phpdoc_to_comment (disabled in v0.5.3) or class_keyword (runtime-dependent) may flag legitimate code.cs-check be gated in PRs (blocking) or informational (warnings)?composer require --dev facile-it/facile-coding-standard in a staging environment.composer cs-check to identify violations without auto-fixing..php-cs-fixer.php).composer cs-fix in a feature branch to auto-correct issues..gitattributes to ignore auto-generated files (e.g., vendor/).| Component | Compatibility | Mitigation |
|---|---|---|
| Laravel <10 | ❌ PHP 8.2+ required | Upgrade Laravel or use v1.4.1 (PHP 7.4+). |
| PHP 7.4/8.0 | ❌ Dropped in v1.5.0 | Pin to v1.4.1 or upgrade PHP. |
| Legacy PHPCS | ✅ Overrides existing configs via .php-cs-fixer.php |
Migrate configs incrementally. |
| Blade Templates | ❌ PHP-only (no Blade support) | Use separate tool (e.g., laravel-blade-formatter). |
| Rector | ✅ Optional; may slow CI | Disable if not needed (--no-risky). |
class_keyword)..php-cs-fixer.dist.php if custom rules exist.composer require --dev facile-it/facile-coding-standard..php-cs-fixer.php.composer cs-check to pull request checks (non-blocking initially).cs-fix to pre-commit hooks (e.g., via husky or Laravel Pint).composer update.cs-fix can auto-correct most issues..php-cs-fixer.php must be maintained manually.vendor/.composer cs-fix resolves 80% of issues automatically.cs-check provides diff output for manual fixes.class_keyword may need runtime testing.--parallel).cs-check can be parallelized (--parallel) for large repos.$config->setUsingCache(true).How can I help you explore Laravel packages today?