Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Ready for review Quiet

95105[TASK] Apply PHP code simplifications

Wouter Wolters CR 0 V 0 Hard +237 −371 updated 10/24/26, 22:57

Commit message

- Return expressions directly instead of assigning single-use variables.
- Use foreach values instead of repeated keyed array lookups.
- Pass variadic arguments directly instead of unpacking temporary
  arrays.
- Replace conditional bounds checks with min() and max().
- Use native string helpers such as str_starts_with().
- Remove redundant assignments, continue statements, concatenations, and
  PHPDoc.
- Simplify boolean expressions and test helpers.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 6
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/05/95105/6 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/05/95105/6 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Relation chain 2

  1. main 95106[TASK] Remove unused PHP imports Based on this change Merged Wouter Wolters CR +2 V +2 Easy +0 −15

    The chain has patch set 1 of 2, the changes above it need a rebase.

  2. 95105 [TASK] Apply PHP code simplifications This change

Issues 1

Files 109

Show 89 more files

Review log 2026

Show 1 earlier messages
  1. Wouter Wolters uploaded patch set 1 08/04/26, 20:39

  1. core-ci voted on patch set 1 V +1 08/04/26, 20:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105948

  2. Oliver Klee commented on patch set 1 08/05/26, 06:51

    Could we split this up (e.g., by extension or by type of change)? That would make these changes easier and faster to review.
  3. Oliver Klee commented on patch set 1 08/05/26, 07:43

    Reply Unresolved

    (For me personally, it would be fastest and easiest to review if we had one change per type of change, e.g., one for inlining, one for using min/max etc.)
  4. Benni Mack marked it work in progress 08/12/26, 10:47

  5. Wouter Wolters uploaded patch set 2 V +1 08/16/26, 12:31

  6. Wouter Wolters marked it ready for review 08/16/26, 12:31

  7. core-ci voted on patch set 2 V +1 08/16/26, 12:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106785

  8. Andreas Kienast commented on patch set 2 08/17/26, 05:34

    NewContentElementController.php:258

    While this code works, it may be confusing as using `$wizards[$groupKey]` in the next line is necessary. I'd suggest to rewrite it slightly to make it more convenient: ``` $wizardGroup = $this->prepareDependencyOrdering($wizardGroup, 'before'); $wizardGroup = $this->prepareDependencyOrdering($wizardGroup, 'after'); $wizards[$groupKey] = $wizardGroup; ```

    ImportExport.php:1119

    Please introduce a proper variable name. `$_` is a dummy for "not used".
  9. Andreas Kienast voted on patch set 2 CR -1 08/17/26, 05:34

  10. Wouter Wolters uploaded patch set 3 CR -1 V +1 08/17/26, 08:17

  11. core-ci voted on patch set 3 V +1 08/17/26, 08:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106809

  12. Wouter Wolters commented on patch set 3 08/17/26, 08:36

    NewContentElementController.php:258 Reply

    Done

    ImportExport.php:1119 Reply

    Done
  13. Markus Klein commented on patch set 3 08/17/26, 09:05

    BackendUserAuthentication.php:1276

    Not sure about code style here. 1.) comment position 2.) readyability
  14. Wouter Wolters uploaded patch set 4 V +1 10/24/26, 13:59

  15. core-ci voted on patch set 4 V +1 10/24/26, 14:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112418

  16. Markus Klein commented on patch set 4 10/24/26, 18:55

    BackendUserAuthentication.php:1276 Reply

    keep it

    BackendUserAuthentication.php:1282

    that comment is nonsense. just remove it, the function name says it all.
  17. Markus Klein commented on patch set 4 10/24/26, 18:56

    BackendUserAuthentication.php:1282

    ```suggestion ```
  18. Markus Klein commented on patch set 5 V +1 10/24/26, 18:56

    Published edit on patch set 4.
  19. Markus Klein commented on patch set 5 10/24/26, 18:56

    BackendUserAuthentication.php:1282 Reply

    Done

    BackendUserAuthentication.php:1282 Reply

    Done
  20. Markus Klein commented on patch set 5 CR -1 10/24/26, 19:02

    a lot of comment in DB queries got lost

    RootlineUtility.php:808

    keep the comments as they were

    RootlineUtility.php:1191

    another lost comment?
  21. core-ci voted on patch set 5 V +1 10/24/26, 19:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112426

  22. Wouter Wolters uploaded patch set 6 CR -1 V +1 10/24/26, 19:14

  23. Wouter Wolters commented on patch set 6 10/24/26, 19:14

    Reply

    Done

    RootlineUtility.php:808 Reply

    Done

    RootlineUtility.php:1191 Reply

    Done
  24. core-ci voted on patch set 6 V +1 10/24/26, 19:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112427

  25. Simon Schaufelberger commented on patch set 6 10/24/26, 22:57

    TcaMigration.php:103 Unresolved

    I would leave the variable here to easily add new entries above as this is a list that often changes and then you only have one changed line in the commit

    TcaPreparation.php:55 Unresolved

    Not sure about this one