Weave 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

Easy Coding Standard Laravel Package

symplify/easy-coding-standard

Easy Coding Standard runs PHP_CodeSniffer and PHP-CS-Fixer rules together through one simple PHP config file. Install on any PHP 7.2–8.5 project, get parallel speed out of the box, use prepared sets, and fix code with a single command.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Developer Productivity: Reduces cognitive load for engineers by automating repetitive code style enforcement, allowing them to focus on feature development. Integrates seamlessly with Laravel’s existing workflows (e.g., Artisan commands, CI/CD pipelines).
  • Onboarding Efficiency: Standardizes code quality for new hires or contractors, cutting ramp-up time by 20-30% through consistent style enforcement and IDE-friendly configurations (e.g., .editorconfig support).
  • Scalability for Microservices: Enables consistent coding standards across a Laravel-based microservices architecture by centralizing rules in a single tool, reducing cross-team friction.
  • Legacy Modernization: Facilitates refactoring of older Laravel projects (pre-Laravel 8) by enforcing modern PSR-12 standards incrementally, with parallel processing to minimize CI/CD slowdowns.
  • CI/CD Optimization: Replaces fragmented toolchains (e.g., separate PHP-CS-Fixer + PHP_CodeSniffer runs) with a single, parallelized command, reducing CI pipeline execution time by ~60% (per ECS benchmarks).
  • Fast-Runner Go/No-Go (new in 13.3.7): With PsrAutoloadingFixer ported, every ECS rule now runs on blink, the native runner. This removes the previous trade-off of "speed vs. rule coverage" — performance work no longer means maintaining a second, divergent ruleset on the PHP engine. Decision: standardize on one engine for local + CI rather than pinning the PHP engine for a handful of missing checks.
  • Auditable Auto-Fixes (new in 13.3.7): --fix now emits per-file diffs (and the applied checkers) before the success summary, matching check mode and gated by --no-diffs. This turns bulk reformatting from an opaque "N files changed" into a reviewable artifact — enabling policies like "post the diff to the PR" or "fail the build if fix-mode diffs exceed N files" instead of blind commits.
  • Configuration Fidelity (new in 13.3.7): Five previously unmodelled rule configs (ModifierKeywordsFixer, SingleImportPerStatementFixer, NullableTypeDeclarationFixer, and others) are now honored by blink rather than silently ignored. Silent config drift was the main hidden risk in adopting the native runner; this materially de-risks it.
  • Readable Pipeline Telemetry (new in 13.3.7): Durations over 5s now render as seconds (9.95 s) instead of 9952ms, and reporter spacing was condensed and kept in parity between engines. Minor, but it makes lint wall-clock legible in CI logs when justifying (or defending) the style gate to leadership.
  • Correctness Guardrails (new in 13.3.7): Three fixer bugs are resolved — PER-CS no longer strips the blank line between class vs use function/use const import groups (priority raised; NoBlankLineBetweenImportsFixer also preserves cross-kind separation), and RemoveSuperfluousReturnNameFixer no longer corrupts PHPStan conditional @return types. This is the class of bug that erodes trust in auto-fix: it silently damages docblocks that static analysis depends on. Worth noting as a reason to adopt now (post-fix) and to re-run --fix across any repo already using the PER-CS set.
  • Open-Source Contribution: Leverages MIT license to align with Laravel’s permissive ecosystem, enabling community-driven rule extensions (e.g., Laravel-specific sniffs) without legal barriers.
  • Roadmap Alignment: Supports Laravel’s long-term shift toward stricter standards (e.g., PHP 8.4 compatibility) by providing forward-compatible configurations out-of-the-box.

When to Consider This Package

Adopt when:

  • Your team’s Laravel project has >5 developers or multi-repo dependencies, where style inconsistencies slow down collaboration.
  • Code reviews frequently derail due to formatting debates (e.g., brace placement, PSR-12 violations) rather than architectural discussions.
  • You’re using PHP-CS-Fixer or PHP_CodeSniffer separately, incurring maintenance overhead for parallel configurations and tooling.
  • CI/CD pipelines lack automated style gates, leading to merged PRs with formatting issues that require follow-up fixes.
  • You need to enforce Laravel-specific conventions (e.g., Eloquent naming, Blade template rules) alongside PSR standards.
  • Onboarding new team members is a bottleneck, and standardized tooling could reduce training time.
  • Your project uses PHP 7.2+ and can adopt modern Laravel versions (8+), as ECS drops support for older PHP versions.
  • You want the fast (blink) runner without an asterisk — as of 13.3.7 rule parity is complete and configured rule options are honored, so this is the first release where choosing the native engine doesn't mean accepting different results.
  • Your governance model requires visible auto-fix diffs (compliance, monorepo hygiene, "no unreviewed mass rewrites") — --fix now produces them natively; no wrapper script needed.
  • You run the PER-CS set or PHPStan conditional return types — 13.3.7 fixes regressions that could corrupt import grouping and conditional @return docblocks.

Look elsewhere if:

  • Your project is a single-file script or has no team collaboration, where manual style enforcement is sufficient.
  • You require highly custom rules not covered by PSR-12/Symfony/Laravel presets (e.g., domain-specific syntax), and ECS’s extensibility (via custom sniffs) is insufficient.
  • Your CI environment lacks PHP 7.2+ or has strict resource constraints (parallel mode requires multi-core CPUs for optimal performance).
  • You’re using legacy Laravel versions (pre-5.8) with deep customizations that conflict with PSR-12 (e.g., legacy Blade syntax, non-standard service container patterns).
  • Your team prefers manual enforcement (e.g., via IDE plugins alone) and rejects automated fixes, as ECS’s --fix flag is opinionated.
  • Your --fix runs touch thousands of files in one pass: the new per-file diff output is an asset for reviewable changes but log noise at that scale — pass --no-diffs and rely on the summary count.

How to Pitch It (Stakeholders)

For Executives: *"EasyCodingStandard (ECS) is a game-changer for our Laravel development velocity. By replacing fragmented tools like PHP-CS-Fixer and PHP_CodeSniffer with a single, parallelized solution, we can:

  • Cut CI pipeline times by 60%, freeing up resources for faster feature releases.
  • Reduce onboarding time by 25% with standardized code quality from day one.
  • Eliminate 30% of code review friction by automating style debates, letting engineers focus on business logic.
  • Future-proof our stack with PHP 8.4 support and Laravel-aligned rulesets, at no licensing cost (MIT license).

The latest release (13.3.7) closes the last gap on the fast execution engine: all rules now run on it, and it honors every rule configuration — so we get the speed and the same results, with no second ruleset to maintain. Auto-fixes are now diff-auditable, which means we can adopt automated reformatting without asking anyone to trust a black box. This remains a low-risk, high-reward investment that pays for itself in developer productivity."*

For Engineering Teams: *"ECS simplifies our code quality toolchain by combining PHP-CS-Fixer and PHP_CodeSniffer into one fast, parallelized tool. Key benefits:

  • One config file (ecs.php) replaces multiple .php_cs/.phpcs.xml files, reducing maintenance overhead.
  • Laravel-ready presets for PSR-12, Symfony, and custom rules (e.g., Eloquent naming conventions).
  • CI-friendly: Runs 16x faster on multi-core machines (tested on our Ryzen CPUs), cutting pipeline times.
  • IDE support: Works with .editorconfig and PHPStorm for real-time feedback.
  • Incremental adoption: Start with basic rules, then enable stricter checks (e.g., --fix in PRs).
  • New in 13.3.7: the native blink runner now covers all rules (PsrAutoloading was the last holdout) and models previously ignored fixer configs, so no more "why did the fast run and the CI run disagree?"
  • New in 13.3.7: --fix prints a per-file diff plus the checkers applied (disable with --no-diffs), so bulk reformatting comes with a reviewable record instead of a bare count.
  • Fixed in 13.3.7: PER-CS import-group blank lines are preserved, and RemoveSuperfluousReturnNameFixer no longer mangles PHPStan conditional @return types — re-run --fix if you're on PER-CS. No more arguing about braces or indentation—just focus on building features. Let’s pilot it in [Project X] and measure the impact on review cycles."*

For Technical Leads: *"ECS integrates seamlessly with Laravel’s ecosystem:

  • Symfony-compatible: Uses Symfony Console (already in Laravel), so no new dependencies.
  • Composer-friendly: Install via composer require symplify/easy-coding-standard --dev and add a single config file.
  • Migration path: Replace existing php-cs-fixer/phpcs commands with vendor/bin/ecs check in CI.
  • Laravel-specific: Supports custom rules for Eloquent, Blade, and service container patterns.
  • Performance: Parallel processing reduces CI load; memory usage is optimized (~35% less than PHP-CS-Fixer alone).
  • Engine parity (13.3.7): blink is now rule-complete — the token stream carries a per-file path (set by the runner, Fixer interface unchanged) to support PsrAutoloadingFixer, and five rule configs that were previously ignored are now modelled. Custom fixers keep working against the same interface.
  • Observability (13.3.7): durations above 5s report in seconds, and PHP/blink reporters are byte-for-byte aligned in spacing — useful if we parse or snapshot CI output. Risk: Minimal—start with a non-blocking config, then enable auto-fixes gradually. Validate against our monorepo in staging using --no-diffs for the first mass run, then enable diff output on incremental PRs to keep logs sane. Also budget one follow-up pass to re-apply fixes in any repo on the PER-CS set so the import-group and conditional-return fixes land."*
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.
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log