Deprecation: #94225 - f:be.container ViewHelper

See forge#94225

Description

The <f:be.container> ViewHelper has been deprecated.

This backend-module-related ViewHelper was pretty useless since it mostly provides the same functionality as <f:be.pageRenderer>, with the additional opportunity to render an empty doc header.

Impact

Using the ViewHelper in Fluid templates will trigger a PHP E_USER_DEPRECATED error.

Affected Installations

The limited functionality of the ViewHelper likely leads to little usage numbers. Searching extensions for the string html:<f:be.container> should reveal any usages.

Migration

When this ViewHelper is used to register additional backend module resources like CSS or JavaScript, <f:be.pageRenderer> can be used as drop-in replacement.

If the ViewHelper is used to additionally render an empty ModuleTemplate, this part should be moved to a controller instead. Simple example for an extbase controller:

$moduleTemplate->setContent($view->render());
return $this->htmlResponse($moduleTemplate->renderContent());

In case your controller does not extend ActionController, use the PSR-17 interfaces for generating the response:

$moduleTemplate->setContent($view->render());
return $this->responseFactory->createResponse()
    ->withHeader('Content-Type', 'text/html; charset=utf-8')
    ->withBody($this->streamFactory->createStream($moduleTemplate->renderContent());