m6web/php-cs-fixer-config
Reusable PHP CS Fixer configuration from M6Web/Bedrock Streaming. Install via Composer and use the provided BedrockStreaming config in .php-cs-fixer.dist.php, with options to extend/override rules for your project or CI.
make cs-ci, acting as a gatekeeper for technical debt. Integrates with GitHub Actions/GitLab CI with minimal setup.spatie/laravel-permission).php-cs-fixer’s risk-aware rules (e.g., native_function_invocation) to catch potential vulnerabilities early.Adopt If:
Look Elsewhere If:
app() helper usage, Blade template formatting). Consider extending the config or using a Laravel-focused alternative like shivammathur/setup-php with custom rules.symfony/php-config instead.*"This package lets us automate 80% of PHP code quality enforcement with zero upfront engineering cost. By adopting Bedrock Streaming’s PSR-12-optimized config, we:
It’s a low-risk, high-reward investment: minimal setup, immediate ROI in developer productivity, and long-term scalability. Think of it as ‘auto-formatting for PHP’—like Prettier for JavaScript, but for our entire codebase."*
*"This is a pre-configured PHP-CS-Fixer that:
make cs-fix) enforces PSR-12 + Bedrock Streaming’s best practices (e.g., strict types, native function calls). No more ‘style wars’ in PRs.make cs-ci to your pipeline to block violations before they hit main. Works with GitHub Actions, GitLab CI, or CircleCI.--dry-run) to preview changes and cache results (--using-cache=yes) for faster pipelines.Key benefits:
✅ Consistency: Uniform code style across teams/repos.
✅ Velocity: Less time spent on formatting, more on features.
✅ Quality: Catches potential issues early (e.g., risky rules like native_function_invocation).
✅ Future-proof: Aligns with Laravel’s PHP 8.4+ roadmap.
Next steps:
composer require --dev m6web/php-cs-fixer-config and configure .php-cs-fixer.dist.php.make cs-ci to your CI pipeline (takes <10 minutes).trailing_comma_in_multiline for legacy code).Let’s pilot this in the laravel-admin repo first to validate the impact."*
*"Tired of wasting time on formatting debates? This package auto-fixes most style issues so you can focus on writing great code. Here’s how it works:
composer require --dev m6web/php-cs-fixer-config.make cs-fix to auto-correct violations.make cs (dry-run) to preview changes.make cs-ci to your pipeline—violations will fail builds.Why it’s awesome: 🔹 PSR-12 compliant: Follows modern PHP standards out of the box. 🔹 PHP 8.4 ready: No surprises when upgrading Laravel. 🔹 Customizable: Extend rules or override defaults for your team’s needs. 🔹 Fast: Cache results to avoid redundant checks in CI.
Pro tip: Add this to your .gitignore:
.php-cs-fixer.cache
Now go write code—this handles the rest."*
*"This package hardens our CI/CD pipeline by adding a lightweight PHP linter with zero maintenance overhead. Here’s how it fits into our workflow:
make cs locally to catch violations early.make cs-ci blocks non-compliant code in GitHub Actions/GitLab CI, reducing tech debt.--using-cache=yes) to avoid redundant checks in large repos.Setup:
composer.json (dev dependency)..php-cs-fixer.dist.php (5-minute task).- name: PHP-CS-Fixer
run: make cs-ci
Impact: ✅ Fewer merge conflicts from style differences. ✅ Consistent codebase across teams/repos. ✅ No false positives (rules are battle-tested by Bedrock Streaming).
Let’s add this to the backend pipeline next to validate the impact."*
How can I help you explore Laravel packages today?