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

Easy Coding Standard Laravel Package

symplify/easy-coding-standard

Easy Coding Standard (ECS) makes PHP coding standards effortless on PHP 7.2–8.5. Fast parallel runs, supports PHP_CodeSniffer and PHP-CS-Fixer, uses prepared rule sets, generates ecs.php config on first run, and can check and auto-fix code with --fix.

View on GitHub
Deep Wiki
Context7
13.2.2

What's new

✨ New RemoveDeadVarThisFixer

Removes pointless [@var](https://github.com/var) $this docblocks above $this calls — they add noise and never help type inference. Added to the docblock level.

 function someFunction()
 {
-    /** [@var](https://github.com/var) SomeType $this */
     $this->run();
 }

🐛 Fix AddMissingVarNameFixer for array item types

The fixer now correctly appends the variable name when the [@var](https://github.com/var) type is an array shape like int[]:

 function arrayItems()
 {
-    /** [@var](https://github.com/var) int[] */
+    /** [@var](https://github.com/var) int[] $values */
     $values = [1000];
 }
13.2.0

The headline of this release: ECS is now a single package. The symplify/coding-standard fixers moved in-tree, and the Laravel container dependency is gone. No breaking changes for users — the Symplify\CodingStandard\Fixer\* class names are unchanged.

⬆️ How to upgrade

If you previously required symplify/coding-standard directly, drop it — it now ships inside ECS:

composer remove symplify/coding-standard --dev
composer require symplify/easy-coding-standard:^13.2 --dev

Your ecs.php needs no changes: the Symplify\CodingStandard\Fixer\* class names are unchanged. If you only ever required symplify/easy-coding-standard, a plain composer update symplify/easy-coding-standard is all you need.

🎯 Highlights

1. symplify/coding-standard merged into ECS (#19)

The 26 custom Symplify fixers ECS has always relied on now live directly in this repository under packages/coding-standard/. ECS could never run without them, and many prepared sets are tightly coupled to them — so maintaining two repos added friction for no benefit.

What this means for you:

  • One package instead of two. composer require symplify/easy-coding-standard --dev no longer pulls in a separate symplify/coding-standard.

  • Class names are unchanged — your existing ecs.php keeps working as-is:

    // ecs.php — still valid, no change needed
    use Symplify\EasyCodingStandard\Config\ECSConfig;
    use Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer;
    
    return ECSConfig::configure()
        ->withRules([LineLengthFixer::class]);
        ->withPreparedSets(symplify: true);
    

2. withDocblockLevel() now goes much deeper (#19)

Because the Symplify commenting fixers now ship in-tree, the gradual docblock level gained 11 new rules (24 total). You opt in one level per PR, safest first:

// ecs.php
use Symplify\EasyCodingStandard\Config\ECSConfig;

return ECSConfig::configure()
    ->withDocblockLevel(5); // ramp up one level at a time

New rules now reachable through the level include inline [@var](https://github.com/var) normalization (DoubleAsteriskInlineVarFixer, SingleLineInlineVarDocBlockFixer, AddMissingVarNameFixer), [@param](https://github.com/param) fixes (AddMissingParamNameFixer, FixParamNameTypoFixer, RemoveParamNameReferenceFixer, RemoveDeadParamFixer), and superfluous-name removal (RemoveSuperfluousReturnNameFixer, RemoveSuperfluousVarNameFixer).

3. illuminate/container replaced with entropy/entropy (#17)

ECS's DI container no longer extends Illuminate's. ECSConfig now extends Entropy\Container\Container.

What this means for you:

  • One less dependency in your install tree — illuminate/container and its bundled patch (patches/illuminate-container-container-php.patch) are gone.
  • Checker registration order and the documented duplicate-in-set behavior are preserved.
  • symfony/console stays — it's still a transitive dependency of PHP-CS-Fixer and easy-parallel, so it can't be dropped.

This is an internal change. If you only use the public ECSConfig::configure()->with...() API, nothing changes for you.

12.6.2
12.5.23

What's Changed

Full Changelog: https://github.com/easy-coding-standard/easy-coding-standard/compare/12.5.21...12.5.23

12.2.1

What's Changed

New Contributors

Full Changelog: https://github.com/easy-coding-standard/easy-coding-standard/compare/12.2.0...12.2.1

12.2.0

New Features :partying_face:

  • Add print PHP_CodeSniffer and PHP-CS-Fixer versions when --version (#201), thanks @zonuexe
  • Add new output formatter for checkstyle (#204), thanks @M-arcus
  • Bump to Rector 1.0
  • Bump php-cs-fixer and ecs to latest version
  • Implement --no-diffs CLI Option (#195), thanks @staabm

Bugfixes :bug:

  • [Configuration] Fix parallel config always replaced by next config as default to true
  • [Configuration] Do not sets, skip, rules on empty array on ECSConfigBuilder
  • Dynamic sets should be configured after sets (#188), thanks @zghosts
  • Less memory hungry FnMatchPathNormalizer: reduced by ~35-45% (#192), thanks @staabm
  • [Skipper] Allow skip relative path on command line vendor/bin/ecs check path/to/relative/path
  • Remove repeated calls to EasyCodingStandardStyle->isDebug() (#194), thanks @staabm
10.2.4

Make use of native ECSConfig in ecs.php

Running ECS on Symfony project can create conflict with native ContainerConfigurator. To avoid that, we introduce a new config, that is fully scoped and isolated within ECS.

Another big advantage is new configuration methods with validation and autocomplete right in your ide :+1:

Read more in https://tomasvotruba.com/blog/new-in-ecs-simpler-config/

Before :skull:

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\ValueObject\Option;

// ups, possible conflict with ContainerConfigurator
return static function (ContainerConfigurator $containerConfigurator): void {
    $parameters = $containerConfigurator->parameters();

    // too verbose params, constants and possible typo in param value
    $parameters->set(Option::PATHS, [[ // ups, "[[" typo
        __DIR__ . '/src/',
    ]]);

    $services = $containerConfigurator->services();
    $services->set(ArraySyntaxFixer::class);
};

Now :tada:

use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;

return static function (ECSConfig $ecsConfig): void {
    $ecsConfig->paths([
        __DIR__ . '/src',
    ]);

    $ecsConfig->rule(ArraySyntaxFixer::class);

    $ecsConfig->sets([SetList::PSR_12]);
};
9.4.67

ECS gets 100 % faster per 1 CPU thread :rocket:

Do you have multi-core CPUs? ECS can run in X parallel threads, where X is number of your threads. E.g. with laptop with AMD Ryzen 4750U it is 16.

That means 1600 % faster run with same amount of analysed files. Did you code base took 16 minutes to fix? Now it's 1 minute.

This feature is:

Do you Want to Safe Time? :timer_clock:

Try it:

// ecs.php
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\ValueObject\Option;

return static function (ContainerConfigurator $containerConfigurator): void {
    $parameters = $containerConfigurator->parameters();

    $parameters->set(Option::PARALLEL, true);
};

And that's it :wink:

Aknowledgements

The parallel run is heavily based on @phpstan parallel run - thanks to Ondřej Mirtes for inspiration :pray:

v9.3.3

Dowgraded and Scoped version by Default

Since 9.3.3, the package is downgraded to PHP 7.1 and scoped. The former package https://github.com/symplify/easy-coding-standard-prefixed is deprecated and replaced by symplify/easy-coding-standard should be used instead.

Read more in standalone post https://tomasvotruba.com/blog/introducing-ecs-prefixed-and-downgraded-to-php-71

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.
codraw/entity-migrator
codraw/doctrine-extra
codraw/aws-tool-kit
codraw/validator
codraw/workflow
codraw/open-api
codraw/cron-job
codraw/process
codraw/log
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony