Deprecation: #104223 - Fluid standalone methods

See forge#104223

Description

Some methods in Fluid standalone v2 have been marked as deprecated:

  • \TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper->registerUniversalTagAttributes()
  • \TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper->registerTagAttribute()

Impact

Calling these methods is discouraged. They will log a deprecation level error when used with Fluid standalone v4.

Affected installations

Instances with extensions calling above methods.

Migration

registerUniversalTagAttributes()

Within tag based ViewHelpers, calls to registerUniversalTagAttributes() should be removed. This method has been marked as @deprecated with Fluid standalone 2.12, will log a deprecation level error with Fluid standalone v4, and will be removed with v5.

When removing the call, attributes registered by the call are now available in $this->additionalArguments, and no longer in $this->arguments. This may need adaption within single ViewHelpers, if they handle such attributes on their own. For example, the common ViewHelper f:image was affected within the TYPO3 Core. The following attributes may need attention when removing registerUniversalTagAttributes(): class, dir, id, lang, style, title, accesskey, tabindex, onclick.

registerTagAttribute()

Within tag based ViewHelpers, calls to registerTagAttribute() should be removed. This method has been marked as @deprecated with Fluid standalone 2.12, will log a deprecation level error with Fluid standalone v4, and will be removed with v5.

The call be often simply removed since arbitrary attributes not specifically registered are just added as-is by \TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper . This only needs attention if single view helpers deal with such attributes within the render() method: When removing the call, those arguments are no longer available in $this->arguments, but in $this->additionalArguments. Additional attention is needed with attributes registered with type boolean: Those usually have some handling within render(). To stay compatible, it can be helpful to not simply remove the registerTagAttribute() call, but to turn it into a call to registerArgument().