[TASK] Decouple TemplateService->getFileName 03/57403/10
authorBenni Mack <benni@typo3.org>
Thu, 28 Jun 2018 07:22:46 +0000 (09:22 +0200)
committerBenni Mack <benni@typo3.org>
Mon, 2 Jul 2018 10:48:49 +0000 (12:48 +0200)
commit7199809b5582f8f4604f3b7dcb90796ee33a53a3
tree95aa3e0465457173636cdd04470b5ebe0f8aa9a6
parentbf5e298a9841e64cfec1835884904788f5995b83
[TASK] Decouple TemplateService->getFileName

TemplateService in TYPO3 frontend is responsible for
fetching sys_template records and sorting TypoScript
related things out, but also contains one method,
which is nowadays completely separate from
sys_template: "getFileName".

This method checks for valid syntax and returns
a proper string then (resolves "EXT:... syntax"
and valdiates against available paths).

The logic is frontend-related, thus moved
to EXT:frontend/FilePathSanitizer.

The old functionality in TemplateService is
deprecated, along with the public property "fileCache".

Resolves: #85445
Releases: master
Change-Id: Id52ef476d0cd6a67de2560a0e427339b7310427e
Reviewed-on: https://review.typo3.org/57403
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
14 files changed:
typo3/sysext/core/Classes/TypoScript/TemplateService.php
typo3/sysext/core/Documentation/Changelog/master/Deprecation-85445-TemplateService-getFileName.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/TypoScript/TemplateServiceTest.php
typo3/sysext/core/Tests/UnitDeprecated/TypoScript/TemplateServiceTest.php [new file with mode: 0644]
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/ContentObject/FileContentObject.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Imaging/GifBuilder.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php
typo3/sysext/frontend/Classes/Resource/FilePathSanitizer.php [new file with mode: 0644]
typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php
typo3/sysext/frontend/Tests/Unit/Resource/FilePathSanitizerTest.php [new file with mode: 0644]
typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php