beste/php-cs-fixer-config
Opinionated PHP-CS-Fixer configuration for BESTE projects, extending ergebnis/php-cs-fixer-config. Provides ready-to-use rulesets for modern PHP (Php81 and Php82) to keep code style consistent across your codebase.
Architecture fit: The package continues to align well with Laravel’s ecosystem by providing a centralized PHP-CS-Fixer configuration, reducing duplication across projects—particularly valuable for monorepos or multi-package setups. The 3.3.0 release introduces new presets (e.g., laravel, laravel-strict) tailored explicitly for Laravel projects, which improves compatibility with Laravel’s tooling (e.g., Artisan, Laravel Mix) and modern PHP-CS-Fixer versions (v3.x). The presets now include Laravel-specific rules (e.g., handling use statements for Laravel classes, Artisan command formatting), reducing manual overrides.
Integration feasibility: Installation remains straightforward via Composer, but the new presets simplify adoption by offering pre-configured Laravel-optimized rulesets. The "Repository: unknown" risk from prior versions is mitigated if the package is now officially hosted on Packagist (verified via changelog or GitHub). Critical risk: Backward compatibility must be validated—while the changelog doesn’t highlight breaking changes, the shift to presets may alter default behavior for existing .php-cs-fixer.php configurations. Key questions:
Stack fit: The package now explicitly targets Laravel with presets, making it a stronger fit for Laravel-centric workflows. The presets integrate seamlessly with:
post-css or custom Webpack configs calling PHP-CS-Fixer).php artisan cs-fix with custom presets).Migration path:
laravel or laravel-strict presets directly in composer.json or .php-cs-fixer.php.config:dump or php-cs-fixer --dump-config to compare old vs. new rules.return: false in presets).friendsofphp/php-cs-fixer) and test locally.Compatibility:
Sequencing:
composer.json and test presets in isolation.php-cs-fixer hooks.Maintenance:
use App\Models\* conventions). Document custom overrides clearly.Support:
use statements).Scaling:
--parallel flag if processing multiple Laravel packages simultaneously.Failure modes:
laravel-strict), existing codebases may fail CI. Mitigate with:
laravel preset, then migrate to strict.rules: ['@PSR12' => false] to opt out of specific rules.php-cs-fixer fix --dry-run output for warnings.Ramp-up:
return: true).How can I help you explore Laravel packages today?