Skip to content
Snippets Groups Projects
Commit b66635e0 authored by Simon Praetorius's avatar Simon Praetorius Committed by Stefan Bürk
Browse files

[TASK] Avoid renderStatic() in ViewHelpers

With Fluid v4, renderStatic() and the associated traits are deprecated.
ViewHelpers should use render() as their primary rendering method
from now on. [1]

Consequently we switch all ViewHelpers in the Core from renderStatic()
to render(). This has been done in this patch. The following steps
have been performed:

1. Use custom rector rule to perform changes (Patchset 1)

> git clone git@github.com:s2b/fluid-rector.git
> cd fluid-rector/
> composer install
> vendor/bin/rector process ../typo3/

2. Apply cgl fixes (Patchset 2)

> Build/Scripts/runTests.sh -s cglGit

3. Manually migrate phpstan annotations (Patchset 3, partially reverted in Patchset 5)

If `$arguments` is annotated in the ViewHelper class, that annotation
is removed (either right in Patchset 3 or later in Patchset 5).

4. Manually migrate ViewHelpers that are not covered by rector rule (Patchset 4)

[1] https://github.com/TYPO3/Fluid/commit/97aa45a6ed0fa3959cfa7d790077a4a5a9cef53f

Resolves: #104786
Releases: main
Change-Id: I503c3ba34d5926dd1e5818cd4114f0356bc68d89
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/85834


Reviewed-by: default avatarGarvin Hicking <gh@faktor-e.de>
Tested-by: default avatarGarvin Hicking <gh@faktor-e.de>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent 59b7da06
Branches
Tags
No related merge requests found
Showing
with 86 additions and 208 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment