Deprecation: #109280 - FormEngine TcaDescription fieldInformation
See forge#109280
Description
The
\TYPO3\ field
information render type has been deprecated. Field descriptions configured
via TCA
['columns'] are now rendered
automatically next to the field label by
\TYPO3\
and
\TYPO3\.
Previously, every FormEngine element and container registered
tca as a default field information node, which rendered the
description inside the element body. The description is now rendered
after the label or legend element, providing more consistent positioning
across all field types.
Additionally, the
$default property has been removed
from all Core FormEngine elements and containers. Custom elements that extend
Core elements and rely on tca being present in
$default are also affected.
Impact
Using the tca render type in a custom field
configuration will trigger a PHP
E_ level error. The
render type still exists but will return empty output during the deprecation
period, since descriptions are now rendered at the label level.
Custom FormEngine nodes that extend core elements and override
$default to include tca will still work,
but the tca entry will trigger a deprecation warning.
Affected installations
-
Installations with extensions that explicitly configure
tcaas a field information node in TCA:Description 'fieldInformation' => [ 'tcaDescription' => [ 'renderType' => 'tcaDescription', ], ],Copied! -
Custom FormEngine elements and containers that set
tcain theirDescription $defaultproperty:Field Information protected $defaultFieldInformation = [ 'tcaDescription' => [ 'renderType' => 'tcaDescription', ], ];Copied!
Extensions that only use the standard TCA description property are not
affected — descriptions will continue to be rendered.
Migration
Remove any explicit tca field information configuration from
TCA and from custom FormEngine node classes. Field descriptions are now
rendered automatically next to the label and no longer require a field
information node.
TCA configuration
'columns' => [
'my_field' => [
'label' => 'My field',
'description' => 'Help text for this field',
'config' => [
'type' => 'input',
- 'fieldInformation' => [
- 'tcaDescription' => [
- 'renderType' => 'tcaDescription',
- ],
- ],
],
],
],
Custom FormEngine nodes with defaultFieldInformation
If your custom element had a tca in
$default, remove the property entirely:
class MyCustomElement extends AbstractFormElement
{
- protected $defaultFieldInformation = [
- 'tcaDescription' => [
- 'renderType' => 'tcaDescription',
- ],
- ];
+ // tcaDescription is no longer needed; descriptions are
+ // rendered automatically next to the label.
}
If your custom element has other field information entries alongside
tca, remove only the tca entry:
class MyCustomElement extends AbstractFormElement
{
protected $defaultFieldInformation = [
- 'tcaDescription' => [
- 'renderType' => 'tcaDescription',
- ],
'myCustomInfo' => [
'renderType' => 'myCustomInfo',
],
];
}