[TASK] Streamline TSconfig API 68/56968/7
authorChristian Kuhn <lolli@schwarzbu.ch>
Tue, 15 May 2018 12:25:27 +0000 (14:25 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 16 May 2018 09:37:36 +0000 (11:37 +0200)
commit45c582a8bf9f605478a93fc268c4063c1714c222
tree870ba2f5c2fe911b42dbb94da85b977dd9db5189
parent28b65ab86dd22e8f8cbc1b6ef368da56da147fd7
[TASK] Streamline TSconfig API

Final patch to de-mess the user / page TSconfig related API.

Page TSconfig can be overriden in user TSconfig by prefixing the
path with 'page.' in user TSconfig. However, method
BackendUtility::getModTSconfig() violated this principle and
had a special merge strategy that allowed ommitting the 'page.'
prefix. This has been marked as deprecated in the TSconfig docs for
various years and has been lately removed in the docs altogether,
but the code still existed.
The patch moves this merge into BackendUtility::getPagesTSconfig()
and properly deprecates this case. Usages of getModTSconfig() are
changed to use getPagesTSconfig() directly, dropping the artificial
'properties' and 'value' sub arrays and omitting some rather expensive
string operations at the same time.
This obsoletes getModTSconfig() and a couple of related methods.

Additionally, BackendUserAuthentication->getTSConfig() has been
abused frequently to operate on different arrays than it's own userTS.
Those usages are dropped with the patch. Handing over arguments to
getTSConfig() is now deprecated, effectively reducing the method a getter.

This reduces the API down to BackendUtility::getPagesTSconfig($pid)
and BackendUserAuhtentiction->getTSConfig() both just returning the
entire array. This simplified API can now be documented in the docs.

Change-Id: I4bbb066c1d4e2edbc0182f7967897a1558cc3c0d
Resolves: #85016
Related: #84982
Releases: master
Reviewed-on: https://review.typo3.org/56968
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
44 files changed:
typo3/sysext/adminpanel/Classes/Service/EditToolbarService.php
typo3/sysext/backend/Classes/Configuration/TranslationConfigurationProvider.php
typo3/sysext/backend/Classes/ContextMenu/ItemProviders/RecordProvider.php
typo3/sysext/backend/Classes/Controller/ContentElement/MoveElementController.php
typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/NewRecordController.php
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/Module/BaseScriptClass.php
typo3/sysext/backend/Classes/Tree/View/PagePositionMap.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/View/BackendLayoutView.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php
typo3/sysext/backend/Tests/Unit/Utility/Fixtures/BackendUtilityFixture.php [deleted file]
typo3/sysext/backend/Tests/UnitDeprecated/Utility/BackendUtilityTest.php [new file with mode: 0644]
typo3/sysext/backend/Tests/UnitDeprecated/Utility/Fixtures/BackendUtilityFixture.php [new file with mode: 0644]
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/Classes/Configuration/Richtext.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php
typo3/sysext/core/Documentation/Changelog/master/Deprecation-84993-DeprecateSomeTSconfigRelatedMethods.rst
typo3/sysext/core/Documentation/Changelog/master/Deprecation-85016-OverridingPageTSconfigModWithUserTSconfigModDeprecated.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Authentication/BackendUserAuthenticationTest.php
typo3/sysext/core/Tests/UnitDeprecated/Authentication/BackendUserAuthenticationTest.php [new file with mode: 0644]
typo3/sysext/filelist/Classes/Configuration/ThumbnailConfiguration.php
typo3/sysext/filelist/Classes/FileList.php
typo3/sysext/info/Classes/Controller/InfoPageTyposcriptConfigController.php
typo3/sysext/info/Classes/Controller/PageInformationController.php
typo3/sysext/info/Classes/Controller/TranslationStatusController.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodArgumentDroppedMatcher.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyProtectedMatcher.php
typo3/sysext/linkvalidator/Classes/Report/LinkValidatorReport.php
typo3/sysext/linkvalidator/Classes/Task/ValidatorTask.php
typo3/sysext/recordlist/Classes/Browser/FileBrowser.php
typo3/sysext/recordlist/Classes/Controller/RecordListController.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/recycler/Classes/Controller/RecyclerAjaxController.php
typo3/sysext/t3editor/Resources/Public/JavaScript/Mode/typoscript/typoscript.js
typo3/sysext/taskcenter/Classes/Controller/TaskModuleController.php
typo3/sysext/viewpage/Classes/Controller/ViewModuleController.php
typo3/sysext/workspaces/Classes/Controller/PreviewController.php