Review main Merged

28489[CLEANUP] Extbase persistence classes

Markus Klein CR +2 V +2 Expert +566 −538 updated 06/26/24, 11:57

Commit message

The classes contain wrong type hints and miss a lot of
checks whether the correct object is present.

Review

  • Code review CR +2
    • Markus Klein +2
    • Felix Oertel +2
    • Xavier Perseguers +1
  • Verified V +2
    • Markus Klein +2
    • Felix Oertel +2

Issues 1

Files 58

Show 38 more files

Review log 122

Show 97 earlier messages
  1. Markus Klein commented on patch set 1 03/18/14, 11:47

    Typo3DbBackend.php:291

    tab too much

    Typo3DbBackend.php:518

    type missing
  2. Markus Klein uploaded patch set 2 03/18/14, 11:49

  3. Markus Klein commented on patch set 1 03/18/14, 11:49

    Typo3DbBackend.php:291 Reply

    Done

    Typo3DbBackend.php:518 Reply

    Done
  4. Xavier Perseguers voted on patch set 2 CR +1 03/18/14, 11:52

  5. Mr. Jenkins commented on patch set 1 03/18/14, 12:14

  6. Mr. Jenkins commented on patch set 2 03/18/14, 12:25

  7. Andreas Kienast commented on patch set 2 V +1 CR +1 09/05/18, 18:49

    LogicalAnd.php:66

    Can we use "method_exists()" to make sure nothing breaks here then?

    LogicalNot.php:58

    Can we use "method_exists()" to make sure nothing breaks here then?

    LogicalOr.php:68

    Can we use "method_exists()" to make sure nothing breaks here then?
  8. Mr. Jenkins commented on patch set 3 09/05/18, 18:49

  9. Jigal van Hemert voted on patch set 3 CR +1 09/05/18, 18:49

  10. Xavier Perseguers voted on patch set 3 CR +1 09/05/18, 18:49

  11. Oliver Klee voted on patch set 3 CR +1 09/05/18, 18:49

  12. Wouter Wolters voted on patch set 3 V +1 CR +1 09/05/18, 18:49

  13. Alexander Stehlik commented on patch set 3 09/05/18, 18:49

    Query.php:421

    Would it not be easier to just add the typehint to the method argument? But this probably does not catch null values?
  14. Stefan Neufeind commented on patch set 3 2 comments 09/05/18, 18:49

  15. Felix Oertel commented on patch set 3 09/05/18, 18:49

    Query.php:576 Reply

    bool is correct.
  16. Stefan Neufeind commented on patch set 3 2 comments 09/05/18, 18:49

  17. Markus Klein commented on patch set 3 2 comments 09/05/18, 18:49

  18. Alexander Stehlik commented on patch set 3 2 comments 09/05/18, 18:49

  19. Markus Klein uploaded patch set 4 09/05/18, 18:49

  20. Xavier Perseguers voted on patch set 4 V +1 CR +1 09/05/18, 18:49

  21. Oliver Klee voted on patch set 4 CR +1 09/05/18, 18:49

  22. Mr. Jenkins commented on patch set 4 09/05/18, 18:49

  23. Markus Klein commented on patch set 4 V -1 1 comment 09/05/18, 18:49

    Damn it, this code is so broken.
  24. Markus Klein uploaded patch set 5 09/05/18, 18:49

  25. Mr. Jenkins commented on patch set 5 09/05/18, 18:49

  26. Markus Klein uploaded patch set 6 09/05/18, 18:49

  27. Mr. Jenkins commented on patch set 6 09/05/18, 18:49

  28. Alexander Stehlik commented on patch set 6 V -1 1 comment 09/05/18, 18:49

    I get an error for Joins. Argument 2 passed to TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser::parseComparison() must implement interface TYPO3\CMS\Extbase\Persistence\Generic\Qom\SelectorInterface, instance of TYPO3\CMS\Extbase\Persistence\Generic\Qom\Join
  29. Alexander Stehlik commented on patch set 6 09/05/18, 18:49

    When I switch back to SourceInterface it seems to work again.
  30. Markus Klein commented on patch set 6 1 comment 09/05/18, 18:49

  31. Markus Klein uploaded patch set 7 09/05/18, 18:49

  32. Mr. Jenkins commented on patch set 7 09/05/18, 18:49

  33. Alexander Stehlik commented on patch set 7 V +1 CR +1 1 comment 09/05/18, 18:49

    Seems to work now. Are there any functional test and if so did anybody run them?
  34. Alexander Stehlik uploaded patch set 8 09/05/18, 18:49

  35. Alexander Stehlik commented on patch set 8 V +1 CR +1 09/05/18, 18:49

    Rebased.
  36. Mr. Jenkins commented on patch set 8 09/05/18, 18:49

  37. Markus Klein uploaded patch set 9 09/05/18, 18:49

  38. Markus Klein commented on patch set 9 V +1 CR +1 09/05/18, 18:49

    had +1+1 by Alex, just pushed due to rebase
  39. Mr. Jenkins commented on patch set 9 09/05/18, 18:49

  40. Alexander Stehlik voted on patch set 9 V +1 CR +1 09/05/18, 18:49

  41. Markus Klein commented on patch set 9 V 0 CR 0 09/05/18, 18:49

    Removing my votes, as Alex voted again himself
  42. Stefan Neufeind voted on patch set 9 CR +1 09/05/18, 18:49

  43. Nicole Hummel commented on patch set 9 CR -1 09/05/18, 18:49

    Often instanceof checks are not done against the interfaces but the real classes. IMHO it is not necessary to perform checks against real classes

    Typo3DbQueryParser.php:146

    The instanceof check was done one line above. Why is the object forced to be a Comparision?
  44. Nicole Hummel uploaded patch set 10 09/05/18, 18:49

  45. Mr. Jenkins commented on patch set 10 09/05/18, 18:49

  46. Marc Bastian Heinrichs commented on patch set 10 CR -1 5 comments 09/05/18, 18:49

    stopped at persistence manager
  47. Marc Bastian Heinrichs commented on patch set 10 4 comments 09/05/18, 18:49

  48. Marc Bastian Heinrichs commented on patch set 10 1 comment 09/05/18, 18:49

  49. Markus Klein commented on patch set 10 V -1 CR -1 6 comments 09/05/18, 18:49

    A big NO!!!! Sorry to be a bit harsh now, but you didn't get the intention of this patch. It is all about calling functions on objects that a not guaranteed to be there. These methods are not part of the interfaces and are only implemented in the actual classes. So we need to check that. Easiest change would be to simply add them to the interfaces, but that would be a breaking change I fear. So I chose the path to add checks, were necessary.
  50. Markus Klein commented on patch set 10 09/05/18, 18:49

    Back to set 9 please.
  51. Markus Klein uploaded patch set 11 09/05/18, 18:49

  52. Markus Klein commented on patch set 11 09/05/18, 18:49

    Repushed set 9
  53. Mr. Jenkins commented on patch set 11 09/05/18, 18:49

  54. Marc Bastian Heinrichs commented on patch set 10 1 comment 09/05/18, 18:49

    Markus, calm down please. I got your point. For me it sounds better to add the required methods to the interfaces. Doing checks for the implementing classes would break the concept, that you could implement and register your own classes having the methods, and relying on the interfaces.
  55. Alexander Stehlik commented on patch set 11 09/05/18, 18:49

    +1 for adding the methods to the interfaces. The code breaks anyway when the required methods are not implemented in custom classes so in my opinion it is cleaner to break it by changing the interfaces and not my throwing an Exception when a method is missing.
  56. Tymoteusz Motylewski commented on patch set 11 1 comment 09/05/18, 18:49

  57. Markus Klein commented on patch set 11 09/05/18, 18:49

    @MaBa: I'm calm. (I not angry at all.) I just thought it would be good now to shout out a big stop, because the changes introduced, did not make sense in either direction. (And I noted, that my words may sound a bit harsh. ;-)) Ok concerning the change: I'd love to have clean interfaces here! But I am/was not able to decide such a change, even so short before release. So if you say it's ok to change the interfaces, I fully support that. My current cleanup is just a solution to tell people why they fail with their implementation here and there. Should I change the interfaces your will you do it?
  58. Marc Bastian Heinrichs voted on patch set 11 CR -1 2 comments 09/05/18, 18:49

  59. Alexander Stehlik uploaded patch set 12 09/05/18, 18:49

  60. Mr. Jenkins commented on patch set 12 09/05/18, 18:49

  61. Marc Bastian Heinrichs commented on patch set 12 CR -1 09/05/18, 18:49

    rebase only, right? see comments on patch set 11
  62. Alexander Stehlik commented on patch set 12 09/05/18, 18:49

    Correct. Sorry, this bloody dependency ;)
  63. Markus Klein uploaded patch set 13 09/05/18, 18:49

  64. Markus Klein commented on patch set 13 CR -1 2 comments 09/05/18, 18:49

    update comes along
  65. Markus Klein uploaded patch set 14 09/05/18, 18:49

  66. Mr. Jenkins commented on patch set 13 09/05/18, 18:49

  67. Markus Klein commented on patch set 14 CR -1 1 comment 09/05/18, 18:49

    waiting for more to come from Felix.
  68. Markus Klein uploaded patch set 15 09/05/18, 18:49

  69. Markus Klein uploaded patch set 16 09/05/18, 18:49

  70. Mr. Jenkins commented on patch set 14 09/05/18, 18:49

  71. Markus Klein uploaded patch set 17 09/05/18, 18:49

  72. Markus Klein uploaded patch set 18 09/05/18, 18:49

  73. Mr. Jenkins commented on patch set 15 09/05/18, 18:49

  74. Mr. Jenkins commented on patch set 16 09/05/18, 18:49

  75. Mr. Jenkins commented on patch set 17 09/05/18, 18:49

  76. Mr. Jenkins commented on patch set 18 09/05/18, 18:49

  77. Markus Klein uploaded patch set 19 09/05/18, 18:49

  78. Markus Klein uploaded patch set 20 09/05/18, 18:49

  79. Markus Klein uploaded patch set 21 09/05/18, 18:49

  80. Markus Klein rebased onto patch set 21 09/05/18, 18:49

  81. Mr. Jenkins commented on patch set 19 09/05/18, 18:49

  82. Mr. Jenkins commented on patch set 20 09/05/18, 18:49

  83. Markus Klein uploaded patch set 23 09/05/18, 18:49

  84. Oliver Klee commented on patch set 22 09/05/18, 18:49

    Markus, could you please mark this changeset as [WIP] as long as you don't consider it finished, i.e. as long as you keep pushing new versions every few minutes? This will keep people from reviewing versions that are finished yet (which would be a waste of time).
  85. Oliver Klee commented on patch set 23 09/05/18, 18:49

    are finished -> are not finished
  86. Markus Klein updated the commit message in patch set 23 09/05/18, 18:49

  87. Markus Klein commented on patch set 24 09/05/18, 18:49

    Sorry Oli!! Didn't realize you're around. We have heavy work going on. so expect at least one more patch set here.
  88. Oliver Klee commented on patch set 24 09/05/18, 18:49

    Okay. :-) Until then, could you please either mark the changeset as WIP, or post something like "ready for review" here?
  89. Mr. Jenkins commented on patch set 21 09/05/18, 18:49

  90. Markus Klein uploaded patch set 25 09/05/18, 18:49

  91. Mr. Jenkins commented on patch set 22 09/05/18, 18:49

  92. Markus Klein uploaded patch set 26 09/05/18, 18:49

  93. Markus Klein uploaded patch set 27 09/05/18, 18:49

  94. Mr. Jenkins commented on patch set 23 09/05/18, 18:49

  95. Mr. Jenkins commented on patch set 24 09/05/18, 18:49

  96. Markus Klein uploaded patch set 28 09/05/18, 18:49

  97. Markus Klein uploaded patch set 29 09/05/18, 18:49

  1. Markus Klein commented on patch set 29 CR -2 09/05/18, 18:49

    will go back to set 25 and add some improvements of the later patches.
  2. Mr. Jenkins commented on patch set 25 09/05/18, 18:49

  3. Mr. Jenkins commented on patch set 26 09/05/18, 18:49

  4. Mr. Jenkins commented on patch set 27 09/05/18, 18:49

  5. Mr. Jenkins commented on patch set 28 09/05/18, 18:49

  6. Markus Klein uploaded patch set 30 09/05/18, 18:49

  7. Markus Klein voted on patch set 30 CR 0 09/05/18, 18:49

  8. Mr. Jenkins commented on patch set 29 09/05/18, 18:49

  9. Markus Klein updated the commit message in patch set 30 09/05/18, 18:49

  10. Mr. Jenkins commented on patch set 30 09/05/18, 18:49

  11. Mr. Jenkins commented on patch set 31 09/05/18, 18:49

  12. Markus Klein uploaded patch set 32 09/05/18, 18:49

  13. Felix Oertel commented on patch set 31 2 comments 09/05/18, 18:49

    Just some small remarks
  14. Markus Klein uploaded patch set 33 09/05/18, 18:49

  15. Mr. Jenkins commented on patch set 32 09/05/18, 18:49

  16. Markus Klein uploaded patch set 34 09/05/18, 18:49

  17. Felix Oertel voted on patch set 34 V +2 CR +2 09/05/18, 18:49

  18. Mr. Jenkins commented on patch set 33 09/05/18, 18:49

  19. Mr. Jenkins commented on patch set 34 09/05/18, 18:49

  20. Markus Klein voted on patch set 34 V +2 CR +2 09/05/18, 18:49

  21. Markus Klein merged patch set 35 09/05/18, 18:49

  22. Andreas Kienast uploaded patch set 3 09/05/18, 18:49

  23. Andreas Kienast voted on patch set 4 CR +1 09/05/18, 18:49

  24. Andreas Kienast commented on patch set 6 3 comments 09/05/18, 18:49

  25. Xavier Perseguers commented on patch set 35 CR +1 06/26/24, 11:57

    Typo3DbBackend.php:518 Reply

    sounds like an array, could be then specified in signature