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

prooph/php-cs-fixer-config

Shared PHP-CS-Fixer configuration from the prooph team. Provides a ready-to-use ruleset and presets to keep PHP code style consistent across projects, with an easy way to apply and maintain formatting standards in CI or local development.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Consistency & Developer Experience (DX):

    • Enables standardized code formatting across Laravel/PHP projects, reducing cognitive load for developers and onboarding time.
    • Aligns with Prooph’s (event-sourcing/CQRS) coding standards, useful if adopting or integrating Prooph libraries (e.g., service-bus, event-store).
    • Roadmap: Justify investment in Prooph’s ecosystem by ensuring team adherence to its conventions, reducing friction in open-source contributions or collaborations.
  • Build vs. Buy:

    • Buy: Avoid reinventing a PHP CS Fixer config tailored for Prooph’s architectural patterns (e.g., DDD, event-driven design). Leverages battle-tested rules from a reputable domain expert.
    • Build: Only if Prooph’s config is insufficient for custom Laravel integrations (e.g., unique naming conventions, framework-specific rules). In that case, fork/modify this package.
  • Use Cases:

    • New Projects: Adopt early to enforce consistency from day one, especially for teams using Prooph components.
    • Legacy Refactoring: Gradually apply to existing codebases to improve readability and maintainability (e.g., during a migration to event-sourcing).
    • Open-Source Contributions: Ensure PRs comply with Prooph’s standards, reducing review cycles.
    • CI/CD Pipelines: Automate formatting checks/gates to block non-compliant code (e.g., fail builds on style violations).

When to Consider This Package

  • Adopt if:

    • Your team uses Prooph libraries (e.g., service-bus, event-store) or plans to adopt them.
    • You prioritize consistency with Prooph’s DDD/event-sourcing conventions (e.g., naming, spacing, or class structure rules).
    • You’re using PHP CS Fixer already and want a pre-configured, opinionated setup for Laravel/Prooph projects.
    • You lack internal expertise to craft a custom PHP CS Fixer config aligned with Prooph’s patterns.
  • Look elsewhere if:

    • Your codebase doesn’t use Prooph and relies on generic Laravel/PHP standards (e.g., Laravel’s default laravel-shift/php-cs-fixer-config).
    • You need framework-specific rules (e.g., Blade templates, Laravel’s Facade naming) not covered by Prooph’s config.
    • Your team prefers custom formatting rules (e.g., unique indentation, naming conventions) that conflict with Prooph’s defaults.
    • You’re using alternative tools (e.g., Prettier for PHP, custom ESLint plugins) that handle formatting differently.

How to Pitch It (Stakeholders)

For Executives:

"This package lets us adopt Prooph’s battle-tested PHP coding standards with minimal effort, ensuring our team’s code is consistent and aligned with industry best practices for event-driven architecture. By automating formatting—like we do for JavaScript with Prettier—we’ll reduce review time, improve onboarding, and future-proof our codebase for collaborations with the Prooph ecosystem. The upfront cost is zero; the long-term benefit is a more maintainable, scalable codebase that speaks the same language as our tech partners."

Ask:

  • "Should we prioritize consistency in our PHP codebase, especially if we’re using Prooph for event-sourcing?"
  • "Would you support adding this to our CI pipeline to enforce standards automatically?"

For Engineering:

*"This is a pre-configured PHP CS Fixer setup tailored for Prooph’s components (e.g., service bus, event store). It handles:

  • Prooph-specific rules (e.g., DDD naming, event/message formatting).
  • Laravel-friendly adjustments (e.g., avoiding conflicts with framework conventions).
  • Zero maintenance—just drop it into your project and run php-cs-fixer fix.

Why use it?

  • Saves time vs. writing a custom config.
  • Ensures our code matches Prooph’s open-source standards (critical if we contribute or integrate with their libraries).
  • Works seamlessly with Laravel’s existing tooling.

Trade-offs:

  • Not a one-size-fits-all for Laravel (e.g., Blade templates aren’t covered).
  • If we need custom rules, we can fork it.

Proposal:

  1. Add to devDependencies and integrate into CI (e.g., fail builds on violations).
  2. Run it locally during PRs to catch issues early.
  3. Document the rules for new hires.

Alternatives:

  • Use Laravel’s default config if we’re not using Prooph.
  • Build a custom config if Prooph’s rules are too restrictive.

Next Steps:

  • Agree to trial this in a non-critical branch.
  • Decide if we’ll enforce it in CI immediately or phase it in."*
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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor