Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation: #104223 - Fluid standalone methods #4334

Open
simonschaufi opened this issue Oct 15, 2024 · 0 comments
Open

Deprecation: #104223 - Fluid standalone methods #4334

simonschaufi opened this issue Oct 15, 2024 · 0 comments

Comments

@simonschaufi
Copy link
Collaborator

Deprecation: #104223 - Fluid standalone methods

https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/13.3/Deprecation-104223-FluidStandaloneMethods.html

Deprecation: #104223 - Fluid standalone methods

See 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().

Fluid, PHP-API, FullyScanned, ext:fluid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant