75263[TASK] Address type issues in FileSearchQuery
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Oliver Klee +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Stefan Bürk +2
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 2
Review log 1822
-
crell uploaded patch set 1 07/22/22, 18:11
-
core-ci voted on patch set 1 V +1 07/22/22, 18:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29432
-
Guido Schmechel voted on patch set 1 CR +1 07/23/22, 13:22
-
Nikita Hovratov voted on patch set 1 V +1 CR +1 07/23/22, 15:07
-
Stefan Bürk updated the commit message in patch set 2 07/25/22, 20:31
-
Stefan Bürk commented on patch set 2 07/25/22, 20:35
I would say, this is main only and should be handled as breaking. This class is not internal, even if not explictly entitled ad Public API. However, some may extending from this class for custom addtions, which would be breaking for the typed properties than (eventually). Would you agree on that ? -
core-ci voted on patch set 2 V +1 07/25/22, 20:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29514
-
Oliver Klee commented on patch set 2 07/25/22, 21:33
FileSearchQuery.php:181I would really prefer to initialize all properties in the constructor or via default values. In the case of $this->result, this would mean to make the property nullable, and keep the null checks instead of converting them to isset checks. -
crell uploaded patch set 3 07/25/22, 22:21
-
crell commented on patch set 2 07/25/22, 22:21
Reply
The properties in this class are all private, so extending classes couldn't access them anyway. Even redefining the property in a child class only affects the child class, and in that case PHP does allow for the child class to add a type. We can mark it breaking if you want, but I don't see any way that it could break.FileSearchQuery.php:181ReplyDone -
core-ci voted on patch set 3 V -1 07/25/22, 23:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29525
-
Oliver Klee commented on patch set 3 CR -1 07/26/22, 09:30
FileSearchQuery.php:206This needs to be "!== null" or (preferably, as it's more explicit) "instanceof Result" -
crell uploaded patch set 4 07/26/22, 14:52
-
crell commented on patch set 3 07/26/22, 14:54
FileSearchQuery.php:206ReplyDone -
core-ci voted on patch set 4 V +1 07/26/22, 15:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29547
-
Oliver Klee voted on patch set 4 CR +1 07/26/22, 15:11
-
Benni Mack commented on patch set 4 07/27/22, 07:54
Reply
as the properties are private, I don't think that's a problem in terms of Extendability. Don't know if I would backport this though. -
crell commented on patch set 4 07/27/22, 14:32
Reply
I have no strong preference. I also don't see a real benefit to backporting, but also no real harm in this case. I'm good with whatever. -
Simon Schaufelberger commented on patch set 4 V +1 CR +1 07/29/22, 01:08
+1 for backporting to keep code in sync -
crell commented on patch set 4 07/29/22, 15:55
Reply
Done -
Stefan Bürk voted on patch set 4 V +2 CR +2 07/30/22, 18:12
-
Stefan Bürk merged patch set 5 07/30/22, 18:19