74315[!!!][TASK] Add native types to RootlineUtility
Commit message
Review
-
Code review CR +2 Done
- Georg Ringer +2
- Oliver Klee +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Georg Ringer +2
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 3
Files 1
Review log 1417
-
crell uploaded patch set 1 04/13/22, 19:27
-
core-ci voted on patch set 1 V +1 04/13/22, 19:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26003
-
Oliver Klee commented on patch set 1 04/14/22, 09:36
RootlineUtility.php:110We can remove these annotations.RootlineUtility.php:113Shouldn't $content be nullable then?RootlineUtility.php:170We can drop this line.RootlineUtility.php:356We can drop this line.RootlineUtility.php:375I suggest we int-cast both values to avoid !== failing in cases where one is a string and the other is an int. -
crell commented on patch set 1 04/14/22, 14:39
RootlineUtility.php:58ReplyAckRootlineUtility.php:110ReplyAckRootlineUtility.php:113ReplyAckRootlineUtility.php:170ReplyAckRootlineUtility.php:356ReplyAckRootlineUtility.php:375ReplyAck -
crell uploaded patch set 2 04/14/22, 14:39
-
core-ci voted on patch set 2 V +1 04/14/22, 14:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26025
-
Oliver Klee voted on patch set 2 CR +1 04/14/22, 15:06
-
Stefan Bürk commented on patch set 2 04/15/22, 09:26
RootlineUtility.php:199Do we really know that return array values are only string or int ? (Same for the other docblock annotations of this kind). -
crell commented on patch set 2 04/15/22, 23:12
RootlineUtility.php:199ReplyI don't know for sure. string|int is what PHPStan told me it needed to be, at least. It appears from the code like what's being returned is a database record, so it's technically possible the table could have a float field in it. I haven't run into one yet, though. Ideally we'd use an array shape annotation here, but I'm not sure what the full shape actually is. (Such is life with arrays.) -
Stefan Bürk commented on patch set 2 04/16/22, 08:59
RootlineUtility.php:199ReplyYou never will be able to add a fully array shape here. as the fields included are configuratble in instances. Which also means that added columns from non-core extension may be included at all. Suggest to change this to "string|float|int|null" as type, would this be fine with you ? -
crell uploaded patch set 3 04/18/22, 14:24
-
crell commented on patch set 2 04/18/22, 14:24
RootlineUtility.php:199ReplyOh for a `scalar` type in PHP... Done. -
Oliver Klee voted on patch set 3 CR +1 04/18/22, 14:25
-
core-ci voted on patch set 3 V +1 04/18/22, 14:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26154
-
Simon Schaufelberger voted on patch set 3 V +1 CR +1 04/20/22, 14:57
-
Georg Ringer voted on patch set 3 V +2 CR +2 04/21/22, 12:31
-
Georg Ringer merged patch set 4 04/21/22, 12:31
RootlineUtility.php:58