82510[TASK] Avoid TSFE getSite(), getLanguage(), pageArguments
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Stefan Bürk +1
- Nikita Hovratov +1
-
Verified V +2 Done
- Christian Kuhn +2
- Oliver Klee +1
- Stefan Bürk +1
- core-ci +1 CI
Issues 1
Files 14
- typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php+3 −18
- typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php+1 −4
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php+12 −6
- typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php+41 −65
- typo3/sysext/frontend/Classes/DataProcessing/MenuProcessor.php+1 −19
- typo3/sysext/frontend/Classes/Http/RequestHandler.php+4 −3
- typo3/sysext/frontend/Classes/Middleware/TypoScriptFrontendInitialization.php+3 −7
- typo3/sysext/frontend/Classes/Typolink/AbstractTypolinkBuilder.php+4 −15
- typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php+8 −21
- typo3/sysext/frontend/Tests/Functional/ContentObject/ContentContentObjectTest.php+1 −11
- typo3/sysext/frontend/Tests/Functional/ContentObject/ContentObjectRendererTest.php+2 −17
- typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php+24 −123
- typo3/sysext/frontend/Tests/Unit/Http/RequestHandlerTest.php+12 −8
- typo3/sysext/redirects/Classes/Service/RedirectService.php+2 −7
Review log 1725
-
Christian Kuhn uploaded patch set 1 01/18/24, 12:10
-
core-ci voted on patch set 1 V +1 01/18/24, 12:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51748
-
Christian Kuhn uploaded patch set 2
V +101/18/24, 13:23 -
core-ci voted on patch set 2 V +1 01/18/24, 13:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51757
-
Christian Kuhn uploaded patch set 3
V +101/18/24, 14:02 -
core-ci voted on patch set 3 V +1 01/18/24, 14:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51759
-
Christian Kuhn uploaded patch set 4
V +101/18/24, 15:01 -
core-ci voted on patch set 4 V +1 01/18/24, 15:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51765
-
Benjamin Franzke commented on patch set 4 01/18/24, 15:14
Maybe a general note/opionen: Let's not replace existing explicit method parameters types like `SiteInterface` or `Language` with our "attribute-bag" named `$request`. Yes, `$request` is our bag for stateful stuff (like `ContainerInterface` for services), but we should depend on concrete instances in API/code, where possible – makes such functions more scoped. I think I saw only one such case (a `SiteInterface` parameter) in this change, but as I don't exactly know what is coming up I just wanted to say that "early" enough ;) -
Christian Kuhn uploaded patch set 5
V +101/18/24, 16:19 -
core-ci voted on patch set 5 V -1 01/18/24, 16:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51769
-
Christian Kuhn uploaded patch set 6
V -101/18/24, 16:29 -
Christian Kuhn commented on patch set 6 01/18/24, 16:37
Reply
Yeah. Well. It depends. There are a couple of middlewares that check existance of attributes "must exist at this point" already. The added @todo's are a hint we should add more. The main issue is here that psr-7 allows 'null' return for attributes - a flaw in the spec that stems from earlier PHP versions and could be done much better nowadays. I think we should have more per-class get'ers that retrieve the request and return some non-null attribute, instead, which would clearify and harden request attribute dependencies. At the moment, we've already hardened a couple of these, but try to keep others as much as compatible as possible - for instance in the 'link builder' classes. We should harden further harden this and some @todos already point this out. -
core-ci voted on patch set 6 V +1 01/18/24, 16:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51770
-
Christian Kuhn commented on patch set 6 01/18/24, 16:42
Reply
Note especially everything around the 'link builder' structure is problematic in this area since those may or may not be called within FE scope with or without request. I have some other @todos that show this needs to be specified and cleared up early (in LinkFactory, which currently fetches the request from globals). This needs decisions that I delayed for now. And yes, this sucks and must be sorted out. -
Christian Kuhn uploaded patch set 7
V +101/18/24, 17:25 -
core-ci voted on patch set 7 V +1 01/18/24, 17:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51777
-
Christian Kuhn uploaded patch set 8
V +101/18/24, 17:34 -
core-ci voted on patch set 8 V +1 01/18/24, 17:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51779
-
Stefan Bürk voted on patch set 8 CR +1 01/18/24, 17:57
-
Stefan Bürk voted on patch set 8 V +1 01/18/24, 18:26
-
Oliver Klee voted on patch set 8 V +1 01/18/24, 22:07
-
Nikita Hovratov voted on patch set 8 CR +1 01/19/24, 10:15
-
Christian Kuhn voted on patch set 8 CR +2 V +2 01/19/24, 12:02
-
Christian Kuhn merged patch set 9 01/19/24, 12:02