Review 13.4 Merged

94004[TASK] Upgrade php-cs-fixer ruleset to @PER-CS3x0

Benni Mack CR +2 V +2 Nightmare +2603 −2557 updated 05/06/26, 13:31

Commit message

Switches the base ruleset from @PER-CS1x0 to @PER-CS3x0, which
transitively includes @PER-CS2x0 and @PER-CS3x0 rules. Rules that
were previously declared explicitly but are now covered by the
upgraded set are removed:

- array_indentation
- array_syntax
- concat_space
- function_declaration
- method_argument_space
- single_line_empty_body
- single_space_around_construct
- declare_equal_normalize (already covered by @PSR12 with default space: none)
- return_type_declaration (already covered by @PSR12 with default space_before: none)

Two explicit overrides remain to deviate from PER-CS3x0 defaults:

- cast_spaces: 'none' instead of 'single'
- nullable_type_declaration: 'question_mark' (?Type) instead of
  'union' (Type|null)

Note: php-cs-fixer's @PER-CS3x0 ruleset is a partial implementation.
Known gaps not yet covered by fixers:

PER-CS 2.0 (https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/7247):
- Arrow function spacing (fn/=> surrounded by spaces)
- Multiline arrow function => placement on new lines
- Method chaining multiline enforcement
- PascalCase validation for enum cases/constants

PER-CS 3.0 (https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/9191):
- Property hooks formatting (PHP 8.4, §4.9)
- set-visibility modifier order, e.g. private(set) (§4.6)
- Callable reference syntax foo(...) spacing (§4.8)
- Enum backing type spacing (§9)
- Heredoc/nowdoc same-line placement (§10)
- Attribute placement on multi-line parameters (§12)

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
  • Verified V +2 Done
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 1

Files 413

Show 393 more files

Review log 46

  1. Benni Mack uploaded patch set 1 05/06/26, 09:00

  2. core-ci voted on patch set 1 V -1 05/06/26, 09:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101603

  3. Christian Kuhn uploaded patch set 2 V -1 05/06/26, 13:06

  4. core-ci voted on patch set 2 V +1 05/06/26, 13:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101616

  5. Christian Kuhn voted on patch set 2 CR +2 V +2 05/06/26, 13:31

  6. Christian Kuhn merged patch set 3 05/06/26, 13:31