[TASK] Avoid TSFE->contentPid, ->rootLine, ->page, ->id
This removes usages of those properties from TSFE that have been modeled as PageInformation object attached to the Request as attribute 'frontend.page.information' with #102715. The patch is relatively intrusive since especially TSFE->page and TSFE->id were frequently consumed properties. It however allows us to reduce dependencies to TSFE quite significantly, the number of calls to $GLOBALS['TSFE'] shrinks. It also shows that we still have a couple of constructs that need to get the Request hand over, in particular the data processors and more importantly the LinkFactory and link builders: Those tend to either get the Request using "parent" ContentObjectRenderer->getRequest() (that method should be declared protected later) or from $GLOBALS['TYPO3_REQUEST']. We accept this for now since using $GLOBALS['TYPO3_REQUEST'] is at least less worse than using $GLOBALS['TSFE']. A dedicated patch will resolve that situation later, though. Note most remaining use TSFE->config, especially TSFE->config['config']. To model this in a good way, we need a preparation within the TypoScript calculation in getFromCache(), which will be a target of one of the next patches. Resolves: #102824 Related: #102715 Releases: main Change-Id: I9336b4215155eb53422016254f8ef2edb0ee86cf Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82416 Reviewed-by:Benni Mack <benni@typo3.org> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/adminpanel/Classes/Controller/MainController.php 17 additions, 22 deletions...3/sysext/adminpanel/Classes/Controller/MainController.php
- typo3/sysext/adminpanel/Classes/Middleware/AdminPanelRenderer.php 9 additions, 6 deletions...sext/adminpanel/Classes/Middleware/AdminPanelRenderer.php
- typo3/sysext/adminpanel/Classes/Modules/Info/GeneralInformation.php 6 additions, 23 deletions...xt/adminpanel/Classes/Modules/Info/GeneralInformation.php
- typo3/sysext/core/Classes/ExpressionLanguage/FunctionsProvider/Typo3ConditionFunctionsProvider.php 4 additions, 0 deletions...age/FunctionsProvider/Typo3ConditionFunctionsProvider.php
- typo3/sysext/core/Classes/LinkHandling/TypoLinkCodecService.php 13 additions, 17 deletions...sysext/core/Classes/LinkHandling/TypoLinkCodecService.php
- typo3/sysext/core/Tests/Functional/ExpressionLanguage/ResolverTest.php 2 additions, 0 deletions...core/Tests/Functional/ExpressionLanguage/ResolverTest.php
- typo3/sysext/extbase/Classes/Core/Bootstrap.php 9 additions, 8 deletionstypo3/sysext/extbase/Classes/Core/Bootstrap.php
- typo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php 1 addition, 1 deletiontypo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php
- typo3/sysext/extbase/Tests/Unit/Mvc/Web/Routing/UriBuilderTest.php 22 additions, 11 deletions...ext/extbase/Tests/Unit/Mvc/Web/Routing/UriBuilderTest.php
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/FormViewHelperTest.php 5 additions, 4 deletions...fluid/Tests/Functional/ViewHelpers/FormViewHelperTest.php
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/ActionViewHelperTest.php 6 additions, 6 deletions...ests/Functional/ViewHelpers/Link/ActionViewHelperTest.php
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/PageViewHelperTest.php 6 additions, 6 deletions.../Tests/Functional/ViewHelpers/Link/PageViewHelperTest.php
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Transform/HtmlViewHelperTest.php 2 additions, 6 deletions...s/Functional/ViewHelpers/Transform/HtmlViewHelperTest.php
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Uri/ActionViewHelperTest.php 4 additions, 6 deletions...Tests/Functional/ViewHelpers/Uri/ActionViewHelperTest.php
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Uri/PageViewHelperTest.php 7 additions, 2 deletions...d/Tests/Functional/ViewHelpers/Uri/PageViewHelperTest.php
- typo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php 6 additions, 21 deletionstypo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php
- typo3/sysext/form/Tests/Functional/Domain/Runtime/FormRuntimeTest.php 0 additions, 8 deletions.../form/Tests/Functional/Domain/Runtime/FormRuntimeTest.php
- typo3/sysext/form/Tests/Functional/ViewHelpers/RenderFormValueViewHelperTest.php 1 addition, 15 deletions.../Functional/ViewHelpers/RenderFormValueViewHelperTest.php
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php 40 additions, 32 deletions.../frontend/Classes/ContentObject/ContentObjectRenderer.php
- typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php 18 additions, 20 deletions.../Classes/ContentObject/Menu/AbstractMenuContentObject.php
Please register or sign in to comment