Deprecation: #104764 - Fluid TemplatePaths->fillDefaultsByPackageName

See forge#104764

Description

Method \TYPO3\CMS\Fluid\View\TemplatePaths->fillDefaultsByPackageName() has been marked as deprecated in TYPO3 v13 and will be removed in TYPO3 v14.

Fluid template paths should be set directly using the methods setTemplateRootPaths(), setLayoutRootPaths() and setPartialRootPaths(), or - even better - be handled by ViewFactoryInterface, which comes as new feature in TYPO3 v13.

See Feature: #104773 - Generic view factory for more details of the generic view interface.

Impact

Calling fillDefaultsByPackageName() triggers a deprecation level log level entry in TYPO3 v13 and will be removed in TYPO3 v14.

Affected installations

The method is relatively rarely used by extensions directly, a usage in Extbase ActionController has been refactored away. The extension scanner will find candidates.

Note class TemplatePaths is marked @internal and should not be used by extensions at all.

Migration

Use \TYPO3\CMS\Core\View\ViewFactoryInterface to create views with proper template paths instead. The TYPO3 system extensions come with plenty of examples on how to do this.