Review main Merged

74344[BUGFIX] Fix type warnings in the workspaces DataHandlerHook

Oliver Klee CR +2 V +2 Easy +7 −12 updated 11/07/22, 14:42

Commit message

Used command:

> Build/Scripts/runTests.sh -s phpstanGenerateBaseline

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1

Issues 1

Files 2

Review log 1924

  1. Oliver Klee uploaded patch set 1 04/18/22, 13:54

  2. Benni Mack voted on patch set 1 CR +1 04/18/22, 13:57

  3. core-ci voted on patch set 1 V +1 04/18/22, 14:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26147

  4. Stefan Bürk commented on patch set 1 04/18/22, 14:48

    DataHandlerHook.php:88

    Would not match DataHandler - and in the end not ensured. Ok, it's only a docblock. But I think it should be changed/ensured from the beginning - and not from the end. In the end, the method do not check if it is really an array.

    DataHandlerHook.php:1087

    I think this should be 'string|int'.
  5. Oliver Klee commented on patch set 1 04/18/22, 16:19

    DataHandlerHook.php:88 Reply

    In lines 99 ff., $value is accessed via array keys. So it needs to be an array here (or something implementing ArrayAccess) in order to not crash. How should we proceed here? Use mixed as type and throw an error if $value is no array?

    DataHandlerHook.php:1087 Reply

    If I read lines 910-924 correctly, $liveData['uid'] is passed, which should be an int (or a int-like string). Am I reading this correctly? And should I add a cast there to make sure that an int gets passed to updateInlineForeignFieldSorting?
  6. Oliver Klee marked it work in progress 04/20/22, 12:28

  7. Simon Schaufelberger uploaded patch set 2 09/22/22, 00:01

  8. Simon Schaufelberger rebased onto patch set 3 09/22/22, 00:02

  9. core-ci voted on patch set 2 V +1 09/22/22, 00:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31400

  10. core-ci voted on patch set 3 V +1 09/22/22, 00:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31401

  11. Benni Mack uploaded patch set 4 11/05/22, 21:23

  12. Benni Mack commented on patch set 4 CR +1 11/05/22, 21:23

    patch looks OK to me
  13. core-ci voted on patch set 4 V +1 11/05/22, 21:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33155

  14. Oliver Klee marked it ready for review 11/06/22, 11:24

  15. Christian Kuhn commented on patch set 4 V +1 CR +1 11/07/22, 14:33

    DataHandlerHook.php:88 Reply

    param type hint array should be fine here.
  16. Christian Kuhn commented on patch set 4 11/07/22, 14:34

    imho fine, but let's skip v11
  17. Christian Kuhn commented on patch set 4 11/07/22, 14:34

    DataHandlerHook.php:1087 Reply

    int is ok here.
  18. Christian Kuhn updated the commit message in patch set 5 11/07/22, 14:34

  19. Christian Kuhn voted on patch set 5 V +1 CR +1 11/07/22, 14:34

  20. Stefan Bürk voted on patch set 5 V +2 CR +2 11/07/22, 14:35

  21. Stefan Bürk voted on patch set 5 V +1 CR +1 11/07/22, 14:35

  22. Stefan Bürk voted on patch set 5 V +2 CR +2 11/07/22, 14:41

  23. Stefan Bürk merged patch set 6 11/07/22, 14:41

  24. core-ci voted on patch set 5 V +1 11/07/22, 14:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33213