Review main Merged

75232[TASK] Avoid using TemplateService->rootLine

Christian Kuhn CR +2 V +2 Normal +143 −65 updated 07/18/22, 20:14

Commit message

With the new TypoScript parser, we should start
phasing out TemplateService (tsfe->tmpl in FE).

One of it's usages in Frontend is tmpl->rootLine.
This property looks as if it's identical to
tsfe->rootLine, but it isn't, since it's in a
different order and stops at sys_template records
with root flag.

However, tmpl->rootLine is also assigned in Frontend
as tsfe->config['rootLine']. The patch changes all
usages of tmpl->rootLine to this and sanitizes access
along the way. Additional comments now document the
subtle differences.

We do not add a deprecation at this point, since
the entire class will be fully deprecated later.

Note the new TypoScript parser construct can not
expose this "local" or "partial" rootLine yet. The
TypoScript/IncludeTree/TreeBuilder class will be
refactored a bit with an additional patch when the
new parser is being used in the Frontend.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Anja Leichsenring +1
    • Stefan Bürk +1
    • Nikita Hovratov +1
    • Benni Mack +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Anja Leichsenring +1
    • Stefan Bürk +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 10

Review log 912

  1. Christian Kuhn uploaded patch set 1 07/17/22, 10:13

  2. core-ci voted on patch set 1 V +1 07/17/22, 10:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29311

  3. Christian Kuhn uploaded patch set 2 07/17/22, 11:23

  4. Christian Kuhn uploaded patch set 3 07/17/22, 11:26

  5. core-ci voted on patch set 3 V +1 07/17/22, 11:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29313

  6. core-ci voted on patch set 2 V +1 07/17/22, 11:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29312

  7. Stefan Bürk voted on patch set 3 V +1 CR +1 07/18/22, 11:07

  8. Anja Leichsenring voted on patch set 3 V +1 CR +1 07/18/22, 13:14

  9. Benni Mack voted on patch set 3 V +1 CR +1 07/18/22, 13:26

  10. Nikita Hovratov commented on patch set 3 CR +1 07/18/22, 19:24

    Nice, thanks for clearing this up! I also once stumbled upon the rootLine properties of tsfe and was not aware of the special sorting.
  11. Christian Kuhn voted on patch set 3 V +2 CR +2 07/18/22, 20:14

  12. Christian Kuhn merged patch set 4 07/18/22, 20:14