91246[TASK] Merge FE init and preparation middlewares
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Stefan Bürk +1
- Benni Mack +1
-
Verified V +2 Done
- Christian Kuhn +2
- Stefan Bürk +1
- Benni Mack +1
- core-ci +1 CI
Issues 2
Files 8
- typo3/sysext/core/Documentation/Changelog/14.0/Breaking-107831-AfterCachedPageIsPersistedEventNoLongerReceivesTypoScriptFrontendController.rst+1 −1
- typo3/sysext/core/Documentation/Changelog/14.0/Breaking-107831-RemovedTypoScriptFrontendController.rst+2 −2
- typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php+78 −24
- typo3/sysext/frontend/Classes/Middleware/TypoScriptFrontendInitialization.phpdeleted+0 −121
- typo3/sysext/frontend/Classes/Page/PageInformationFactory.php+35 −1
- typo3/sysext/frontend/Classes/Page/PageParts.php+3 −4
- typo3/sysext/frontend/Configuration/RequestMiddlewares.php+8 −15
- typo3/sysext/frontend/Tests/Functional/Middleware/PrepareTypoScriptFrontendRenderingTest.phprenamed+1 −1
Review log 1827
Show 12 earlier messages
-
Christian Kuhn uploaded patch set 1 10/24/25, 23:52
-
core-ci voted on patch set 1 V -1 10/25/25, 00:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87534
-
Christian Kuhn uploaded patch set 2
V -110/25/25, 00:27 -
core-ci voted on patch set 2 V +1 10/25/25, 00:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87536
-
Christian Kuhn uploaded patch set 3
V +110/25/25, 00:44 -
Christian Kuhn updated the commit message in patch set 4 10/25/25, 00:48
-
core-ci voted on patch set 3 V +1 10/25/25, 00:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87537
-
Christian Kuhn uploaded patch set 5 10/25/25, 00:53
-
Christian Kuhn updated the commit message in patch set 6 10/25/25, 00:54
-
core-ci voted on patch set 4 V +1 10/25/25, 00:56 Copied votes on follow-up patch sets have been updated: * Verified+1 has been copied to patch set 5 (copy condition: "changekind:NO_CHANGE"). Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87538
-
Christian Kuhn updated the commit message in patch set 7 10/25/25, 00:59
-
core-ci voted on patch set 5 V +1 10/25/25, 01:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87539
-
core-ci voted on patch set 6 V +1 10/25/25, 01:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87540
-
core-ci voted on patch set 7 V +1 10/25/25, 01:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87541
-
Garvin Hicking commented on patch set 7 10/25/25, 04:16
I think we need an Important.tst file that mentions the removed tsfe middleware key. the other was noted as internal, and at least I referenced the tsfe key for that in customer inplementations - and I've seen other agency code also reference it. Or better, could we have an alias? Otherwise I winder middleware stacks would be messed up. -
Oliver Klee updated the commit message in patch set 8
V +110/25/25, 07:41 -
core-ci voted on patch set 8 V +1 10/25/25, 07:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87563
-
Christian Kuhn commented on patch set 8 10/25/25, 10:30
Reply
there are 6 reasons to *not* document the removal of typo3/cms-frontend/tsfe and i mentioned them all already: * the key has this comment: "/** internal: do not use or reference this middleware in your own code, as this will be possibly be removed */" * the class is marked @internal * it does not make much technical sense to reference this key, but rather "typo3/cms-frontend/prepare-tsfe-rendering" if really required * if this key is still used in 'before' or 'after', dependencyResolver does not explode but uses other order constraints and falls back to "natural" order. great chances nothing explodes when a "later in load order extension" adds a middleware. * searching TER revealed various middleware configs referencing "prepare-tsfe-rendering" and not "tsfe". when we continue to always ignore our internal annotations by still documenting changes on them, we could give up on doing them and are back to "everything is API". in this case, i'm of the opinion to say we really have enough reasons to *not* document this internal change this time. -
Christian Kuhn uploaded patch set 9
V +110/25/25, 10:41 -
core-ci voted on patch set 9 V +1 10/25/25, 10:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87569
-
Garvin Hicking commented on patch set 9 10/25/25, 11:38
Reply
My main point was that the Core's middleware identifiers are really hard to sort own extensions into, and I think we are missing an "official" entry point to be able to do something BEFORE or AFTER TSFE init. Sadly I was sure that the 'typo3/cms-frontend/tsfe' did not have the internal notation, but of course you're right that it did, too. How about to find a middle ground, we add a sentence to for example `typo3/sysext/core/Documentation/Changelog/14.0/Breaking-107831-RemovedTypoScriptFrontendController.rst` like: ``` .. note:: Due to the changes in TSFE, also the PSR request middlewares that are annotated as 'internal' received changes. Please ensure your middleware is now properly sorted and try to use ones not annotated as 'internal' to be safe. ``` That would be all I "need". We could also do that in the "final mop-up" of the TSFE changes, I believe you said there'll be a more detailed BC RST file for it. So I leave this comment here resolved. I do follow your stance, and generally think we should not need to document internal BC changes, unless: - There is widespread use of it - We offer no "non-internal" proper API and force users to use internal stuff, and then should document these BCs in at least an Important.rst Ideally if we get aware of this, we should try to introduce public API to achieve what is needed. And I think everyone is trying hard to do that, so this should be exemptions to the rule only. -
Stefan Bürk commented on patch set 9 10/25/25, 13:31
Reply
I don't think we need to take action here in any form. The middleware are marked as `@internal` and therefore already states that you have to take care if something changes (on patchlevel basis) and put proper verification in place if you deal with them. The most use-full and used middleware is the `typo3/cms-frontend/prepare-tsfe-rendering` middleware to use it to do extbase stuff after it and if that one would have been removed I would follow to have a "breaking" or a "important" for it due the casual practice for this - basicially on the huge usage. If a middleware should be before that, it should have stated both internal middlewares alreads in the *before* block and not only a single one - not doing so is than a oversight of the developer dealing/referencing to internal things. And that something which could and should be expected. The point about internal stuff is, that it explodes if you deal with it in a incorrect way and do not take care on (patchlevel) updates to verifify if it is still working. And that is the way `@internal` is working. -
Benni Mack commented on patch set 9 10/26/25, 14:27
Reply
The point of an Important is for all who actually used them so they "know". However, as the one who split this up in v9 initially (marking them internal for a reason - that they will fall together eventually), this one is one of the few exceptions, but the other way around: was especially used to be hooked in before, "typo3/cms-frontend/tsfe" was different. It'd be actually better to let these extensions fail hard (runtime exception) if they reference this name, as it was used in the wild (in at least 5 instances i've seen), and they should just change it. So I propose ONE of the following: a) let the middleware resolver fail hard if there is a reference to "typo3/cms-frontend/tsfe" b) create an Important RST c) Remove the middleware "typo3/cms-frontend/prepare-tsfe-rendering" and not "typo3/cms-frontend/tsfe" d) Remove both middleware identifiers and use a new one such as "typo3/cms-frontend/typoscript-based-page-rendering" -
Benni Mack commented on patch set 9 CR +1 V +1 10/26/25, 18:34
Reply
Just started drafting an Important.RST... however I'd like to juggle and finalize the middleware order (we still have some conceptual problems in the preview rendering) - so let's add this as one Important RST about frontend middlewares separately. -
Stefan Bürk voted on patch set 9 CR +1 V +1 10/27/25, 08:47
-
Christian Kuhn voted on patch set 9 CR +2 V +2 10/27/25, 11:18
-
Christian Kuhn merged patch set 10 10/27/25, 11:18