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

Php Cs Fixer Config Laravel Package

ergebnis/php-cs-fixer-config

Factory package for friendsofphp/php-cs-fixer configs. Provides ready-made rule sets per PHP version (5.3–8.5) and helpers to build a consistent, reusable fixer configuration for your projects.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Standardizing Code Quality: Enables consistent PHP code formatting across Laravel/PHP projects, reducing onboarding friction and improving maintainability.
  • Scaling Developer Onboarding: Predefined rule sets (PHP 5.3–8.5) align with team PHP version support, ensuring new hires adhere to best practices immediately.
  • Automating CI/CD Pipelines: Integrates seamlessly with GitHub Actions, Makefiles, and Composer scripts to enforce standards pre-merge, reducing manual review overhead.
  • Customization Without Reinvention: Avoids building proprietary CS rules by leveraging battle-tested configurations (e.g., Php83 for modern Laravel projects).
  • Header Management: Standardizes copyright/license headers across files, critical for open-source or compliance-heavy projects.
  • Rule Overrides: Allows granular adjustments (e.g., disabling strict_comparison) for legacy Laravel codebases without abandoning the framework entirely.
  • Custom Fixer Support: Extends PHP-CS-Fixer with project-specific rules (e.g., Laravel-specific annotations), bridging gaps in out-of-the-box tools.

When to Consider This Package

  • Avoid if:

    • Your team requires zero-tolerance for legacy PHP (e.g., PHP 5.3–5.6) and prefers minimalist rules (use php-cs-fixer alone).
    • You’re using non-PHP languages or frameworks (e.g., JavaScript/TypeScript) where this package adds no value.
    • Your project has highly bespoke coding standards that justify building a custom config from scratch.
    • You lack Composer or GitHub Actions (alternatives like VS Code extensions may suffice).
  • Consider if:

    • You maintain multi-version PHP support (e.g., Laravel 5.x–10.x) and need version-aware rule sets.
    • Your team prioritizes consistency over strict adherence to PSR-12 (e.g., Laravel’s unique naming conventions).
    • You want to reduce CI noise by auto-fixing issues pre-commit (via Composer scripts or Git hooks).
    • Your project includes custom PHP fixers (e.g., Laravel-specific annotations) that need integration.

How to Pitch It (Stakeholders)

For Executives:

*"This package lets us enforce consistent, high-quality PHP code across our Laravel stack with minimal developer overhead. By standardizing formatting (e.g., headers, spacing) and integrating into CI/CD, we’ll:

  • Reduce bugs from inconsistent code (e.g., misplaced braces in Laravel controllers).
  • Cut onboarding time by 30%—new hires won’t debate style guides.
  • Automate 90% of code reviews for formatting issues, freeing engineers to focus on business logic. Cost: ~$0 (MIT-licensed). ROI: Faster releases, fewer production issues."*

For Engineering:

*"This is a drop-in solution for PHP-CS-Fixer that:

  • Saves 2+ hours/week by providing pre-configured rule sets (PHP 5.3–8.5) tailored to Laravel’s evolution.
  • Supports customization: Override rules (e.g., disable strict_comparison for legacy code) or add project-specific fixers.
  • Works everywhere: GitHub Actions, Makefiles, or Composer scripts—no extra tooling needed. Tradeoff: Slightly heavier than raw PHP-CS-Fixer, but worth it for consistency. Let’s pilot it in the backend-services repo first."*

For Developers:

*"Tired of arguing about tabs vs. spaces? This package:

  • Auto-fixes your Laravel code to match the team’s standard (e.g., PHP 8.3 rules).
  • Adds headers to files with one line of config (no manual copy-pasting).
  • Runs in CI so you catch issues before merging—no more ‘it looks fine locally’ excuses. How to use:
  1. Add to composer.json:
    "require-dev": { "ergebnis/php-cs-fixer-config": "^6.21.0" }
    
  2. Create .php-cs-fixer.php with your PHP version’s rule set (e.g., Php83::create()).
  3. Run composer coding-standards or add it to Git hooks. Pro tip: Use --diff to see changes before applying them."*
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport