Review main Merged

83119[FEATURE] Add TypoScript provider for sites and sets

Benjamin Franzke CR +2 V +2 Hard +571 −106 updated 04/07/24, 09:32

Commit message

TYPO3 sites are enhanced to be able to operate as TypoScript
templates. They act similar to sys_template records with
"clear" and "root" flags set. By design a site TypoScript provider
always defines a new scope (root-flag) and does not inherit from parent
sites (in the rootline). That means it behaves as if the clear-flag is
set in a sys_template record.
This behavior is not configurable by design, as TypoScript code sharing
is intended to be implemented via sharable sets (introduced in #103437).

TypoScript dependencies can be included via sets dependencies.
This mechanism supersedes the previous static_file_include's
or manual `@import` statements (they are still fine for local includes,
but should be avoided for cross-set/extensions dependencies),
as sets are automatically ordered and deduplicated.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Benjamin Kott +1
    • Benni Mack +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Benjamin Kott +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 22

Show 2 more files

Review log 66116

Show 4991 earlier messages
  1. Benjamin Franzke uploaded patch set 1 02/24/24, 07:46

  2. core-ci voted on patch set 1 V -1 02/24/24, 07:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53520

  3. Benjamin Franzke uploaded patch set 2 V -1 02/24/24, 09:36

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

  5. Benjamin Franzke uploaded patch set 3 V -1 02/24/24, 10:04

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

  7. Benjamin Franzke uploaded patch set 4 V +1 02/24/24, 10:34

  8. core-ci voted on patch set 4 V +1 02/24/24, 10:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53527

  9. Benjamin Franzke updated the commit message in patch set 5 V +1 02/24/24, 10:41

  10. core-ci voted on patch set 5 V +1 02/24/24, 10:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53529

  11. Benjamin Franzke rebased onto patch set 6 V +1 02/24/24, 12:43

  12. core-ci voted on patch set 6 V +1 02/24/24, 12:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53537

  13. Benjamin Franzke uploaded patch set 7 V +1 02/24/24, 14:12

  14. core-ci voted on patch set 7 V -1 02/24/24, 14:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53541

  15. Benjamin Franzke uploaded patch set 8 V -1 02/24/24, 14:28

  16. core-ci voted on patch set 8 V +1 02/24/24, 14:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53542

  17. Benjamin Franzke uploaded patch set 9 V +1 02/24/24, 14:45

  18. core-ci voted on patch set 9 V +1 02/24/24, 14:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53543

  19. Benjamin Franzke uploaded patch set 10 V +1 02/24/24, 14:52

  20. core-ci voted on patch set 10 V +1 02/24/24, 15:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53545

  21. Simon Schaufelberger commented on patch set 10 02/24/24, 21:32

    SiteConfiguration.php:82

    i would call it `dependencies.typoscript` as `.typoscript` is the file extension, or?

    SiteConfiguration.php:305

    why is this muted? Btw, I also prefer negated ifs and do an early `continue` instead of nesting

    SysTemplateTreeBuilder.php:135

    same here. Use `dependencies.typoscript`
  22. Benjamin Franzke commented on patch set 10 02/25/24, 12:31

    SiteConfiguration.php:82 Reply

    `.typoscript` is not an option as it doesn't contain valid TypoScript. This is really WIP and will not be merged in the next days, other things will need to be figured out first – as written in the commit message, there is more to think about (presets and proper dependency mechanism), therefore this is really just a first working draft.

    SiteConfiguration.php:305 Reply

    See documentation: https://www.php.net/manual/en/function.file-get-contents.php#refsect1-function.file-get-contents-errors > An E_WARNING level error is generated if filename cannot be found, length is less than zero, or if seeking to the specified offset in the stream fails. And no, `file_exists` beforehand is not sufficient because of possible race conditions if the file is deleted in between. I prefer early bail out in general as well, but not in this case. Thank you.

    SysTemplateTreeBuilder.php:135 Reply

    same as above.
  23. Benjamin Franzke uploaded patch set 11 V +1 03/12/24, 06:41

  24. Benjamin Franzke marked it work in progress 03/12/24, 06:42

  25. core-ci voted on patch set 11 V +1 03/12/24, 06:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54392

  26. Simon Schaufelberger wrote 03/12/24, 10:00

    Removed cc Simon Schaufelberger.
  27. Benjamin Franzke rebased onto patch set 12 V +1 03/15/24, 08:13

  28. core-ci voted on patch set 12 V +1 03/15/24, 08:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54566

  29. Benjamin Franzke marked it work in progress 03/15/24, 12:54

  30. Benjamin Franzke rebased onto patch set 13 V +1 03/15/24, 12:55

  31. core-ci voted on patch set 13 V +1 03/15/24, 13:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54589

  32. Benjamin Franzke uploaded patch set 14 V +1 03/19/24, 16:10

  33. core-ci voted on patch set 14 V -1 03/19/24, 16:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54703

  34. Benjamin Franzke uploaded patch set 15 V -1 03/19/24, 18:03

  35. core-ci voted on patch set 15 V -1 03/19/24, 18:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54706

  36. Benjamin Franzke uploaded patch set 16 V -1 03/20/24, 05:39

  37. core-ci voted on patch set 16 V +1 03/20/24, 05:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54712

  38. Benjamin Franzke uploaded patch set 17 V +1 03/20/24, 11:46

  39. core-ci voted on patch set 17 V +1 03/20/24, 11:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54717

  40. Benjamin Franzke uploaded patch set 18 V +1 03/20/24, 14:41

  41. core-ci voted on patch set 18 V -1 03/20/24, 14:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54724

  42. Benjamin Franzke uploaded patch set 19 V -1 03/20/24, 15:30

  43. core-ci voted on patch set 19 V +1 03/20/24, 15:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54727

  44. Benjamin Franzke uploaded patch set 20 V +1 03/20/24, 16:43

  45. core-ci voted on patch set 20 V -1 03/20/24, 16:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54731

  46. Benjamin Franzke rebased onto patch set 21 V -1 03/20/24, 17:19

  47. core-ci voted on patch set 21 V -1 03/20/24, 17:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54735

  48. Benjamin Franzke uploaded patch set 22 V -1 03/20/24, 17:51

  49. core-ci voted on patch set 22 V -1 03/20/24, 17:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54738

  50. Benjamin Franzke uploaded patch set 23 V -1 03/20/24, 19:02

  51. core-ci voted on patch set 23 V +1 03/20/24, 19:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54742

  52. Benjamin Franzke rebased onto patch set 24 V +1 03/20/24, 21:12

  53. core-ci voted on patch set 24 V +1 03/20/24, 21:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54749

  54. Benjamin Franzke rebased onto patch set 25 V +1 03/21/24, 07:40

  55. core-ci voted on patch set 25 V -1 03/21/24, 07:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54765

  56. Benjamin Franzke rebased onto patch set 26 V -1 03/21/24, 07:52

  57. core-ci voted on patch set 26 V -1 03/21/24, 08:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54768

  58. Benjamin Franzke rebased onto patch set 27 V -1 03/21/24, 08:09

  59. core-ci voted on patch set 27 V +1 03/21/24, 08:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54771

  60. Benjamin Franzke uploaded patch set 28 V +1 03/21/24, 12:44

  61. core-ci voted on patch set 28 V -1 03/21/24, 12:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54787

  62. Benjamin Franzke rebased onto patch set 29 V -1 03/21/24, 13:12

  63. core-ci voted on patch set 29 V -1 03/21/24, 13:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54794

  64. Benjamin Franzke rebased onto patch set 30 V -1 03/21/24, 13:58

  65. core-ci voted on patch set 30 V +1 03/21/24, 14:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54802

  66. Benjamin Franzke rebased onto patch set 31 V +1 03/22/24, 07:00

  67. Benjamin Franzke uploaded patch set 32 03/25/24, 09:18

  68. core-ci voted on patch set 32 V +1 03/25/24, 09:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54918

  69. Benjamin Franzke rebased onto patch set 33 V +1 03/25/24, 09:34

  70. core-ci voted on patch set 33 V +1 03/25/24, 09:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54920

  71. Benjamin Franzke uploaded patch set 34 V +1 03/28/24, 15:54

  72. core-ci voted on patch set 34 V -1 03/28/24, 16:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55032

  73. Benjamin Franzke uploaded patch set 35 V -1 03/28/24, 16:48

  74. core-ci voted on patch set 35 V +1 03/28/24, 16:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55037

  75. Benjamin Franzke rebased onto patch set 36 V +1 04/02/24, 12:17

  76. core-ci voted on patch set 36 V +1 04/02/24, 12:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55160

  77. Benjamin Franzke uploaded patch set 37 V +1 04/02/24, 13:46

  78. core-ci voted on patch set 37 V +1 04/02/24, 13:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55171

  79. Benjamin Franzke uploaded patch set 38 V +1 04/02/24, 14:00

  80. core-ci voted on patch set 38 V +1 04/02/24, 14:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55177

  81. Benjamin Franzke uploaded patch set 39 V +1 04/03/24, 09:03

  82. core-ci voted on patch set 39 V +1 04/03/24, 09:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55213

  83. Benjamin Franzke uploaded patch set 40 V +1 04/03/24, 20:53

  84. core-ci voted on patch set 40 V +1 04/03/24, 21:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55278

  85. Benjamin Franzke rebased onto patch set 41 V +1 04/04/24, 06:52

  86. core-ci voted on patch set 41 V -1 04/04/24, 07:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55313

  87. Benjamin Franzke rebased onto patch set 42 V -1 04/04/24, 07:16

  88. core-ci voted on patch set 42 V +1 04/04/24, 07:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55318

  89. Benjamin Franzke uploaded patch set 43 V +1 04/05/24, 08:45

  90. core-ci voted on patch set 43 V +1 04/05/24, 08:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55374

  91. Benjamin Franzke uploaded patch set 44 V +1 04/05/24, 20:39

  1. core-ci voted on patch set 44 V +1 04/05/24, 20:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55396

  2. Benjamin Franzke uploaded patch set 45 V +1 04/05/24, 21:04

  3. core-ci voted on patch set 45 V +1 04/05/24, 21:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55400

  4. Benjamin Franzke uploaded patch set 46 V +1 04/06/24, 09:02

  5. core-ci voted on patch set 46 V -1 04/06/24, 09:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55429

  6. Benjamin Franzke marked it ready for review 04/06/24, 15:01

  7. core-ci voted on patch set 46 V +1 04/06/24, 15:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55429

  8. Benjamin Franzke rebased onto patch set 47 V +1 04/06/24, 15:59

  9. core-ci voted on patch set 47 V +1 04/06/24, 16:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55441

  10. Benjamin Franzke uploaded patch set 48 V +1 04/06/24, 16:27

  11. core-ci voted on patch set 48 V +1 04/06/24, 16:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55446

  12. Garvin Hicking commented on patch set 48 04/06/24, 18:03

    (minor typos, couldn't commit myself due to the merge errors when checking out, so just as comments) Looking pretty good, hope to find some time to test it, but that'll probably be post-merge - thanks for this work!

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:46

    Maybe "Set-defined" to be more readable what "defined" attributes to?

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:59

    Dependencies

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:71

    Maybe use "(instead of loading...folder)" to make this injection more readable?

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:71

    specific

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:85

    specific
  13. Benni Mack commented on patch set 48 04/06/24, 21:27

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:23

    "after TypoScript provided by the site" is better to read IMHO

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:29

    "TypoScript dependencies can be included via set dependencies. This mechanism supersedes the previous static_file_include's or manual `@import` statements (they are still fine for local includes, but should be avoided for cross-set/extensions dependencies), as sets are automatically ordered and deduplicated." better: "TypoScript dependencies can be included via set dependencies. This mechanism is much more effective than the previous static_file_include's or manual `@import` statements (they are still fine for local includes, but should be avoided for cross-set/extensions dependencies), as sets are automatically ordered and deduplicated."

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:40

    overridden

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:46 Reply

    +1
  14. Benjamin Kott commented on patch set 48 04/06/24, 21:34

    SysTemplateTreeBuilder.php:250

    only .typoscript please kk thx
  15. Benjamin Franzke commented on patch set 48 04/06/24, 22:17

    SetRegistry.php:107

    drop (can be introduced later if really needed)
  16. Benjamin Franzke uploaded patch set 49 V +1 04/06/24, 23:40

  17. Benjamin Franzke commented on patch set 49 04/06/24, 23:40

    SetRegistry.php:107 Reply

    Done

    SysTemplateTreeBuilder.php:250 Reply

    Acknowledged

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:23 Reply

    Done

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:29 Reply

    Done

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:40 Reply

    Done

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:46 Reply

    Acknowledged

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:59 Reply

    Done

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:71 Reply

    We decided to drop the functionality as it can be achieved with `@import`.

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:71 Reply

    We decided to drop this functionality as it can be achieved with `@import`.

    Feature-103439-TypoScriptProviderForSitesAndSets.rst:85 Reply

    see above.
  18. core-ci voted on patch set 49 V -1 04/06/24, 23:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55456

  19. Benjamin Franzke uploaded patch set 50 V -1 04/06/24, 23:52

  20. core-ci voted on patch set 50 V +1 04/06/24, 23:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55459

  21. Benni Mack voted on patch set 50 CR +1 V +1 04/07/24, 07:03

  22. Benjamin Kott voted on patch set 50 CR +1 V +1 04/07/24, 08:30

  23. Benjamin Franzke voted on patch set 50 CR +2 V +2 04/07/24, 09:18

  24. Benjamin Franzke merged patch set 51 04/07/24, 09:18

  25. Christian Kuhn commented on patch set 51 04/07/24, 09:32

    TypoScriptFrontendInitialization.php:103 Unresolved

    that's not the intended use of this exception: the exception should only be created in pageInformationFactory->create() like above. a response should be returned here.