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.
.editorconfig support).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.--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.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.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.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.Adopt when:
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.--fix now produces them natively; no wrapper script needed.@return docblocks.Look elsewhere if:
--fix flag is opinionated.--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.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:
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:
ecs.php) replaces multiple .php_cs/.phpcs.xml files, reducing maintenance overhead..editorconfig and PHPStorm for real-time feedback.--fix in PRs).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?"--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.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:
composer require symplify/easy-coding-standard --dev and add a single config file.php-cs-fixer/phpcs commands with vendor/bin/ecs check in CI.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.--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."*How can I help you explore Laravel packages today?