NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #698 most downloaded on Packagist
Use Coding Standard with 0-knowledge of PHP-CS-Fixer and PHP_CodeSniffer
Latest stable
13.3.15
Last release 15 days ago
07 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Some releases are documented
notes for 26 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
788 releases · first in 2017
Drag across the ruler to compare, or tap a release to open it.
Parallel : accept worker messages up to 128 MiB, so large payloads no longer break parallel runs ( #329 ) — thanks @gnutix
Ported fixers and sniffs
Parity fixes
Tooling
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Map deprecated PHP-CS-Fixer rules to their successors ( #296 ) — thanks @gnutix
FunctionsAnalyzer::isGlobalFunctionCall so only real global function calls are touched (#275) — thanks @gnutixcase, and template files (#278) — thanks @gnutixPorted fixers and sniffs
Parity and correctness fixes:
token_get_all (#268) — thanks @gnutixOption reading:
Performance and infrastructure:
blink parity for NoSpacesAfterFunctionName and FullyQualifiedStrictTypes
NoSpacesAfterFunctionName and FullyQualifiedStrictTypesblink diverged from the PHP engine on two rules. NoSpacesAfterFunctionNameFixer only trimmed the space for plain function calls, leaving language constructs (require, include, isset, empty, unset, print, echo, array, list) and variable calls ($func ()) untouched; it now mirrors PHP-CS-Fixer and handles them all. FullyQualifiedStrictTypesFixer rewrote the case of path segments inside @see/@link URLs that matched an imported class short name; it now skips docblock tag values that are not type expressions, so URLs stay intact.
Anonymous class with inline attribute kept in parity
blink reformatted an anonymous class carrying a class-level attribute (new #[AsEventListener(...)] class() {}) differently from the PHP engine - it broke the attribute onto standalone lines and moved the class brace to its own line. The anon-class detection now steps over the leading attribute in both BracesPosition and ClassDefinition, ClassDefinition flattens a multiline attribute in the header, and StandaloneLineSymfonyAttributeParamFixer runs at its PHP-CS-Fixer priority so both engines produce identical output.
New RemoveSlashFromNativeConstantFixer
RemoveSlashFromNativeConstantFixerRemoves the leading backslash from true, false and null, turning \true into true. Only standalone keywords are touched - namespace segments like Foo\true or \true\Bar are left intact. Added to the namespaces set.
The new fixer is ported to the blink Go runner, keeping both engines in sync.
Bumps entropy/entropy to ^0.4.35. Listing items and success/warning/error status lines now start with a leading space, matching Rector / Symfony conso
Bumps entropy/entropy to ^0.4.35. Listing items and success/warning/error status lines now start with a leading space, matching Rector / Symfony console output.
The run footer printed after a check - e.g. // 120 files · 2.3 s · 42 MB - is greyed and separated by a blank line above. The grey now uses bright bla
The run footer printed after a check - e.g. // 120 files · 2.3 s · 42 MB - is greyed and separated by a blank line above. The grey now uses bright black, so it stays readable on both light and dark terminal backgrounds. Mirrored in blink.
ecsphp/ecs-src#216, ecsphp/ecs-src#217, ecsphp/ecs-src#218
as alias in blink OrderedImportsblink's OrderedImports now includes the as alias in its sort key, matching the PHP fixer.
rector/swiss-knife open works alongside ECSDrops symfony/process from Composer replace, so installing ECS no longer blocks rector/swiss-knife open.
Ports Symplify's LineLengthFixer to blink, which previously reported it as unsupported and skipped it. Long array literals, method and new arguments,
Ports Symplify's LineLengthFixer to blink, which previously reported it as unsupported and skipped it. Long array literals, method and new arguments, function parameters, closure use (...) lists and attribute arguments are now broken onto standalone lines when the opening line exceeds the limit, and short multiline blocks are inlined back - matching the PHP fixer byte for byte.
Ports PHP-CS-Fixer's PsrAutoloadingFixer to blink, the last ECS rule that was still unported. It needed the file path to derive the expected class nam
Ports PHP-CS-Fixer's PsrAutoloadingFixer to blink, the last ECS rule that was still unported. It needed the file path to derive the expected class name, so the token stream now carries a path the runner sets per file, leaving the Fixer interface unchanged.
Five configured ECS rules were reported as applied with blink's built-in behaviour because their config was not modelled (ModifierKeywordsFixer, SingleImportPerStatementFixer, NullableTypeDeclarationFixer, and more). Blink now models their configuration instead of ignoring it.
--fix modeBlink only printed per-file diffs in check (dry-run) mode; --fix printed just a count. Matching ECS PHP, --fix now lists each fixed file's diff and applied checkers before the success summary (gated on --no-diffs).
The run footer always printed elapsed time in ms, awkward for long runs (9952ms). Past 5s it now shows seconds with 2 decimals (9.95 s); below 5s stays in ms. Applied to both the PHP and blink footers.
Trimmed extra blank lines around the [OK] success block and the run footer, in both the PHP and blink reporters so their output stays in parity.
In the PER_CS set, BlankLineBetweenImportGroupsFixer added the required blank line between import groups (class vs use function/use const), then NoBlankLineBetweenImportsFixer removed it again at a lower priority. Its priority was raised so the blank line survives.
NoBlankLineBetweenImportsFixer collapsed every blank line between consecutive top-level use statements, including the one separating a class-import group from a use function / use const group. The blank line is now kept whenever adjacent imports differ in kind; blank lines within the same group are still collapsed.
RemoveSuperfluousReturnNameFixer no longer corrupts conditional return typesThe fixer wrongly stripped the condition variable of a PHPStan conditional @return type (e.g. @return $arrayHydration ? ... : ...), corrupting the docblock. It now skips conditional return types.
Updated ECS to commit 038aa0346da3434af34b345d8138a3eb8ddd0ec1
Updated ECS to commit 038aa0346da3434af34b345d8138a3eb8ddd0ec1
Deprecation warnings no longer repeat across parallel workers
Blink's fixer registry is memoized, phpdoc regexes are precompiled, and the token stream is now spliced in place instead of copying the tail on every edit (dropping the O(n^2) cost). Blink runs are faster on large codebases.
The blink run summary now reports how many files were matched by skip rules, so the totals add up with the PHP engine.
Passing an unknown single-dash option (e.g. -config) now prints a clear notice instead of being silently ignored.
The blink progress bar gained a small animated starburst icon.
Two false positives surfaced while running blink over rector-src are fixed.
@param phpdoc on expression statements in blinkNoSuperfluousPhpdocTags in blink no longer strips a @param tag that sits above an expression statement.
Deprecation warnings are now skipped in parallel workers, so they print once per run instead of once per worker.
withPhpCsFixerSets() deprecation warning now prints once
In containers (docker run --cpus=N, KUBERNETES_CPU_LIMIT) ECS counted host logical cores and overcommitted parallel workers against the quota the scheduler actually enforces. Worker count now reads the cgroup/CFS quota, so parallel runs stay within the limit. On a host with no quota the value is unchanged.
--config no longer auto-creates ecs.phpWhen --config <path> pointed to a config that registered no checkers (or was not found), ECS fell back to the auto-init path and offered to generate a new ecs.php in the current directory instead of honoring the explicit config. With --config given, ECS now always uses that config and never generates a new one.
withPhpCsFixerSets() deprecation warning now prints onceThe deprecation warning for the now no-op withPhpCsFixerSets() printed repeatedly during a run. It now prints once per process.
Deprecated withPhpCsFixerSets() no longer crashes with legacy arguments
--dirty optionCheck only the files with uncommitted git changes - handy for a quick local run before a commit.
vendor/bin/ecs check --dirtyRemoveParamDescriptionDuplicateNameFixerRemoves redundant @param descriptions that only repeat the parameter name.
withPhpCsFixerSets() no longer crashes with legacy argumentsCalling the deprecated method with its former named arguments, e.g. ->withPhpCsFixerSets(perCS30: true), threw an "unknown named parameter" error instead of printing the deprecation warning. It now accepts legacy arguments and shows the warning as intended.
Native ECS support for the PER Coding Style 3.0. Before this, PER-CS was only reachable through the deprecated withPhpCsFixerSets() , now a no-op - so…
Native ECS support for the PER Coding Style 3.0. Before this, PER-CS was only reachable through the deprecated withPhpCsFixerSets(), now a no-op - so there was no way to apply PER-CS through ECS.
Reachable both ways:
$ecsConfig->withPreparedSets(perCs: true);Non-risky rules only, matching how the other prepared sets ship. Faithful to php-cs-fixer v3.95 @PER-CS3x0 resolution.
Nothing published for this version
🧹 Fixer-first: deprecate the CI report formats
NoBlankLineBetweenImportsFixer to the spaces setRemoves blank lines between consecutive import use statements, while keeping the blank line after the namespace intact. Ported from a custom fixer used in the Mautic codebase.
use App\First;
-
use App\Second;JsonOutputFormatter now always reports absolute paths - the format machines consume (IDE links, CI ingestion) - so no toggle is needed.
ECS is a fixer by default, not a static analyzer. The report formats that target CI static-analysis pipelines now emit a warning and fall back to console:
junit — ecsphp/ecs-src#69gitlab — ecsphp/ecs-src#71checkstyle — ecsphp/ecs-src#74Remaining formatters: console and json.
withRealPathReporting()Kept as a deprecation warning pointing to --output-format json, now that JSON output always reports absolute paths.
withEditorConfig().editorconfig discovery silently leaked project-wide settings into ECS, overriding the rules configured through sets. Coding standard should be driven by the ECS config. withEditorConfig() is kept as a deprecation warning; configure the matching PHP-CS-Fixer rules explicitly instead.
withPhpCsFixerSets()Prepared sets cover the same ground with a simpler API. withPhpCsFixerSets() is reduced to a deprecation no-op pointing to ->withPreparedSets() / ->withSets().
symplify setThe symplify set was already a no-op loading zero rules; its rules live in the common sets. The symplify arg of withPreparedSets() and SetList::SYMPLIFY are removed - switch to ->withPreparedSets(common: true) or the matching with*Level() methods.
phpunit and strict set stub files - ecsphp/ecs-src#72Option::ONLY constant - ecsphp/ecs-src#73Configuring a php-cs-fixer fixer with a deprecated option ran ConfigurableFixerTrait::configure() , which calls PhpCsFixer\Console\Application::getMaj…
ECS replaces symfony/console, so Symfony\Component\Console\Application is never installed. Configuring a php-cs-fixer fixer with a deprecated option ran ConfigurableFixerTrait::configure(), which calls PhpCsFixer\Console\Application::getMajorVersion() — a class that extends the missing Symfony Application, so PHP fatalled resolving the parent:
PHP Fatal error: Uncaught Error: Class "Symfony\Component\Console\Application" not found
Now a declaration-only stub ships in /stubs (prefixed by php-scoper in the release build), so the run proceeds instead of fatalling:
-<?php $x=1;
+<?php
+
+$x = 1;A Configured Fixer CI reproducer guards against regressions.
Nothing published for this version
Nothing published for this version
Nothing published for this version
🐛 Explicit Symfony attribute allowlist in StandaloneLineSymfonyAttributeParamFixer
StandaloneLineSymfonyAttributeParamFixerReplaces the str_contains($name, 'Symfony') heuristic with an explicit allowlist of 17 Symfony attribute classes (SYMFONY_ATTRIBUTE_CLASSES). Third-party attributes whose FQCN merely contains Symfony (e.g. App\Symfony\...) are no longer reformatted.
-#[\Symfony\Component\Console\Attribute\AsCommand(name: 'app:some', description: 'Some description')]
+#[\Symfony\Component\Console\Attribute\AsCommand(
+ name: 'app:some',
+ description: 'Some description'
+)]pull_request trigger from version_command workflowThe job smoke-tests the published Packagist artifact, so on PRs it installed the already-published package, never the PR code — pure slow noise. push (main + tags) and weekly schedule already cover it.
✨ New StandaloneLineSymfonyAttributeParamFixer + standaloneLine set
StandaloneLineSymfonyAttributeParamFixer + standaloneLine setBreaks each argument of a Symfony attribute onto its own line. New opt-in standaloneLine set groups the standalone-line rules.
-#[\Symfony\Component\Console\Attribute\AsCommand(name: 'mautic:entity:import', description: 'Import entity data from a ZIP file.')]
+#[\Symfony\Component\Console\Attribute\AsCommand(
+ name: 'mautic:entity:import',
+ description: 'Import entity data from a ZIP file.'
+)]$ecsConfig->withPreparedSets(standaloneLine: true);
// or
$ecsConfig->withSets([SetList::STANDALONE_LINE]);Now resolves short names against use imports, not just fully-qualified names.
use Symfony\Component\Console\Attribute\AsCommand;
-#[AsCommand(name: 'app:some', description: 'Some description')]
+#[AsCommand(
+ name: 'app:some',
+ description: 'Some description'
+)]🐛 Drop 3rd-person verb s in method-name duplicate description
s in method-name duplicate description-/**
- * Contacts a user.
*
* @return object
*/
public function contactUser()scoper.php for FinalInternalClassFixer (#24)Prefixed build no longer mangles the exclude entity names:
-'exclude' => ['final', 'Entity', 'ECSPrefix202607\ORM\Entity', ...]
+'exclude' => ['final', 'Entity', 'ORM\Entity', ...]Locks StandaloneLinePromotedPropertyFixer splitting private readonly promoted props.
🐛 StandaloneLinePlainConstructorParamFixer skips ≤3 params
StandaloneLinePlainConstructorParamFixer skips ≤3 paramsOnly splits constructors with 4+ params. Short lists stay on one line. Default-value tokens ([1, 2], new Foo(1)) don't inflate the count.
✨ New StandaloneLinePlainConstructorParamFixer (spaces set)
StandaloneLinePlainConstructorParamFixer (spaces set)Covers the gap: constructors with plain params and no promoted properties.
-public function __construct(CorePermissions $security, Translator $translator, RouterInterface $router, FormFactoryInterface $formFactory)
+public function __construct(
+ CorePermissions $security,
+ Translator $translator,
+ RouterInterface $router,
+ FormFactoryInterface $formFactory
+)✅ Regression fixture: single promoted property among plain params
Locks StandaloneLinePromotedPropertyFixer splitting all params even when only one is promoted.
public function __construct(
- CorePermissions $security, Translator $translator, RouterInterface $router,
+ CorePermissions $security,
+ Translator $translator,
+ RouterInterface $router,
private LeadModel $leadModel,
) {
}✨ New StandaloneLineRequiredParamFixer (spaces set)
StandaloneLineRequiredParamFixer (spaces set)Public methods marked #[Required] / @required are DI points; one param per line keeps diffs to the single changed dependency.
#[Required]
-public function autowireDependencies(FormModel $formModel, SubmissionModel $submissionModel): void
+public function autowireDependencies(
+ FormModel $formModel,
+ SubmissionModel $submissionModel
+): void@return object */ public function getApiHelper() ```
-/**
- * Get the API helper.
- *
+/**
* @return object
*/
public function getApiHelper()
Drops a/an/the (word-boundary) before comparing description to method name.
vendor/bin/ecs src tests
$ ecs --config=ecs.php Run failed: Unknown option: "--config=ecs.php"
--config option placed before the command name# before
$ ecs --config=ecs.php
Run failed: Unknown option: "--config=ecs.php"
# after
$ ecs --config=ecs.php # loads ecs.php and checks normally
Regression from the symfony/console → entropy migration. Default check command is now injected when the first arg is an option.
AddMissingVarNameFixer for property assignments-/** @var int $this */
+/** @var int */
$this->value = 1000;
Skipped when the variable is followed by ->.
Flips @type doc tag into @var, upgrading single-asterisk inline comments to real doc blocks.
TypeToVarTagFixerFlips @type doc tag into @var, upgrading single-asterisk inline comments to real doc blocks.
-/* @type \Mautic\ReportBundle\Model\ReportModel $model */
+/** @var \Mautic\ReportBundle\Model\ReportModel $model */
$model = ...;
MergeDocBlockStartFixerFixes docblocks opened with /* instead of /** and strips empty *-only lines.
-/*
- *
- * @return $this
- */
+/**
+ * @return $this
+ */
RemoveEventSubscriberDescriptionFixerRemoves redundant subscriber-method docblocks that just repeat the method name + "event".
-/**
- * Delete lead event
- */
public function onLeadDelete(LeadEvent $event): bool
RemoveMethodNameDuplicateDescriptionFixer now drops * Get results. above setResults() (get/set mix-up carries no info).
RemoveDeadParamFixer for anonymous functions-/**
- * @param $mappedFields
- * @param $fieldType
- */
$cleanup = function (array &$mappedFields, string $fieldType) {
};
Scope PHPStan ignores for T_OPEN_CURLY_BRACKET (PHP_CodeSniffer constant) across environments.
Preload path fix after the console / dependency migration.
Preload path fix after the console / dependency migration.
symplify soft-deprecated (rules now in common under clearer names). phpunit and strict removed — dangerous without context, use Rector instead.
common sets + LevelsTwo new sets (casing, cleanup) and 40 more mature, non-PSR-12 rules wired into the gradual-adoption Levels.
-STRLEN($name); // NativeFunctionCasing
+strlen($name);
-$a = [ ]; // NoWhitespaceInEmptyArray
+$a = [];
-/** @return integer */ // PhpdocScalar
+/** @return int */
-$x = isset($a) ? $a : $b; // TernaryToNullCoalescing
+$x = $a ?? $b;
New @api consts SetList::CASING, SetList::CLEANUP; withPreparedSets(casing:, cleanup:).
symplify set, remove phpunit + strict setssymplify soft-deprecated (rules now in common under clearer names). phpunit and strict removed — dangerous without context, use Rector instead.
return ECSConfig::configure()
->withPreparedSets(
common: true,
- symplify: true,
- phpunit: true,
- strict: true,
);
FixTagTypoFixerFixes plural doc-block tag typos (@returns→@return, @params→@param, @vars→@var), incl. psalm-/phpstan- prefixes.
AddMissingVarNameFixer for intersection types-/** @var MockObject&AbstractIntegration */
+/** @var MockObject&AbstractIntegration $integration */
$integration = $this->getMockBuilder(AbstractIntegration::class);
SwitchedTypeAndNameFixer for generics with commas-@param $submittedArray array<int, string>
+@param array<int, string> $submittedArray
@param comment text mistaken as switched type@param $extra Can be used by ... no longer reordered — trailing words are a description, not a type.
RemoveMethodNameDuplicateDescriptionFixer now strips * Set name. (trailing ./!) above setName().
symfony/console, migrate console layer to entropy/entropy (#27)symplify/easy-parallel for fewer deps (#28)The legacy closure-based Symfony config is deprecated. Use the fluent API instead:
symfony-legacy closure configurationThe legacy closure-based Symfony config is deprecated. Use the fluent API instead:
return ECSConfig::configure()
->withPreparedSets(common: true);
Removes pointless @var $this docblocks above $this calls — they add noise and never help type inference. Added to the docblock level.
RemoveDeadVarThisFixerRemoves pointless @var $this docblocks above $this calls — they add noise and never help type inference. Added to the docblock level.
function someFunction()
{
- /** @var SomeType $this */
$this->run();
}
AddMissingVarNameFixer for array item typesThe fixer now correctly appends the variable name when the @var type is an array shape like int[]:
function arrayItems()
{
- /** @var int[] */
+ /** @var int[] $values */
$values = [1000];
}
Nothing published for this version
The symplify/coding-standard fixers moved in-tree, and the Laravel container dependency is gone. No breaking changes for users — the Symplify\CodingSt…
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.
<br>
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.
<br>
<br>
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);
<br>
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 normalization (DoubleAsteriskInlineVarFixer, SingleLineInlineVarDocBlockFixer, AddMissingVarNameFixer), @param fixes (AddMissingParamNameFixer, FixParamNameTypoFixer, RemoveParamNameReferenceFixer, RemoveDeadParamFixer), and superfluous-name removal (RemoveSuperfluousReturnNameFixer, RemoveSuperfluousVarNameFixer).
<br>
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:
illuminate/container and its bundled patch (patches/illuminate-container-container-php.patch) are gone.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.
<br>
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
fix: missing example for output-format by @dfranco in https://github.com/easy-coding-standard/easy-coding-standard/pull/308
Full Changelog: https://github.com/easy-coding-standard/easy-coding-standard/compare/12.6.2...13.0.0
[Scoper] Fix Scoper on AbstractMajorMinorDeprecationSetDefinition by @samsonasik in https://github.com/easy-coding-standard/easy-coding-standard/pull/…
Full Changelog: https://github.com/easy-coding-standard/easy-coding-standard/compare/12.6.1...12.6.2
Nothing published for this version
Clean up symfony/polyfill-* on replace config on composer.json by @samsonasik in https://github.com/easy-coding-standard/easy-coding-standard/pull/296
Full Changelog: https://github.com/easy-coding-standard/easy-coding-standard/compare/12.5.24...12.6.0
Fix a deprecated implicit nullable parameter in PHP 8.4 by @marcimat
Temporary use vendor patch for patch friendsofphp/php-cs-fixer merge const array spread on VisibilityRequiredFixer by @samsonasik in https://github.co
Full Changelog: https://github.com/easy-coding-standard/easy-coding-standard/compare/12.5.21...12.5.23
Nothing published for this version
Nothing published for this version
Bump to symplify/coding-standard:^12.4.3 by @samsonasik in https://github.com/easy-coding-standard/easy-coding-standard/pull/279
Full Changelog: https://github.com/easy-coding-standard/easy-coding-standard/compare/12.5.18...12.5.20
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.