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

Review main Work in progress

95432[WIP][TASK] Carry the backend further towards strictNullChecks

Benjamin Kott CR 0 V 0 Normal +57 −45 updated 11/18/26, 11:30

Commit message

Continues the previous step. The errors taken here fall into
recognisable groups rather than being one-offs.

Several functions returned null from a signature that did not admit
it - the code completion parser, its extension tree walker, the
consumer scope and the form engine ready promise. Their return types
say so now instead of the call sites working around it.

The wizard steps of the localization module rendered their task
without an initial state, which yields undefined where a template is
expected, and typed the task arguments as nullable although the wizard
store hands out undefined. Both are corrected at the declaration.

The rest are locals that were read before being assigned, the token
metadata of the TypoScript language mode whose type is genuinely
absent for a plain token, and the modal template content which is only
set for template modals.

Three module singletons are assigned by a bootstrap that runs at import
time and were then read as if that had happened. Each now hands the
narrowed value to a typed constant and exports that, which states the
assumption once instead of at every use across the whole tree. An
assertion on the export itself does not work: the global TYPO3 object
types those very exports, so TypeScript would infer it circularly.

The non-null assertions this step relies on are added with
strictNullChecks itself, as no-unnecessary-type-assertion reports
every such assertion until the option is enabled.

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 8
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/32/95432/8 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/32/95432/8 && 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 13

  1. main 95437[WIP][TASK] Enable strict mode for the TypeScript build Based on this change Work in progress Merge conflict Benjamin Kott CR 0 V 0 → 14.3 Easy +1 −9
  2. main 95436[WIP][TASK] Initialise class properties across the JavaScript stack Based on this change Work in progress Merge conflict Benjamin Kott CR 0 V 0 → 14.3 Hard +275 −275
  3. main 95435[WIP][TASK] Enable strictNullChecks for the TypeScript build Based on this change Work in progress Merge conflict Benjamin Kott CR 0 V 0 → 14.3 Nightmare +1822 −1817
  4. main 95434[WIP][TASK] Clear the last strictNullChecks errors in the backend Based on this change Work in progress Merge conflict Benjamin Kott CR 0 V -1 → 14.3 Normal +66 −60
  5. main 95433[WIP][TASK] Reduce the remaining backend strictNullChecks errors Based on this change Work in progress Merge conflict Benjamin Kott CR 0 V 0 → 14.3 Normal +63 −59
  6. 95432 [WIP][TASK] Carry the backend further towards strictNullChecks This change

  7. main 95431[TASK] Make most of the backend TypeScript null-safe This change is based on it Benjamin Kott CR 0 V 0 → 14.3 Hard +204 −199

    The chain has patch set 8 of 10, the changes above it need a rebase.

  8. main 95430[TASK] Make the form editor null-safe This change is based on it Merged Benjamin Kott CR +2 V +2 → 14.3 Normal +91 −84

    The chain has patch set 8 of 10, the changes above it need a rebase.

  9. main 95429[TASK] Make the install tool null-safe This change is based on it Merged Benjamin Kott CR +2 V +2 → 14.3 Normal +99 −93

    The chain has patch set 8 of 10, the changes above it need a rebase.

  10. main 95428[TASK] Make the file list and the RTE null-safe This change is based on it Merged Benjamin Kott CR +2 V +2 → 14.3 Normal +119 −111

    The chain has patch set 8 of 10, the changes above it need a rebase.

  11. main 95427[TASK] Make the dashboard null-safe This change is based on it Merged Benjamin Kott CR +2 V +2 → 14.3 Normal +135 −70

    The chain has patch set 8 of 10, the changes above it need a rebase.

  12. main 95426[TASK] Guard nullable values in backend modules This change is based on it Merged Benjamin Kott CR +2 V +2 → 14.3 Hard +147 −123

    The chain has patch set 8 of 9, the changes above it need a rebase.

  13. main 95425[TASK] Guard nullable values in TypeScript This change is based on it Merged Benjamin Kott CR +2 V +2 → 14.3 Hard +307 −276

    The chain has patch set 8 of 10, the changes above it need a rebase.

Files 36

Show 16 more files

Review log 917

  1. Benjamin Kott uploaded patch set 1 08/26/26, 13:09

  2. Benjamin Kott marked it work in progress 08/26/26, 13:24

  3. core-ci voted on patch set 1 V +1 08/26/26, 13:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107145

  4. Benjamin Kott uploaded patch set 2 V +1 10/15/26, 16:16

  5. core-ci voted on patch set 2 V +1 10/15/26, 16:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111234

  6. Benjamin Kott updated the commit message in patch set 3 V +1 10/15/26, 21:02

  7. core-ci voted on patch set 3 V +1 10/15/26, 21:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111275

  8. Benjamin Kott rebased onto patch set 4 V +1 10/16/26, 07:45

  9. core-ci voted on patch set 4 V -1 10/16/26, 08:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111323

  10. Benjamin Kott rebased onto patch set 5 V -1 10/16/26, 09:26

  11. core-ci voted on patch set 5 V +1 10/16/26, 09:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111338

  12. Benjamin Kott uploaded patch set 6 V +1 10/23/26, 14:49

  13. Benjamin Kott uploaded patch set 7 10/23/26, 15:42

  14. core-ci voted on patch set 6 V -1 10/23/26, 15:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112330

  15. core-ci voted on patch set 7 V -1 10/23/26, 16:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112350

  16. Benjamin Kott uploaded patch set 8 V -1 11/18/26, 10:59

  17. core-ci voted on patch set 8 V +1 11/18/26, 11:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114862