You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BlankLineBetweenImportGroupsFixer is effectively ignored from PER_CS set #336
The blank line (line 7) between the class-based import statements and the function-based import statements should be retained (or added if not present) by BlankLineBetweenImportGroupsFixer, but instead it is removed by NoBlankLineBetweenImportsFixer. This is for rule 3 of PER Coding Style (currently v3.1).
I think this is because NoBlankLineBetweenImportsFixer runs with a priority of -50, after BlankLineBetweenImportGroupsFixer which has a priority of -40. Manually changing -40 to -51 stops the blank line being removed, or replaces it if it is not present.
The comment in NoBlankLineBetweenImportsFixer specifically says the priority is to make them run in the current order, so I'm unsure what other issue this may be trying to resolve, but at the moment the result does not match PER CS.
Output when running ecs check --fix:
1) ecs.php
---------- begin diff ----------
@@ Line 4 @@
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
-
use function strlen as strlen_alias;
strlen_alias('ecs');
----------- end diff -----------
Applied checkers:
* PhpCsFixer\Fixer\Whitespace\BlankLineBetweenImportGroupsFixer
* PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer
* Symplify\CodingStandard\Fixer\Spacing\NoBlankLineBetweenImportsFixer
[OK] 1 error successfully fixed and no other errors found!
// 1 files · 700ms · 12 MB
Activity
TomasVotruba commentedon Oct 13, 2026
Thanks, fixed in ecsphp/ecs-src#206