From b8042cd657b9453572fa39f3ec30fb1da3fb8fdd Mon Sep 17 00:00:00 2001 From: Maurizio Monticelli Date: Wed, 9 Sep 2026 17:06:52 +0200 Subject: [PATCH 01/12] style(fixer): align dump fixer file header with the whatwedo standard The upstream attribution now lives in the class docblock text instead of an `@author` annotation, which the standard strips on `--fix`. Signed-off-by: Maurizio Monticelli --- src/Fixer/DumpFixer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Fixer/DumpFixer.php b/src/Fixer/DumpFixer.php index 21eaf1c..f66b2bd 100644 --- a/src/Fixer/DumpFixer.php +++ b/src/Fixer/DumpFixer.php @@ -1,6 +1,7 @@ + * Based on the original implementation by Andrew Kovalyov . + * * @see https://raw.githubusercontent.com/akovalyov/DebugStatementsFixers/master/src/Dump.php */ final class DumpFixer extends AbstractFunctionReferenceFixer From 861eec9bd30db9f23f4ce8fbd8640927963d0614 Mon Sep 17 00:00:00 2001 From: Maurizio Monticelli Date: Wed, 9 Sep 2026 17:02:46 +0200 Subject: [PATCH 02/12] chore(deps)!: update to symplify/easy-coding-standard ^13 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ECS 13 bundles php-cs-fixer 3.95 and PHP_CodeSniffer 4, which lifts the version caps on kubawerlos/php-cs-fixer-custom-fixers and slevomat/coding-standard again. BREAKING CHANGE: after updating, run `vendor/bin/ecs check --fix` once — the refreshed rule set reports additional findings on code that passed under ECS 12, so pipelines fail until the new findings are fixed. refs: #36 Signed-off-by: Maurizio Monticelli --- CHANGELOG.md | 13 ++++++++++++- composer.json | 6 +++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a773f78..5b953d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,18 @@ # Changelog -## [Unreleased] - 2024-05-21 +## [Unreleased] + +### Changed + +- update to `symplify/easy-coding-standard ^13`, which bundles php-cs-fixer 3.95 and + PHP_CodeSniffer 4 — running the whatwedo standard can report additional findings on + code that passed under ECS 12 +- allow `kubawerlos/php-cs-fixer-custom-fixers ^3` and `slevomat/coding-standard ^8` + again, the version caps ECS 12 needed are no longer required + + +## [1.3.0] - 2024-05-21 ### Changed diff --git a/composer.json b/composer.json index edf7e41..484f87c 100644 --- a/composer.json +++ b/composer.json @@ -20,9 +20,9 @@ ], "require": { "php": ">=7.4", - "kubawerlos/php-cs-fixer-custom-fixers": ">=3.32,<3.37.3", - "slevomat/coding-standard": "~8.22.1", - "symplify/easy-coding-standard": "^12.5.23" + "kubawerlos/php-cs-fixer-custom-fixers": "^3", + "slevomat/coding-standard": "^8", + "symplify/easy-coding-standard": "^13" }, "autoload": { "psr-4": { From 4c8407f1e80029bcb383ac427a9a5c52a1dc3b0f Mon Sep 17 00:00:00 2001 From: Maurizio Monticelli Date: Wed, 9 Sep 2026 17:03:25 +0200 Subject: [PATCH 03/12] docs(readme): rework the install and usage section Install with `--dev`, since a coding standard is never needed at runtime, and pick the Symfony, WordPress or common set from a single list, shown as the `ecs.php` fluent config format ECS expects. refs: #36 Signed-off-by: Maurizio Monticelli --- README.md | 45 ++++++++++++++++----------------------------- 1 file changed, 16 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 67310be..74a079e 100644 --- a/README.md +++ b/README.md @@ -2,33 +2,28 @@ # PhpCodingStandard -This project is a set of coding standard rules, which we are using at [whatwedo](https://whatwedo.ch). It's heavily based on [Simplify/EasyCodingStandard](https://github.com/Symplify/EasyCodingStandard). +This project is a set of coding standard rules, which we are using at [whatwedo](https://whatwedo.ch). It's heavily based on +[Simplify/EasyCodingStandard](https://github.com/Symplify/EasyCodingStandard). ## Installation We suggest to use Composer to install this project: ``` -composer require whatwedo/php-coding-standard +composer require --dev whatwedo/php-coding-standard ``` ## Usage -### Without custom configuration +You have to create an `ecs.php` file in your own project root directory and reference the set matching your +project type: -You can run the checks without project specific configuration using one of following commands: +* Symfony projects: `config/whatwedo-symfony.php` +* WordPress projects: `config/whatwedo-wordpress.php` +* Any other PHP project: `config/whatwedo-common.php` -``` -vendor/bin/ecs check SRC_DIRECTORY --config vendor/whatwedo/php-coding-standard/config/whatwedo-symfony.php # Symfony projects -vendor/bin/ecs check SRC_DIRECTORY --config vendor/whatwedo/php-coding-standard/config/whatwedo-wordpress.php # WordPress projects -vendor/bin/ecs check SRC_DIRECTORY --config vendor/whatwedo/php-coding-standard/config/whatwedo-common.php # Common PHP projects -``` - - -### With custom configuration - -If you want to add additional checkers or exclude files, you have to create an `ecs.php` file in your own project root directory. +The Symfony and the WordPress set both include the common set, so there is no need to reference more than one. ```php skip() - $ecsConfig->skip([ - SlevomatCodingStandard\Sniffs\Variables\UnusedVariableSniff::class => null, - - // Explicitly remove some rules in a specific files - PhpCsFixer\Fixer\FunctionNotation\MethodArgumentSpaceFixer::class => [ - __DIR__ . '/PATH/FILE.php' - ], +return ECSConfig::configure() + ->withPaths([ + __DIR__ . '/src', + ]) + ->withSets([ + // Symfony project, see the list above for WordPress and plain PHP projects + __DIR__ . '/vendor/whatwedo/php-coding-standard/config/whatwedo-symfony.php', ]); - */ - - // This need to come last - $ecsConfig->sets([__DIR__ . '/vendor/whatwedo/php-coding-standard/config/whatwedo-common.php']); -}; ``` Then run the following command: From 6014accbfe0decadb2ee1648025d23bc288dba0b Mon Sep 17 00:00:00 2001 From: Maurizio Monticelli Date: Wed, 9 Sep 2026 17:03:30 +0200 Subject: [PATCH 04/12] refactor(config): move the shipped sets to the ECS fluent config format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ECS 13 deprecates the `return function (ECSConfig $ecsConfig): void {}` format the sets used and warns on every run; consumers may keep either style. The move also drops `SetList::CLEAN_CODE`, already imported by `SetList::COMMON` in full, and 17 skips for rules no ECS 13 set ships any more — the effective checker list stays at 162 active rules, verified with `ecs list` on every config. Signed-off-by: Maurizio Monticelli --- CHANGELOG.md | 3 ++ config/whatwedo-common.php | 94 +++++++++++------------------------ config/whatwedo-symfony.php | 15 ++++-- config/whatwedo-wordpress.php | 7 +-- ecs.php | 9 ++-- 5 files changed, 50 insertions(+), 78 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b953d2..c6bdec2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ ### Changed +- drop `SetList::CLEAN_CODE` (imported by `SetList::COMMON` in full) and 17 skips that + targeted rules no longer shipped by any ECS 13 set; the effective checker list is + unchanged - update to `symplify/easy-coding-standard ^13`, which bundles php-cs-fixer 3.95 and PHP_CodeSniffer 4 — running the whatwedo standard can report additional findings on code that passed under ECS 12 diff --git a/config/whatwedo-common.php b/config/whatwedo-common.php index 4a76dd4..6a65d73 100644 --- a/config/whatwedo-common.php +++ b/config/whatwedo-common.php @@ -3,64 +3,58 @@ declare(strict_types=1); use PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\AssignmentInConditionSniff; -use PHP_CodeSniffer\Standards\Generic\Sniffs\ControlStructures\InlineControlStructureSniff; -use PHP_CodeSniffer\Standards\Generic\Sniffs\WhiteSpace\ScopeIndentSniff; use PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes\ValidClassNameSniff; use PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\ClassCommentSniff; use PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\FileCommentSniff; use PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\FunctionCommentThrowTagSniff; -use PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\ScopeClosingBraceSniff; use PhpCsFixer\Fixer\CastNotation\CastSpacesFixer; -use PhpCsFixer\Fixer\ClassNotation\FinalInternalClassFixer; use PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer; -use PhpCsFixer\Fixer\ControlStructure\NoTrailingCommaInListCallFixer; use PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer; use PhpCsFixer\Fixer\LanguageConstruct\IsNullFixer; use PhpCsFixer\Fixer\NamespaceNotation\BlankLineAfterNamespaceFixer; -use PhpCsFixer\Fixer\Operator\IncrementStyleFixer; use PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer; use PhpCsFixer\Fixer\Operator\OperatorLinebreakFixer; use PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer; -use PhpCsFixer\Fixer\Phpdoc\PhpdocAlignFixer; use PhpCsFixer\Fixer\Phpdoc\PhpdocInlineTagNormalizerFixer; use PhpCsFixer\Fixer\Phpdoc\PhpdocNoAliasTagFixer; use PhpCsFixer\Fixer\Phpdoc\PhpdocNoEmptyReturnFixer; use PhpCsFixer\Fixer\Phpdoc\PhpdocNoPackageFixer; -use PhpCsFixer\Fixer\Phpdoc\PhpdocSeparationFixer; -use PhpCsFixer\Fixer\Phpdoc\PhpdocSummaryFixer; -use PhpCsFixer\Fixer\Phpdoc\PhpdocToCommentFixer; use PhpCsFixer\Fixer\Phpdoc\PhpdocVarAnnotationCorrectOrderFixer; -use PhpCsFixer\Fixer\ReturnNotation\ReturnAssignmentFixer; -use PhpCsFixer\Fixer\Strict\StrictComparisonFixer; -use PhpCsFixer\Fixer\Strict\StrictParamFixer; -use PhpCsFixer\Fixer\Whitespace\BlankLineBeforeStatementFixer; use PhpCsFixer\Fixer\Whitespace\MethodChainingIndentationFixer; use PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer; use PhpCsFixerCustomFixers\Fixer\NoImportFromGlobalNamespaceFixer; use PhpCsFixerCustomFixers\Fixer\NoNullableBooleanTypeFixer; use PhpCsFixerCustomFixers\Fixer\NoPhpStormGeneratedCommentFixer; use PhpCsFixerCustomFixers\Fixer\PhpdocSelfAccessorFixer; -use SlevomatCodingStandard\Sniffs\Classes\TraitUseSpacingSniff; -use SlevomatCodingStandard\Sniffs\Commenting\EmptyCommentSniff; use SlevomatCodingStandard\Sniffs\Commenting\ForbiddenAnnotationsSniff; use SlevomatCodingStandard\Sniffs\Exceptions\DeadCatchSniff; -use SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff; use SlevomatCodingStandard\Sniffs\Namespaces\UseFromSameNamespaceSniff; -use SlevomatCodingStandard\Sniffs\Variables\UselessVariableSniff; use Symplify\EasyCodingStandard\Config\ECSConfig; use Symplify\EasyCodingStandard\ValueObject\Set\SetList; use whatwedo\PhpCodingStandard\Fixer\DumpFixer; -return static function (ECSConfig $ecsConfig): void { - $ecsConfig->sets([SetList::CLEAN_CODE]); - $ecsConfig->sets([SetList::COMMON]); - $ecsConfig->sets([SetList::PSR_12]); - - $ecsConfig->rule(ValidClassNameSniff::class); - $ecsConfig->rule(ClassCommentSniff::class); - $ecsConfig->rule(FileCommentSniff::class); - $ecsConfig->rule(FunctionCommentThrowTagSniff::class); - $ecsConfig->ruleWithConfiguration(OrderedClassElementsFixer::class, [ +return ECSConfig::configure() + ->withSets([ + SetList::COMMON, + SetList::PSR_12, + ]) + ->withRules([ + ValidClassNameSniff::class, + ClassCommentSniff::class, + FileCommentSniff::class, + FunctionCommentThrowTagSniff::class, + NoImportFromGlobalNamespaceFixer::class, + NoNullableBooleanTypeFixer::class, + NoPhpStormGeneratedCommentFixer::class, + PhpdocSelfAccessorFixer::class, + PhpdocVarAnnotationCorrectOrderFixer::class, + ForbiddenAnnotationsSniff::class, + AssignmentInConditionSniff::class, + DeadCatchSniff::class, + UseFromSameNamespaceSniff::class, + DumpFixer::class, + ]) + ->withConfiguredRule(OrderedClassElementsFixer::class, [ 'order' => [ 'use_trait', 'constant_public', @@ -77,61 +71,29 @@ 'phpunit', 'magic', ], - ]); - $ecsConfig->rule(NoImportFromGlobalNamespaceFixer::class); - $ecsConfig->rule(NoNullableBooleanTypeFixer::class); - $ecsConfig->rule(NoPhpStormGeneratedCommentFixer::class); - $ecsConfig->rule(PhpdocSelfAccessorFixer::class); - $ecsConfig->rule(PhpdocVarAnnotationCorrectOrderFixer::class); - $ecsConfig->rule(ForbiddenAnnotationsSniff::class); - $ecsConfig->rule(AssignmentInConditionSniff::class); - $ecsConfig->rule(DeadCatchSniff::class); - $ecsConfig->rule(UseFromSameNamespaceSniff::class); - $ecsConfig->rule(DumpFixer::class); - - $ecsConfig->ruleWithConfiguration(OperatorLinebreakFixer::class, [ + ]) + ->withConfiguredRule(OperatorLinebreakFixer::class, [ 'only_booleans' => true, 'position' => 'beginning', - ]); - - $ecsConfig->skip([ + ]) + ->withSkip([ AssignmentInConditionSniff::class => null, - InlineControlStructureSniff::class => null, - ScopeIndentSniff::class => null, - ScopeClosingBraceSniff::class => null, CastSpacesFixer::class => null, - NoTrailingCommaInListCallFixer::class => null, YodaStyleFixer::class => null, IsNullFixer::class => null, BlankLineAfterNamespaceFixer::class => null, - IncrementStyleFixer::class => null, NotOperatorWithSuccessorSpaceFixer::class => null, UnaryOperatorSpacesFixer::class => null, - PhpdocAlignFixer::class => null, PhpdocInlineTagNormalizerFixer::class => null, PhpdocNoAliasTagFixer::class => null, PhpdocNoEmptyReturnFixer::class => null, PhpdocNoPackageFixer::class => null, - PhpdocSeparationFixer::class => null, - PhpdocSummaryFixer::class => null, - PhpdocToCommentFixer::class => null, - ReturnAssignmentFixer::class => null, - StrictComparisonFixer::class => null, - StrictParamFixer::class => null, - BlankLineBeforeStatementFixer::class => null, MethodChainingIndentationFixer::class => null, NoExtraBlankLinesFixer::class => null, - FinalInternalClassFixer::class => null, - TraitUseSpacingSniff::class => null, - EmptyCommentSniff::class => null, - ReferenceUsedNamesOnlySniff::class => null, - UselessVariableSniff::class => null, ClassCommentSniff::class . '.Missing' => null, FileCommentSniff::class . '.Missing' => null, FileCommentSniff::class . '.WrongStyle' => null, ValidClassNameSniff::class => ['**/whatwedo*.php'], - ]); - - $ecsConfig->parallel(); -}; + ]) + ->withParallel(); diff --git a/config/whatwedo-symfony.php b/config/whatwedo-symfony.php index f66077f..f6a4296 100644 --- a/config/whatwedo-symfony.php +++ b/config/whatwedo-symfony.php @@ -6,10 +6,15 @@ use PhpCsFixerCustomFixers\Fixer\NoDoctrineMigrationsGeneratedCommentFixer; use Symplify\EasyCodingStandard\Config\ECSConfig; -return static function (ECSConfig $ecsConfig): void { - $ecsConfig->sets([__DIR__ . '/whatwedo-common.php']); - $ecsConfig->rule(NoDoctrineMigrationsGeneratedCommentFixer::class); - $ecsConfig->ruleWithConfiguration(ConcatSpaceFixer::class, [ +return ECSConfig::configure() + ->withSets([ + __DIR__ . '/whatwedo-common.php', + ]) + ->withRules([ + NoDoctrineMigrationsGeneratedCommentFixer::class, + ]) + // the Symfony coding standard concatenates without spaces, where the ECS sets use one; + // this override is deliberate, do not drop it in favour of the sets + ->withConfiguredRule(ConcatSpaceFixer::class, [ 'spacing' => 'none', ]); -}; diff --git a/config/whatwedo-wordpress.php b/config/whatwedo-wordpress.php index a483ffd..3425594 100644 --- a/config/whatwedo-wordpress.php +++ b/config/whatwedo-wordpress.php @@ -4,6 +4,7 @@ use Symplify\EasyCodingStandard\Config\ECSConfig; -return static function (ECSConfig $ecsConfig): void { - $ecsConfig->sets([__DIR__ . '/whatwedo-common.php']); -}; +return ECSConfig::configure() + ->withSets([ + __DIR__ . '/whatwedo-common.php', + ]); diff --git a/ecs.php b/ecs.php index 5d8a49f..314fb50 100644 --- a/ecs.php +++ b/ecs.php @@ -4,9 +4,10 @@ use Symplify\EasyCodingStandard\Config\ECSConfig; -return static function (ECSConfig $ecsConfig): void { - $ecsConfig->paths([ +return ECSConfig::configure() + ->withPaths([ __DIR__ . '/', + ]) + ->withSets([ + __DIR__ . '/config/whatwedo-common.php', ]); - $ecsConfig->import('config/whatwedo-common.php'); -}; From 88775838650ee673e9ec2dcaeb400525c1077970 Mon Sep 17 00:00:00 2001 From: Maurizio Monticelli Date: Wed, 9 Sep 2026 17:03:45 +0200 Subject: [PATCH 05/12] feat(config): reference the shipped sets through WhatwedoSets constants `WhatwedoSets::COMMON`, `::SYMFONY` and `::WORDPRESS` carry the paths to the shipped sets, so an `ecs.php` names a class constant instead of a vendor path that breaks silently on a rename; passing the file path keeps working. Both examples now declare the directories to check as `__DIR__`-relative paths, so `vendor/bin/ecs check` needs no directory argument and works from any working directory. refs: #36 Signed-off-by: Maurizio Monticelli --- CHANGELOG.md | 7 +++++ README.md | 12 ++++---- config/whatwedo-symfony.php | 3 +- config/whatwedo-wordpress.php | 3 +- ecs.php | 6 ++-- ecs.php.symfony.dist | 7 +++-- src/Set/WhatwedoSets.php | 52 +++++++++++++++++++++++++++++++++++ 7 files changed, 78 insertions(+), 12 deletions(-) create mode 100644 src/Set/WhatwedoSets.php diff --git a/CHANGELOG.md b/CHANGELOG.md index c6bdec2..c2f5544 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ ## [Unreleased] +### Added + +- `WhatwedoSets::COMMON`, `::SYMFONY` and `::WORDPRESS` carry the paths to the shipped + sets, so an `ecs.php` references a class constant instead of spelling out + `vendor/whatwedo/php-coding-standard/config/whatwedo-*.php` by hand — passing the file + path keeps working + ### Changed - drop `SetList::CLEAN_CODE` (imported by `SetList::COMMON` in full) and 17 skips that diff --git a/README.md b/README.md index 74a079e..79766f1 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ composer require --dev whatwedo/php-coding-standard You have to create an `ecs.php` file in your own project root directory and reference the set matching your project type: -* Symfony projects: `config/whatwedo-symfony.php` -* WordPress projects: `config/whatwedo-wordpress.php` -* Any other PHP project: `config/whatwedo-common.php` +* Symfony projects: `WhatwedoSets::SYMFONY` +* WordPress projects: `WhatwedoSets::WORDPRESS` +* Any other PHP project: `WhatwedoSets::COMMON` The Symfony and the WordPress set both include the common set, so there is no need to reference more than one. @@ -30,21 +30,23 @@ The Symfony and the WordPress set both include the common set, so there is no ne declare(strict_types=1); use Symplify\EasyCodingStandard\Config\ECSConfig; +use whatwedo\PhpCodingStandard\Set\WhatwedoSets; return ECSConfig::configure() ->withPaths([ __DIR__ . '/src', + __DIR__ . '/tests', ]) ->withSets([ // Symfony project, see the list above for WordPress and plain PHP projects - __DIR__ . '/vendor/whatwedo/php-coding-standard/config/whatwedo-symfony.php', + WhatwedoSets::SYMFONY, ]); ``` Then run the following command: ``` -vendor/bin/ecs check SRC_DIRECTORY +vendor/bin/ecs check ``` To fix certain issues automatically add `--fix` add the end diff --git a/config/whatwedo-symfony.php b/config/whatwedo-symfony.php index f6a4296..638fe0c 100644 --- a/config/whatwedo-symfony.php +++ b/config/whatwedo-symfony.php @@ -5,10 +5,11 @@ use PhpCsFixer\Fixer\Operator\ConcatSpaceFixer; use PhpCsFixerCustomFixers\Fixer\NoDoctrineMigrationsGeneratedCommentFixer; use Symplify\EasyCodingStandard\Config\ECSConfig; +use whatwedo\PhpCodingStandard\Set\WhatwedoSets; return ECSConfig::configure() ->withSets([ - __DIR__ . '/whatwedo-common.php', + WhatwedoSets::COMMON, ]) ->withRules([ NoDoctrineMigrationsGeneratedCommentFixer::class, diff --git a/config/whatwedo-wordpress.php b/config/whatwedo-wordpress.php index 3425594..86cea79 100644 --- a/config/whatwedo-wordpress.php +++ b/config/whatwedo-wordpress.php @@ -3,8 +3,9 @@ declare(strict_types=1); use Symplify\EasyCodingStandard\Config\ECSConfig; +use whatwedo\PhpCodingStandard\Set\WhatwedoSets; return ECSConfig::configure() ->withSets([ - __DIR__ . '/whatwedo-common.php', + WhatwedoSets::COMMON, ]); diff --git a/ecs.php b/ecs.php index 314fb50..9c9c972 100644 --- a/ecs.php +++ b/ecs.php @@ -3,11 +3,13 @@ declare(strict_types=1); use Symplify\EasyCodingStandard\Config\ECSConfig; +use whatwedo\PhpCodingStandard\Set\WhatwedoSets; return ECSConfig::configure() ->withPaths([ - __DIR__ . '/', + __DIR__ . '/config', + __DIR__ . '/src', ]) ->withSets([ - __DIR__ . '/config/whatwedo-common.php', + WhatwedoSets::COMMON, ]); diff --git a/ecs.php.symfony.dist b/ecs.php.symfony.dist index 389e9d9..731e19a 100644 --- a/ecs.php.symfony.dist +++ b/ecs.php.symfony.dist @@ -2,14 +2,15 @@ declare(strict_types=1); use Symplify\EasyCodingStandard\Config\ECSConfig; +use whatwedo\PhpCodingStandard\Set\WhatwedoSets; return ECSConfig::configure() ->withSets([ - 'vendor/whatwedo/php-coding-standard/config/whatwedo-symfony.php' + WhatwedoSets::SYMFONY, ]) ->withPaths([ - 'src', - 'tests', + __DIR__ . '/src', + __DIR__ . '/tests', ]) ->withSkip([ ]) diff --git a/src/Set/WhatwedoSets.php b/src/Set/WhatwedoSets.php new file mode 100644 index 0000000..8a89f37 --- /dev/null +++ b/src/Set/WhatwedoSets.php @@ -0,0 +1,52 @@ + Date: Wed, 9 Sep 2026 17:04:07 +0200 Subject: [PATCH 06/12] feat(config)!: build every set on PER Coding Style 3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PER Coding Style 3.0 is the successor of PSR-12, so every set now builds on `SetList::PER_CS` plus the two points it leaves to the caller, `declare()` parentheses and alphabetically sorted imports. The whatwedo rules move into one file loaded last, where they give up the ten overrides that held back rules the sets ship and every sniff and fixer that rewrote correct code: the Squiz file and class comment sniffs, the `@throws` sniff PHPStan answers from the call chain, the risky `?bool` fixer, and the class element order that moved enum cases below the methods. BREAKING CHANGE: run `vendor/bin/ecs check --fix` once after the update — the first run reformats existing code, most visibly by adding trailing commas to multiline argument and parameter lists, spacing casts and rewriting Yoda comparisons. The order of properties, constants and methods is no longer enforced. refs: #36 Signed-off-by: Maurizio Monticelli --- CHANGELOG.md | 50 ++++++++++++++++++++ README.md | 5 ++ config/whatwedo-common.php | 96 +++++--------------------------------- config/whatwedo-rules.php | 37 +++++++++++++++ src/Fixer/DumpFixer.php | 6 +-- src/Set/WhatwedoSets.php | 8 ++++ 6 files changed, 115 insertions(+), 87 deletions(-) create mode 100644 config/whatwedo-rules.php diff --git a/CHANGELOG.md b/CHANGELOG.md index c2f5544..cb8b264 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,24 @@ ### Changed +- nine skips and one narrowing configuration are gone, so the rules they held back + now apply as the sets intend: casts are spaced (`(int) $x`), comparisons drop the Yoda + order (`$x === null`, and an existing `null === $x` is rewritten), `$i ++` becomes + `$i++`, broken PHPDoc inline tags are normalised (`@{TAG}` to `{@TAG}`), `@return null` + and `@subpackage` are dropped, a blank line follows the `namespace` statement, every + call in a method chain is indented to one level, and every operator in a multiline + expression moves to the beginning of the continuation line instead of only `&&` and + `||`. + Two of the overrides said nothing to begin with: the skip on `NoExtraBlankLinesFixer` + had no effect, because `PER_CS` narrows that fixer to blank lines between imports and + `NoBlankLineBetweenImportsFixer` already removes those, and the `position` set next to + `only_booleans` was the php-cs-fixer default +- build every set on `SetList::PER_CS`, the PER Coding Style 3.0 successor of PSR-12, + instead of `SetList::PSR_12` — the first run reformats existing code, most visibly by + adding a trailing comma to multiline argument and parameter lists, and further by `fn()` + spacing, `?int` type formatting, `Foo::bar` spacing and single-line empty bodies. Imports + keep being sorted alphabetically and `declare()` parentheses keep being checked, both of + which the PER-CS set leaves to the caller - drop `SetList::CLEAN_CODE` (imported by `SetList::COMMON` in full) and 17 skips that targeted rules no longer shipped by any ECS 13 set; the effective checker list is unchanged @@ -21,6 +39,38 @@ - allow `kubawerlos/php-cs-fixer-custom-fixers ^3` and `slevomat/coding-standard ^8` again, the version caps ECS 12 needed are no longer required +### Removed + +- the two Squiz commenting sniffs are gone, so `@throws` tags and the style of class + docblocks are no longer checked. `FunctionCommentThrowTagSniff` reads a single method + body and demands a tag for every `throw` it finds there, which on typed code is noisier + and less accurate than PHPStan, who follows the call chain. `ClassCommentSniff` was + registered with its `.Missing` code skipped, so it never asked for a docblock in the + first place and only policed the shape of the ones that exist + +### Fixed + +- the file header keeps its own copyright. `FileCommentSniff` is hardcoded to Squiz + Pty Ltd: `ecs --fix` rewrote `@copyright 2026 whatwedo GmbH` to + `@copyright 2026 Squiz Pty Ltd (ABN 77 084 670 600)` and asked for + `@author Squiz Pty Ltd `. A file carrying a `/** */` header also + never converged, because the sniff went on reporting `MissingPackageTag`, + `MissingSubpackageTag`, `PackageTagOrder` and `SpacingAfterOpen`, none of them fixable + +- `?bool` parameter and return types keep their nullability. `NoNullableBooleanTypeFixer` + is a risky fixer that rewrites `?bool` to `bool` without touching the body, so + `ecs --fix` turned working tri-state code into a `TypeError` at the next call with + `null`. ECS applies risky fixers unconditionally, it has no `--allow-risky` gate, so + the rule is gone instead of being switched off + +- enum cases stay at the top of the enum. The element order configured for + `OrderedClassElementsFixer` never listed `case`, and every type the list omits is + sorted to the end, so `ecs --fix` moved the cases of a correctly written enum below + its methods. The own order is gone entirely rather than patched: `PER_CS` configures + the fixer as `order => ['use_trait']`, which sorts trait imports to the top and leaves + every other element where it stands. The cost is that the order of properties, + constants and methods is no longer enforced — only trait imports are + ## [1.3.0] - 2024-05-21 diff --git a/README.md b/README.md index 79766f1..9db70b9 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,11 @@ project type: The Symfony and the WordPress set both include the common set, so there is no need to reference more than one. +Every set builds on [PER Coding Style 3.0](https://www.php-fig.org/per/coding-style/), the successor of +PSR-12. Coming from an older release, expect the first run to reformat existing code, most visibly by +adding a trailing comma to multiline argument and parameter lists. Imports keep being sorted +alphabetically, which PER-CS leaves open. + ```php withSets([ SetList::COMMON, - SetList::PSR_12, + SetList::PER_CS, + WhatwedoSets::RULES, ]) ->withRules([ - ValidClassNameSniff::class, - ClassCommentSniff::class, - FileCommentSniff::class, - FunctionCommentThrowTagSniff::class, - NoImportFromGlobalNamespaceFixer::class, - NoNullableBooleanTypeFixer::class, - NoPhpStormGeneratedCommentFixer::class, - PhpdocSelfAccessorFixer::class, - PhpdocVarAnnotationCorrectOrderFixer::class, - ForbiddenAnnotationsSniff::class, - AssignmentInConditionSniff::class, - DeadCatchSniff::class, - UseFromSameNamespaceSniff::class, - DumpFixer::class, + // the only PSR-12 rule that PER-CS 3.0 does not cover + DeclareParenthesesFixer::class, ]) - ->withConfiguredRule(OrderedClassElementsFixer::class, [ - 'order' => [ - 'use_trait', - 'constant_public', - 'constant_protected', - 'constant_private', - 'property_public', - 'property_protected', - 'property_private', - 'construct', - 'destruct', - 'method_public', - 'method_protected', - 'method_private', - 'phpunit', - 'magic', - ], - ]) - ->withConfiguredRule(OperatorLinebreakFixer::class, [ - 'only_booleans' => true, - 'position' => 'beginning', - ]) - ->withSkip([ - AssignmentInConditionSniff::class => null, - CastSpacesFixer::class => null, - YodaStyleFixer::class => null, - IsNullFixer::class => null, - BlankLineAfterNamespaceFixer::class => null, - NotOperatorWithSuccessorSpaceFixer::class => null, - UnaryOperatorSpacesFixer::class => null, - PhpdocInlineTagNormalizerFixer::class => null, - PhpdocNoAliasTagFixer::class => null, - PhpdocNoEmptyReturnFixer::class => null, - PhpdocNoPackageFixer::class => null, - MethodChainingIndentationFixer::class => null, - NoExtraBlankLinesFixer::class => null, - - ClassCommentSniff::class . '.Missing' => null, - FileCommentSniff::class . '.Missing' => null, - FileCommentSniff::class . '.WrongStyle' => null, - ValidClassNameSniff::class => ['**/whatwedo*.php'], + ->withConfiguredRule(OrderedImportsFixer::class, [ + 'imports_order' => ['class', 'function', 'const'], + // PER-CS leaves the order of imports open and the set turns sorting off, + // while the whatwedo standard has always sorted them alphabetically + 'sort_algorithm' => 'alpha', ]) ->withParallel(); diff --git a/config/whatwedo-rules.php b/config/whatwedo-rules.php new file mode 100644 index 0000000..3ffb1ba --- /dev/null +++ b/config/whatwedo-rules.php @@ -0,0 +1,37 @@ +withRules([ + ValidClassNameSniff::class, + NoImportFromGlobalNamespaceFixer::class, + NoPhpStormGeneratedCommentFixer::class, + PhpdocSelfAccessorFixer::class, + DeadCatchSniff::class, + UseFromSameNamespaceSniff::class, + DumpFixer::class, + ]) + ->withSkip([ + IsNullFixer::class => null, + NotOperatorWithSuccessorSpaceFixer::class => null, + PhpdocNoAliasTagFixer::class => null, + + // whatwedo bundle classes carry the lowercase vendor prefix (whatwedoCrudBundle), + // which the sniff reads as a PascalCase violation diff --git a/src/Fixer/DumpFixer.php b/src/Fixer/DumpFixer.php index f66b2bd..073099c 100644 --- a/src/Fixer/DumpFixer.php +++ b/src/Fixer/DumpFixer.php @@ -54,7 +54,7 @@ public function getDefinition(): FixerDefinitionInterface { return new FixerDefinition( 'Removes dump/var_dump statements, which shouldn\'t be in production ever.', - [new CodeSample("functions as $function) { $currIndex = 0; - while (null !== $currIndex) { + while ($currIndex !== null) { $matches = $this->find($function, $tokens, $currIndex); - if (null === $matches) { + if ($matches === null) { break; } diff --git a/src/Set/WhatwedoSets.php b/src/Set/WhatwedoSets.php index 8a89f37..7529085 100644 --- a/src/Set/WhatwedoSets.php +++ b/src/Set/WhatwedoSets.php @@ -49,4 +49,12 @@ final class WhatwedoSets * @var string */ public const WORDPRESS = __DIR__ . '/../../config/whatwedo-wordpress.php'; + + /** + * The whatwedo rules without a base set. Only useful when composing a set of your own; + * reference COMMON, SYMFONY or WORDPRESS instead. + * + * @var string + */ + public const RULES = __DIR__ . '/../../config/whatwedo-rules.php'; } From 82b0ea5954ba1d949f674bb7b5b9758ad4d1f68a Mon Sep 17 00:00:00 2001 From: Maurizio Monticelli Date: Wed, 9 Sep 2026 18:11:54 +0200 Subject: [PATCH 07/12] chore(deps)!: require easy-coding-standard ^13.3.2 on PHP 8.2 `^13` also resolves the earlier 13.x patches, on which the shipped sets are neither developed nor run. Requiring the current 13.3.2 as the minimum keeps a fresh install on the same php-cs-fixer and PHP_CodeSniffer versions the sets are verified against, instead of silently landing on an older 13.0 or 13.1 patch. The `>=7.4` floor outlived the versions it was written for in the same way: every whatwedo project that consumes this standard runs on PHP 8.2 or newer, and the sets are neither run nor verified on anything older. The dependencies would still install on 7.4, so the floor is set here on purpose rather than inherited. BREAKING CHANGE: a project on PHP 7.4, 8.0 or 8.1 no longer resolves this package and stays on the previous release. refs: #36 Signed-off-by: Maurizio Monticelli --- CHANGELOG.md | 5 ++++- README.md | 2 +- composer.json | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb8b264..1fa76ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,7 +33,10 @@ - drop `SetList::CLEAN_CODE` (imported by `SetList::COMMON` in full) and 17 skips that targeted rules no longer shipped by any ECS 13 set; the effective checker list is unchanged -- update to `symplify/easy-coding-standard ^13`, which bundles php-cs-fixer 3.95 and +- require PHP 8.2 or newer, up from 7.4. The dependencies still install on 7.4, so this + is a floor set on purpose: the standard is only run and verified on PHP versions that + still receive security support +- update to `symplify/easy-coding-standard ^13.3.2`, which bundles php-cs-fixer 3.95 and PHP_CodeSniffer 4 — running the whatwedo standard can report additional findings on code that passed under ECS 12 - allow `kubawerlos/php-cs-fixer-custom-fixers ^3` and `slevomat/coding-standard ^8` diff --git a/README.md b/README.md index 9db70b9..d7bb45f 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ For other configuration options, check out [Simplify/EasyCodingStandard](https:/ ## Dependencies -* PHP >=7.4 +* PHP >=8.2 * [Simplify/EasyCodingStandard](https://github.com/Symplify/EasyCodingStandard) * [kubawerlos/php-cs-fixer-custom-fixers](https://github.com/kubawerlos/php-cs-fixer-custom-fixers) * [slevomat/coding-standard](https://github.com/slevomat/coding-standard) diff --git a/composer.json b/composer.json index 484f87c..6771132 100644 --- a/composer.json +++ b/composer.json @@ -19,10 +19,10 @@ } ], "require": { - "php": ">=7.4", + "php": ">=8.2", "kubawerlos/php-cs-fixer-custom-fixers": "^3", "slevomat/coding-standard": "^8", - "symplify/easy-coding-standard": "^13" + "symplify/easy-coding-standard": "^13.3.2" }, "autoload": { "psr-4": { From b38e3a5bf098cf88c1e90a1d7d464bcff95d1079 Mon Sep 17 00:00:00 2001 From: Maurizio Monticelli Date: Wed, 16 Sep 2026 14:29:03 +0200 Subject: [PATCH 08/12] feat(config): leave the line breaks in a method chain to the author A fluent chain is no longer split onto one call per line and re-indented, so a short `$this->foo()->bar()` stays on one line and a deliberately wrapped builder chain keeps its own breaks. refs: #36 Signed-off-by: Maurizio Monticelli --- CHANGELOG.md | 12 ++++++++---- config/whatwedo-rules.php | 8 ++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fa76ce..e21e763 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,10 +16,9 @@ now apply as the sets intend: casts are spaced (`(int) $x`), comparisons drop the Yoda order (`$x === null`, and an existing `null === $x` is rewritten), `$i ++` becomes `$i++`, broken PHPDoc inline tags are normalised (`@{TAG}` to `{@TAG}`), `@return null` - and `@subpackage` are dropped, a blank line follows the `namespace` statement, every - call in a method chain is indented to one level, and every operator in a multiline - expression moves to the beginning of the continuation line instead of only `&&` and - `||`. + and `@subpackage` are dropped, a blank line follows the `namespace` statement, and + every operator in a multiline expression moves to the beginning of the continuation + line instead of only `&&` and `||`. Two of the overrides said nothing to begin with: the skip on `NoExtraBlankLinesFixer` had no effect, because `PER_CS` narrows that fixer to blank lines between imports and `NoBlankLineBetweenImportsFixer` already removes those, and the `position` set next to @@ -30,6 +29,11 @@ spacing, `?int` type formatting, `Foo::bar` spacing and single-line empty bodies. Imports keep being sorted alphabetically and `declare()` parentheses keep being checked, both of which the PER-CS set leaves to the caller +- the line breaks and the indentation of a method chain are left to the author: + `MethodChainingNewlineFixer` and `MethodChainingIndentationFixer`, which the ECS 13 + sets bring along, are skipped, so a short `$this->foo()->bar()` stays on one line + instead of being split into one call per line, and a deliberately wrapped builder + chain keeps its own breaks and indentation - drop `SetList::CLEAN_CODE` (imported by `SetList::COMMON` in full) and 17 skips that targeted rules no longer shipped by any ECS 13 set; the effective checker list is unchanged diff --git a/config/whatwedo-rules.php b/config/whatwedo-rules.php index 3ffb1ba..4995694 100644 --- a/config/whatwedo-rules.php +++ b/config/whatwedo-rules.php @@ -6,11 +6,13 @@ use PhpCsFixer\Fixer\LanguageConstruct\IsNullFixer; use PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer; use PhpCsFixer\Fixer\Phpdoc\PhpdocNoAliasTagFixer; +use PhpCsFixer\Fixer\Whitespace\MethodChainingIndentationFixer; use PhpCsFixerCustomFixers\Fixer\NoImportFromGlobalNamespaceFixer; use PhpCsFixerCustomFixers\Fixer\NoPhpStormGeneratedCommentFixer; use PhpCsFixerCustomFixers\Fixer\PhpdocSelfAccessorFixer; use SlevomatCodingStandard\Sniffs\Exceptions\DeadCatchSniff; use SlevomatCodingStandard\Sniffs\Namespaces\UseFromSameNamespaceSniff; +use Symplify\CodingStandard\Fixer\Spacing\MethodChainingNewlineFixer; use Symplify\EasyCodingStandard\Config\ECSConfig; use whatwedo\PhpCodingStandard\Fixer\DumpFixer; @@ -33,5 +35,11 @@ NotOperatorWithSuccessorSpaceFixer::class => null, PhpdocNoAliasTagFixer::class => null, + // how a fluent chain is wrapped is the author's call, not the standard's + MethodChainingNewlineFixer::class => null, + MethodChainingIndentationFixer::class => null, + // whatwedo bundle classes carry the lowercase vendor prefix (whatwedoCrudBundle), // which the sniff reads as a PascalCase violation + ValidClassNameSniff::class => ['**/whatwedo*.php'], + ]); From ecca0b1218d38aeac3466ec6a2350970e16c6b2a Mon Sep 17 00:00:00 2001 From: Maurizio Monticelli Date: Wed, 16 Sep 2026 14:29:07 +0200 Subject: [PATCH 09/12] feat(config)!: format Doctrine annotations in the Symfony set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Symfony set now normalises the indentation, spacing and array assignments inside Doctrine annotations, which until now were left untouched in projects that still carry mapping or validation in docblocks rather than attributes. BREAKING CHANGE: run `vendor/bin/ecs check --fix` once after the update — the first run reformats existing Doctrine annotations. refs: #36 Signed-off-by: Maurizio Monticelli --- CHANGELOG.md | 3 +++ config/whatwedo-symfony.php | 2 ++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e21e763..9e6e75b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,9 @@ sets bring along, are skipped, so a short `$this->foo()->bar()` stays on one line instead of being split into one call per line, and a deliberately wrapped builder chain keeps its own breaks and indentation +- the Symfony set adds `SetList::DOCTRINE_ANNOTATIONS`, so the indentation, spacing and + array assignments inside Doctrine annotations are formatted — the first run reformats + projects that still carry mapping or validation in docblocks rather than attributes - drop `SetList::CLEAN_CODE` (imported by `SetList::COMMON` in full) and 17 skips that targeted rules no longer shipped by any ECS 13 set; the effective checker list is unchanged diff --git a/config/whatwedo-symfony.php b/config/whatwedo-symfony.php index 638fe0c..1357b3b 100644 --- a/config/whatwedo-symfony.php +++ b/config/whatwedo-symfony.php @@ -5,11 +5,13 @@ use PhpCsFixer\Fixer\Operator\ConcatSpaceFixer; use PhpCsFixerCustomFixers\Fixer\NoDoctrineMigrationsGeneratedCommentFixer; use Symplify\EasyCodingStandard\Config\ECSConfig; +use Symplify\EasyCodingStandard\ValueObject\Set\SetList; use whatwedo\PhpCodingStandard\Set\WhatwedoSets; return ECSConfig::configure() ->withSets([ WhatwedoSets::COMMON, + SetList::DOCTRINE_ANNOTATIONS, ]) ->withRules([ NoDoctrineMigrationsGeneratedCommentFixer::class, From d906ff14a1d21482c7bf0e511ec1722e52c2b573 Mon Sep 17 00:00:00 2001 From: Maurizio Monticelli Date: Mon, 19 Oct 2026 15:03:11 +0200 Subject: [PATCH 10/12] chore(deps): pin the coding standard tools to patch releases Allow only patch updates of slevomat/coding-standard, kubawerlos/php-cs-fixer-custom-fixers and symplify/easy-coding-standard so a new upstream minor release cannot change the formatting result without a release of this package. Signed-off-by: Maurizio Monticelli --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 6771132..8ca993b 100644 --- a/composer.json +++ b/composer.json @@ -20,9 +20,9 @@ ], "require": { "php": ">=8.2", - "kubawerlos/php-cs-fixer-custom-fixers": "^3", - "slevomat/coding-standard": "^8", - "symplify/easy-coding-standard": "^13.3.2" + "kubawerlos/php-cs-fixer-custom-fixers": "~3.37.4", + "slevomat/coding-standard": "~8.31.1", + "symplify/easy-coding-standard": "~13.3.7" }, "autoload": { "psr-4": { From 896a07c7f48353727b414d1329600e82e5640bb1 Mon Sep 17 00:00:00 2001 From: Maurizio Monticelli Date: Mon, 19 Oct 2026 15:03:11 +0200 Subject: [PATCH 11/12] chore: list whatwedo GmbH as the package author Signed-off-by: Maurizio Monticelli --- composer.json | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index 8ca993b..b48d770 100644 --- a/composer.json +++ b/composer.json @@ -6,23 +6,15 @@ "homepage": "https://github.com/whatwedo/PhpCodingStandard", "authors": [ { - "name": "Felix Imobersteg", - "email": "felix@whatwedo.ch" - }, - { - "name": "Marc Wieland", - "email": "marc@whatwedo.ch" - }, - { - "name": "Maurizio Monticelli", - "email": "maurizio@whatwedo.ch" + "name": "whatwedo GmbH", + "email": "welove@whatwedo.ch" } ], "require": { "php": ">=8.2", - "kubawerlos/php-cs-fixer-custom-fixers": "~3.37.4", - "slevomat/coding-standard": "~8.31.1", - "symplify/easy-coding-standard": "~13.3.7" + "kubawerlos/php-cs-fixer-custom-fixers": "^3", + "slevomat/coding-standard": "^8", + "symplify/easy-coding-standard": "^13.3.2" }, "autoload": { "psr-4": { From e35cdd1fafa2546eb0abd529a559fd921b871645 Mon Sep 17 00:00:00 2001 From: Maurizio Monticelli Date: Mon, 19 Oct 2026 15:06:15 +0200 Subject: [PATCH 12/12] ci: check the coding style with ECS on every pull request Run `make ecs` on pushes to main and on pull requests and fail the build when ECS would change a file. Signed-off-by: Maurizio Monticelli --- .github/workflows/ecs.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/ecs.yml diff --git a/.github/workflows/ecs.yml b/.github/workflows/ecs.yml new file mode 100644 index 0000000..79deb4c --- /dev/null +++ b/.github/workflows/ecs.yml @@ -0,0 +1,28 @@ +name: ECS + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +jobs: + ecs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + tools: composer:v2 + coverage: none + + - uses: ramsey/composer-install@v3 + + - run: make ecs + + # make ecs applies its fixes, so a dirty working tree means the code was not formatted + - run: git diff --exit-code