Review main Merged

85834[TASK] Avoid renderStatic() in ViewHelpers

Simon Praetorius CR +2 V +2 Expert +359 −771 updated 09/04/24, 18:28

Commit message

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

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Garvin Hicking +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 69

Show 49 more files

Review log 1422

  1. Simon Praetorius uploaded patch set 1 08/30/24, 18:54

  2. Simon Praetorius uploaded patch set 2 08/30/24, 18:56

  3. core-ci voted on patch set 1 V -1 08/30/24, 19:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64549

  4. core-ci voted on patch set 2 V -1 08/30/24, 19:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64550

  5. Simon Praetorius uploaded patch set 3 V -1 08/30/24, 19:26

  6. core-ci voted on patch set 3 V -1 08/30/24, 19:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64552

  7. Simon Praetorius uploaded patch set 4 V -1 08/30/24, 19:42

  8. core-ci voted on patch set 4 V -1 08/30/24, 20:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64553

  9. Simon Praetorius uploaded patch set 5 V -1 08/30/24, 20:44

  10. core-ci voted on patch set 5 V -1 08/30/24, 21:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64557

  11. Simon Praetorius rebased onto patch set 6 V -1 09/03/24, 15:29

  12. core-ci voted on patch set 6 V -1 09/03/24, 15:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64678

  13. core-ci commented on patch set 6 09/03/24, 16:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64678

  14. Simon Praetorius uploaded patch set 7 V -1 09/03/24, 16:10

  15. core-ci voted on patch set 7 V +1 09/03/24, 16:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64686

  16. Simon Praetorius marked it ready for review 09/03/24, 17:46

  17. Benni Mack voted on patch set 7 CR +1 09/04/24, 10:27

  18. Stefan Bürk voted on patch set 7 CR +1 09/04/24, 18:19

  19. Garvin Hicking commented on patch set 7 CR +1 V +1 09/04/24, 18:25

    I went through these three times in the past days so I feel pretty confident now. Thanks, especially for working out a rector rule!
  20. Stefan Bürk voted on patch set 7 V +1 09/04/24, 18:27

  21. Stefan Bürk voted on patch set 7 CR +2 V +2 09/04/24, 18:28

  22. Stefan Bürk merged patch set 8 09/04/24, 18:28