---
title: "Deprecation: #85445 - TemplateService->getFileName"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:deprecation-85445"
source: "Changelog/9.4/Deprecation-85445-TemplateService-getFileName.rst"
modified: "2026-09-14T09:47:36+00:00"
---

# Deprecation: #85445 - TemplateService->getFileName

See [forge#85445](https://forge.typo3.org/issues/85445)

## Description

The PHP method `TYPO3\CMS\Core\TypoScript\TemplateService->getFileName()` has been marked as deprecated, as
it is technically extracted into separate functionality with modern architecture throwing PHP Exceptions when
a file name is invalid.

Along with the method the public property `$fileCache` has been marked as deprecated, which acted as a simple first-level
in-memory cache.

## Impact

Calling the method directly or accessing the public property will trigger a PHP `E_USER_DEPRECATED` error.

## Affected Installations

Any TYPO3 installation dealing with PHP code in Frontend (e.g. `$TSFE->tmpl->getFileName()`).

## Migration

Use `TYPO3\CMS\Frontend\Resource\FilePathSanitizer->sanitize($filePath)` instead.
