[TASK] Decouple TemplateService->getFileName
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Documentation / Changelog / master / Deprecation-85445-TemplateService-getFileName.rst
1 .. include:: ../../Includes.txt
2
3 ==================================================
4 Deprecation: #85445 - TemplateService->getFileName
5 ==================================================
6
7 See :issue:`85445`
8
9 Description
10 ===========
11
12 The PHP method :php:`TYPO3\CMS\Core\TypoScript\TemplateService->getFileName()` has been marked as deprecated, as
13 it is technically extracted into separate functionality with modern architecture throwing PHP Exceptions when
14 a file name is invalid.
15
16 Along with the method comes the public property :php:`$fileCache` which acted as a simple first-level
17 in-memory cache, its access is deprecated, too.
18
19
20 Impact
21 ======
22
23 Calling the method directly or accessing the public property will trigger a PHP deprecation message.
24
25
26 Affected Installations
27 ======================
28
29 Any TYPO3 installation dealing with PHP code in Frontend (e.g. `$TSFE->tmpl->getFileName()`).
30
31
32 Migration
33 =========
34
35 Use :php:`TYPO3\CMS\Frontend\Resource\FilePathSanitizer->sanitize($filePath)` instead.
36
37 .. index:: Frontend, PHP-API, FullyScanned