Deprecation: #104773 - Custom Fluid views and Extbase

See forge#104773

Description

These classes have been marked as deprecated in TYPO3 v13 and will be removed in v14:

  • \TYPO3\CMS\Fluid\View\StandaloneView
  • \TYPO3\CMS\Fluid\View\TemplateView
  • \TYPO3\CMS\Fluid\View\AbstractTemplateView
  • \TYPO3\CMS\Extbase\Mvc\View\ViewResolverInterface
  • \TYPO3\CMS\Extbase\Mvc\View\GenericViewResolver

This change is related to the general View refactoring.

Impact

Using one of the above classes triggers a deprecation level log entry.

Affected installations

Instances with extensions that create view instances of \StandaloneView or \TemplateView are affected. The extension scanner will find possible candidates.

Migration

Extensions should no longer directly instantiate own views, but should get \TYPO3\CMS\Core\View\ViewFactoryInterface injected and use create() to retrieve a view.

Within Extbase, ActionController->defaultViewObjectName should only be set to Extbase JsonView if needed, or not set at all. Custom view implementations should implement an own ViewFactoryInterface and configure controllers to inject an instance, or can set $this->defaultViewObjectName = JsonView::class in a custom __construct().