Review main Merged

85926[TASK] Avoid constructor argument of TemplatePaths

Simon Praetorius CR +2 V +2 Normal +46 −58 updated 09/09/24, 17:16

Commit message

A previous patch already avoided calls to the constructor
of `TemplatePaths`, which is deprecated if called with an
argument since Fluid v2.15. This follow-up covers remaining
places.

Furthermore, both usages of `GeneralUtility::makeInstance()`
are converted to `new` to harmonize the creation of those
objects in the Core. Now every occurrences use `new`.

`ksort()` is removed because this is done internally in
`TemplatePaths` setters. It was necessary before because
of the merging behavior of `extractPathArrays()`, which
is no longer used now (and is also deprecated in Fluid).

Review

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

Issues 2

Files 3

Review log 1317

  1. Simon Praetorius uploaded patch set 1 09/09/24, 13:28

  2. core-ci voted on patch set 1 V +1 09/09/24, 13:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65095

  3. Simon Praetorius uploaded patch set 2 V +1 09/09/24, 14:53

  4. core-ci voted on patch set 2 V -1 09/09/24, 14:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65104

  5. Benjamin Franzke commented on patch set 2 09/09/24, 15:19

    I do not understand what `makeInstance` has to do with fluid v4. I mean, it's fine to remove it, but it shouldn't matter for fluid v4? What's the win for fluid here? Is the fluid v4 branch available somewhere? I'd like to understand the reasons.
  6. Simon Praetorius commented on patch set 2 09/09/24, 16:25

    Reply

    Sorry about the confusion. I wanted to achieve two to three things at once and recognized it on the way. This patch should be WIP. 😊 To clarify: makeInstance() would work just fine. However, all other parts in the core that create `TemplatePaths` don't use it, so I'd suggest to harmonize this. The main problem is that the constructor argument is used here, which is deprecated.
  7. Simon Praetorius marked it work in progress 09/09/24, 16:25

  8. Simon Praetorius uploaded patch set 3 V -1 09/09/24, 16:48

  9. Simon Praetorius marked it ready for review 09/09/24, 16:49

  10. core-ci voted on patch set 3 V +1 09/09/24, 16:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65119

  11. Christian Kuhn uploaded patch set 4 V +1 09/09/24, 17:01

  12. Christian Kuhn commented on patch set 4 CR +1 V +1 09/09/24, 17:01

    Reply

    Done
  13. core-ci voted on patch set 4 V +1 09/09/24, 17:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65120

  14. Stefan Bürk voted on patch set 4 CR +1 09/09/24, 17:15

  15. Stefan Bürk voted on patch set 4 V +1 09/09/24, 17:15

  16. Simon Praetorius voted on patch set 4 CR +2 V +2 09/09/24, 17:16

  17. Simon Praetorius merged patch set 5 09/09/24, 17:16