Review main Merged

72741[TASK] Modernize ViewHelper classes

Christian Kuhn CR +2 V +2 Expert +707 −1647 updated 12/20/21, 20:22

Commit message

The patch makes the bulk of ViewHelper classes more
strict and applies some general love. Some ViewHelpers
have been left, those will see bigger refactorings
soon. All affected classes are final, the changes are
(hopefully) non-breaking.

* declare(strict_types=1) if missing.
* Use self:: instead of static:: since all VH's
  are final, so there is not point in using late
  static binding.
* Return and argument type hints where possible and
  reduction of methods doc annotations which are
  covered by PHP method signatures.
* Add types to some class properties.
* Protect some detail methods that were apparently
  public by accident. This is not considered breaking.
* Avoid extbase LocalizationUtility::translate() in
  favor of core LanguageService.
* Avoid static class state, especially with TSFE.
* Minor comment fixes.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 2

Files 115

Show 95 more files

Review log 1420

  1. Christian Kuhn uploaded patch set 1 12/20/21, 14:38

  2. Christian Kuhn uploaded patch set 2 12/20/21, 14:41

  3. core-ci voted on patch set 1 V +1 12/20/21, 14:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21293

  4. core-ci voted on patch set 2 V +1 12/20/21, 14:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21294

  5. Christian Kuhn uploaded patch set 3 12/20/21, 15:11

  6. core-ci voted on patch set 3 V +1 12/20/21, 15:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21298

  7. Andreas Kienast commented on patch set 3 CR -1 12/20/21, 16:18

    on it

    CObjectViewHelper.php:238

    : void
  8. Andreas Kienast uploaded patch set 4 12/20/21, 16:35

  9. Christian Kuhn commented on patch set 4 12/20/21, 16:36

    CObjectViewHelper.php:238 Reply

    Done
  10. core-ci voted on patch set 4 V +1 12/20/21, 16:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21311

  11. Andreas Kienast commented on patch set 4 V +1 CR +1 12/20/21, 16:51

    Clicking around didn't break anything so far.
  12. Christian Kuhn commented on patch set 4 CR -1 12/20/21, 16:51

    i'll review in detail again - especially argument casting needs to be ok with VH's where we added strict_types=1 to prevent regressions.
  13. Christian Kuhn uploaded patch set 5 12/20/21, 19:57

  14. core-ci voted on patch set 5 V -1 12/20/21, 20:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21315

  15. Christian Kuhn uploaded patch set 6 12/20/21, 20:00

  16. Stefan Bürk voted on patch set 6 V +1 CR +1 12/20/21, 20:19

  17. Andreas Kienast voted on patch set 6 V +1 CR +1 12/20/21, 20:20

  18. core-ci voted on patch set 6 V +1 12/20/21, 20:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21316

  19. Christian Kuhn voted on patch set 6 V +2 CR +2 12/20/21, 20:22

  20. Christian Kuhn merged patch set 7 12/20/21, 20:22