Deprecation: #95139 - Extbase ControllerContext
See forge#95139
Description
The Extbase related class
\TYPO3\
has been used in the past to transfer data between Extbase controllers and Fluid
views. It has been superseded by class
\TYPO3\
with various preparation patches. To further decouple Fluid from Extbase, class
Controller
has been marked as deprecated.
Impact
Accessing
Controller
and consuming information carried in it has
been marked as deprecated. The class will be removed in TYPO3 v12. The object is bound
to various Fluid view related classes and all occurrences have been marked with
an
@deprecated
annotation.
To retain backwards compatibility, accessing
Controller
does not
actively trigger a PHP
E_
error in most cases, though.
Affected Installations
Instances with extensions that access
Controller
are affected. This
typically affects extensions which provide own view-helpers. The extension scanner
should find possible matches.
Migration
Two getters of the class have already been marked as deprecated with previous patches, namely
->get
as documented with
->get
. Classes
should inject instances of these objects instead, or should
make
them.
Method
get
is available in controllers directly, and view-helpers
receive the current request by calling
Rendering
.
Method
get
returns the Extbase
Arguments
created by the
Action
. The getter has become mostly useless within Fluid context
since argument validation of forms is abstracted differently since various core versions.
If that object construct is still needed, it should be transferred differently to
consuming classes, for instance by assigning it as variable to the view and accessing
it in a view-helper using the variable container. In many cases it should be sufficient
to directly work with the request object instead.