Review main Merged

92890[TASK] Remove phpstan warnings in backend-related code

Benni Mack CR +2 V +2 Hard +133 −473 updated 02/19/26, 12:16

Commit message

Most of the reported phpstan issues arise through
invalid type-hinted code in backend-related methods,
this has been properly done in the places where
later-on PHP errors would have occurred anyways,
and are thus fixed.

This change also fixes a flaky e2e test.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Oliver Klee +1
    • Anja Leichsenring +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Oliver Klee +1
    • Anja Leichsenring +1
    • core-ci +1 CI

Issues 1

Files 39

Show 19 more files

Review log 1318

  1. Benni Mack uploaded patch set 1 02/18/26, 20:07

  2. core-ci voted on patch set 1 V -1 02/18/26, 20:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96189

  3. Benni Mack uploaded patch set 2 V -1 02/19/26, 09:48

  4. core-ci voted on patch set 2 V -1 02/19/26, 09:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96224

  5. Benni Mack uploaded patch set 3 V -1 02/19/26, 10:12

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

  7. Benni Mack uploaded patch set 4 V +1 02/19/26, 10:34

  8. Benni Mack commented on patch set 5 02/19/26, 10:48

    Published edit on patch set 4.
  9. core-ci voted on patch set 4 V -1 02/19/26, 10:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96231

  10. core-ci voted on patch set 5 V +1 02/19/26, 10:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96233

  11. Anja Leichsenring voted on patch set 5 CR +1 V +1 02/19/26, 10:58

  12. Oliver Klee voted on patch set 5 V +1 02/19/26, 11:09

  13. Garvin Hicking commented on patch set 5 02/19/26, 11:12

    SingleFieldContainer.php:157

    ```suggestion if (($this->data['inlineStructure']['stable'] ?? []) !== []) { ``` Let's try to avoid introducing new empty() usages? (this suggestion is untested)

    UnorderedListTreeRenderer.php:62

    ```suggestion // @todo: this doc block is a hack, as it needs to be a TreeRepresentationNode ```

    AbstractListTypeToCTypeUpdate.php:58

    Unsure about this one, IMO 'string' is what we want here, and the test for that shouldn't make us be more lax on this just to not annotate a test...
  14. Oliver Klee voted on patch set 5 CR +1 02/19/26, 11:13

  15. Benni Mack commented on patch set 5 02/19/26, 11:59

    SingleFieldContainer.php:157 Reply

    Done

    UnorderedListTreeRenderer.php:62 Reply

    Done

    AbstractListTypeToCTypeUpdate.php:58 Reply

    nope. it was about a "is_string()". And this is the main problem for me with these type-hints. It's a hint, we still need to check the code (which we do in this case, with is_string()"). I will propose to the mergers to disable "treatPhpDocTypesAsCertain: false" to avoid this in the future.
  16. Benni Mack commented on patch set 5 02/19/26, 12:01

    SingleFieldContainer.php:157 Reply

    sorry, not done.
  17. Garvin Hicking commented on patch set 5 CR +2 V +2 02/19/26, 12:16

    SingleFieldContainer.php:157 Reply

    Acknowledged
  18. Garvin Hicking merged patch set 6 02/19/26, 12:16