Skip to content

Released ECS 13.3.7

Latest

Choose a tag to compare

@TomasVotruba TomasVotruba released this 14 Oct 21:37

News Features 馃帀

PsrAutoloading in blink

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.

ecsphp/ecs-src#200


Model 5 more fixer configs in blink

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.

ecsphp/ecs-src#208


Show diff of fixed files in --fix mode

Blink 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).

ecsphp/ecs-src#205


Elapsed time in seconds for long runs

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.

ecsphp/ecs-src#207


Condensed run output spacing

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.

ecsphp/ecs-src#201


Bugfixes 馃悰

PER-CS blank line between import groups no longer stripped

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.

ecsphp/ecs-src#206


Keep blank line between different import groups

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.

ecsphp/ecs-src#209


RemoveSuperfluousReturnNameFixer no longer corrupts conditional return types

The 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.

ecsphp/ecs-src#210