Review main Merged Breaking

75944[!!!][TASK] Use new TypoScript parser in Frontend

Christian Kuhn CR +2 V +2 Expert +1076 −546 updated 10/03/22, 17:58

Commit message

This switches from TemplateService to new TypoScript
parser logic in TypoScriptFrontendController.

The central methods getFromcache() and getConfigArray()
were called in PrepareTypoScriptFrontendRendering after
each other: getConfigArray() is now merged into
getFromcache() directly.

One main goal is to get rid of the 'pagesection' cache
and leverage the new cache strategy of the new TypoScript
parser: This cache strategy is more effective and allows
caching TypoScript between different pages.

We essentially get rid of the pagesection query load,
but instead need the list of relevant sys_template rows
early, which is done with a single query. This code is
moved out of IncludeTree/TreeBuilder to new class
IncludeTree/SysTemplateRepository, since the result is
now needed to build page cache identifiers and thus must
be exposed.

An event is added as well, for extensions like ext:bolt
to manipulate sys_template rows resolving. The old
runThroughTemplatesPostProcessing hook is marked @internal
now and will vanish during further v12 development when
testing-framework has been changed to deal with it.

The central getFromcache() is much better documented and
should be far easier to understand now. Some parts of
the code are currently a bit naive and there is quite a
bit potential to further optimize parsetime especially
in "full cached" scenarios. We also have the potential to
make USER_INT parsing significantly quicker. Dedicated
patches will follow with continued v12 development.

The patch also sets a couple of properties to @internal,
and marks the old TypoScriptParser and TemplateService
@deprecated, even though it is currently still used for
instance for TSconfig parsing, which will switch to the
new parser soon as well.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 2

Files 29

Show 9 more files

Review log 1520

  1. Christian Kuhn uploaded patch set 1 10/03/22, 00:34

  2. Christian Kuhn commented on patch set 1 CR -1 10/03/22, 00:44

    needs commit message and .rst files.
  3. core-ci voted on patch set 1 V +1 10/03/22, 00:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31921

  4. Stefan Bürk commented on patch set 1 10/03/22, 10:39

    TemplateService.php:829

    Should this not be guarded by a is_string(), what do you think ? ``` if (is_string($setup) && $setup !== '') {} ```

    TemplateService.php:834

    same as above, is_string guard ?

    TemplateService.php:841

    same as above, is_string guard ?

    TemplateService.php:846

    same as above, is_string guard ?

    ExtensionManagementUtility.php:1170

    are we sure that this is set and it is a string ? or shoud we add a check and setting empty string if not ? ( ??= guard )

    ExtensionManagementUtility.php:1185

    see above: are we sure that this is set and it is a string ? or shoud we add a check and setting empty string if not ? ( ??= guard )
  5. Christian Kuhn commented on patch set 1 10/03/22, 10:50

    TemplateService.php:829 Reply

    Done

    TemplateService.php:834 Reply

    Done

    TemplateService.php:841 Reply

    Done

    TemplateService.php:846 Reply

    Done

    ExtensionManagementUtility.php:1170 Reply

    Done

    ExtensionManagementUtility.php:1185 Reply

    Done
  6. Christian Kuhn uploaded patch set 2 10/03/22, 11:49

  7. core-ci voted on patch set 2 V +1 10/03/22, 11:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31938

  8. Christian Kuhn voted on patch set 2 CR -1 10/03/22, 12:07

  9. Christian Kuhn uploaded patch set 3 10/03/22, 12:25

  10. core-ci voted on patch set 3 V +1 10/03/22, 12:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31940

  11. Christian Kuhn uploaded patch set 4 10/03/22, 13:35

  12. core-ci voted on patch set 4 V +1 10/03/22, 13:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31946

  13. Stefan Bürk voted on patch set 4 CR +1 10/03/22, 16:27

  14. Stefan Bürk commented on patch set 4 CR -1 10/03/22, 17:13

    getting some "" invalid cache identifier exceptions on my installation ...
  15. Christian Kuhn uploaded patch set 5 10/03/22, 17:44

  16. Stefan Bürk voted on patch set 5 V +1 CR +1 10/03/22, 17:52

  17. core-ci voted on patch set 5 V +1 10/03/22, 17:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31950

  18. Benni Mack voted on patch set 5 V +1 CR +1 10/03/22, 17:58

  19. Benni Mack voted on patch set 5 V +2 CR +2 10/03/22, 17:58

  20. Benni Mack merged patch set 6 10/03/22, 17:58