Review main Merged

92385[TASK] Avoid json_decode/json_encode in Menu Processors

Benni Mack CR +2 V +2 Hard +214 −581 updated 01/20/26, 11:33

Commit message

The MenuProcessor and LanguageMenuProcessor previously used a complex
TypoScript configuration to render menu items as JSON, which was then
decoded back into a PHP array. This introduced unnecessary overhead.

This patch adds a getMenuItems() method to AbstractMenuContentObject
that returns menu items directly as a structured PHP array, eliminating
the JSON encode/decode cycle.

This way, we remove 300+ lines of JSON-related TypoScript configuration.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 2

Files 4

Review log 1216

  1. Benni Mack uploaded patch set 1 01/19/26, 13:25

  2. core-ci voted on patch set 1 V -1 01/19/26, 13:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93775

  3. Benni Mack uploaded patch set 2 V -1 01/19/26, 13:55

  4. Benni Mack marked it ready for review 01/19/26, 13:56

  5. core-ci voted on patch set 2 V +1 01/19/26, 14:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93778

  6. Nikita Hovratov commented on patch set 2 01/19/26, 14:16

    LanguageMenuProcessor.php:206

    Let's only wrap this one line in the try/catch block.
  7. Georg Ringer commented on patch set 2 CR +1 V +1 01/19/26, 20:43

    LanguageMenuProcessor.php:206 Reply

    but also the lines below are then invalid, like "$languageObject->getLocale()->getName();" does not work. it would leave only the keys active,current,available but with which benefit?
  8. Nikita Hovratov uploaded patch set 3 CR +1 V +1 01/19/26, 21:50

  9. core-ci voted on patch set 3 V +1 01/19/26, 22:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93800

  10. Nikita Hovratov commented on patch set 3 01/19/26, 22:13

    LanguageMenuProcessor.php:206 Reply

    Done, see patchset 3.
  11. Nikita Hovratov updated the commit message in patch set 4 V +1 01/19/26, 23:16

  12. core-ci voted on patch set 4 V +1 01/19/26, 23:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93803

  13. Georg Ringer voted on patch set 4 CR +1 V +1 01/20/26, 06:31

  14. Nikita Hovratov voted on patch set 4 CR +1 V +1 01/20/26, 08:19

  15. Benni Mack voted on patch set 4 CR +2 V +2 01/20/26, 11:33

  16. Benni Mack merged patch set 5 01/20/26, 11:33