ergebnis/php-cs-fixer-config
Factory-style PHP-CS-Fixer config for projects: choose a versioned ruleset (PHP 5.3–8.3), generate a consistent configuration, and keep coding standards aligned across repositories. Install via Composer and use with friendsofphp/php-cs-fixer.
friendsofphp/php-cs-fixer (now v3.95.2), maintaining alignment with Laravel’s PHP-centric ecosystem. Rule-set modularity (PHP 5.3–8.5) and customization hooks (withRules(), withCustomFixers()) persist as key strengths.Finder configuration but may benefit from future extensions via the updated kubawerlos/php-cs-fixer-custom-fixers.composer require --dev), with minimal configuration via .php-cs-fixer.php.shivammathur/setup-php v2.37.1) ensure compatibility with modern CI environments. No breaking changes to workflow templates.kubawerlos fixers may include Blade-specific optimizations (verify via changelog).friendsofphp/php-cs-fixer v3.95.2`: Minor patch update; low risk. Monitor for breaking changes in future minor releases (e.g., v4.x).Collection method calls). Test for conflicts with existing Pint or custom rules.kubawerlos changelog for Laravel-specific additions.spatie/laravel-rector).nunomaduro/collision).^3.95.0 in composer.json.Finder, or deferred to a future Laravel-specific extension?Collection::pluck() formatting). Test thoroughly.Finder configuration. Consider extending to include resources/views if Blade support is critical..php-cs-fixer.php and Rector configurations (if any).kubawerlos/php-cs-fixer-custom-fixers changelog for Laravel-specific fixes.composer.json to include the new version:
"require-dev": {
"ergebnis/php-cs-fixer-config": "^6.62.1",
"rector/rector": "^2.4.3" // Only if adopting Rector
}
composer coding-standards and --dry-run.shivammathur/setup-php v2.37.1.rector process).kubawerlos fixers for Laravel-specific rules (if applicable).| Component | Compatibility | Mitigation |
|---|---|---|
| Laravel Pint | Low (competing tools). | Deprecate Pint or merge configs. |
| Rector | High (dev-only; no runtime impact). | Adopt incrementally if needed. |
| Kubawerlos Fixers | High (may include Laravel-specific rules). | Test in isolation; document new rules. |
| Blade Templates | Partial (custom Finder required). |
Extend Finder to include resources/views. |
| PHP 8.2+ Features | High (rule sets up to PHP 8.5). | Use Php82 for Laravel 10+. |
| Monorepos | Medium (cache invalidation risk). | Use --no-cache or project-specific caches. |
6.62.1 and validate base CS fixing.kubawerlos fixers if Laravel-specific rules are needed.friendsofphp/php-cs-fixer for v4.x (potential breaking changes).^2.4.3 in composer.json to avoid auto-updates.kubawerlos rules in CODE_STYLE.md.vendor/; justify with team buy-in if adopting.Php81 → Php82) via withRules().php-cs-fixer fix --verbose --diff.rector process --dry-run.composer rector
composer cs-fix
kubawerlos fixers and Rector integration.kubawerlos/Rector.--no-cache for monorepos or isolate caches.php-cs-fixer fix --parallel.Finder:
->exclude(['vendor', 'node_modules'])
app/Http, app/Models).| Risk | Impact | Mitigation |
|---|---|---|
| Rector/CS fixer conflicts | Refactoring breaks CS rules or vice versa. | Test Rector in isolation; use --dry-run. |
| Kubawerlos fixer breaking changes | Laravel-specific rules break existing code. | Audit changelog; test on a branch first. |
| CI/CD slowdowns | Rector + CS fixer slows down pipelines. | Parallelize; exclude non-critical paths. |
How can I help you explore Laravel packages today?