Review main Merged

74829[BUGFIX] Provide a default value in TemplateService to avoid null values

crell CR +2 V +2 Easy +2 −9 updated 06/19/22, 01:25

Commit message

Review

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

Issues 1

Files 3

Review log 1216

  1. crell uploaded patch set 1 06/07/22, 22:56

  2. core-ci voted on patch set 1 V +1 06/07/22, 23:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27785

  3. crell uploaded patch set 2 06/09/22, 23:22

  4. core-ci voted on patch set 2 V +1 06/09/22, 23:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27902

  5. Oli Bartsch commented on patch set 2 06/10/22, 11:48

    ExtendedTemplateService.php:725

    So this might now lead to a TypeError in case $absoluteRootLine gets a non-array value assigned, which is possible by calling runThroughTemplates() with the first parameter being no array, as this is not enforced by a type hint.
  6. crell commented on patch set 2 06/10/22, 15:47

    ExtendedTemplateService.php:725 Reply

    Easy enough to fix by typing either the property, the parameter, or both, but I wasn't sure if that was worth it if not doing the rest of the class. And with @loli overhauling the class I didn't think that was worth the effort right now. The docblocks already say everything must be an array, so passing a non-array is already a bug in the calling code. In which case, a TypeError here would be correct, if a bit later than ideal. I think it's fine as is, but I'm also open to typing just the one property to really lock it down. Would that work for you?
  7. Oli Bartsch commented on patch set 2 06/10/22, 15:55

    ExtendedTemplateService.php:725 Reply

    Yes, this would make sense.
  8. crell uploaded patch set 3 06/10/22, 16:26

  9. crell commented on patch set 2 06/10/22, 16:26

    ExtendedTemplateService.php:725 Reply

    Done
  10. core-ci voted on patch set 3 V -1 06/10/22, 16:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27936

  11. core-ci voted on patch set 3 V +1 06/10/22, 16:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27936

  12. Simon Schaufelberger voted on patch set 3 V +1 CR +1 06/10/22, 17:20

  13. Oliver Klee voted on patch set 3 CR +1 06/10/22, 17:28

  14. Christian Kuhn voted on patch set 3 V +1 CR +1 06/19/22, 01:24

  15. Stefan Bürk voted on patch set 3 V +2 CR +2 06/19/22, 01:25

  16. Stefan Bürk merged patch set 4 06/19/22, 01:25