Skip to content

style: replace deprecated ECS fixers - #11

Open
Vondry wants to merge 1 commit into
bolt:mainfrom
Vondry:style/replace-deprecated-ecs-fixers
Open

Vondry wants to merge 1 commit into
bolt:mainfrom
Vondry:style/replace-deprecated-ecs-fixers

Conversation

@Vondry

@Vondry Vondry commented Nov 21, 2026

Copy link
Copy Markdown

PHP-CS-Fixer deprecates BracesFixer and NewWithBracesFixer. This replaces them with their successors, keeping the same style:

  • BracesPositionFixer with the settings BracesFixer translated its options to: braces of classes and functions on the next line, of control structures and closures on the same line, no single-line closures.
  • NewWithParenthesesFixer instead of NewWithBracesFixer.

The other fixers BracesFixer bundled (ControlStructureBracesFixer, StatementIndentationFixer, SingleSpaceAroundConstructFixer, DeclareParenthesesFixer, ControlStructureContinuationPositionFixer, NoMultipleStatementsPerLineFixer, NoExtraBlankLinesFixer) are already part of the psr12 set, so they aren't added again.

To confirm nothing changes, I ran ecs check --fix on a copy of bolt/core's src/ with the old and the new configuration: the results are byte-identical.

PHP-CS-Fixer deprecates BracesFixer and NewWithBracesFixer. Their
replacements, BracesPositionFixer and NewWithParenthesesFixer, keep the same
style: on bolt/core's src/, the old and the new configuration fix every file
identically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant