Review main Merged Breaking

74315[!!!][TASK] Add native types to RootlineUtility

crell CR +2 V +2 Normal +48 −99 updated 04/21/22, 12:31

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

  1. crell uploaded patch set 1 04/13/22, 19:27

  2. 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

  3. Oliver Klee commented on patch set 1 04/14/22, 09:36

    RootlineUtility.php:58

    This annotation can go away, too.

    RootlineUtility.php:110

    We can remove these annotations.

    RootlineUtility.php:113

    Shouldn't $content be nullable then?

    RootlineUtility.php:170

    We can drop this line.

    RootlineUtility.php:356

    We can drop this line.

    RootlineUtility.php:375

    I suggest we int-cast both values to avoid !== failing in cases where one is a string and the other is an int.
  4. crell commented on patch set 1 04/14/22, 14:39

    RootlineUtility.php:58 Reply

    Ack

    RootlineUtility.php:110 Reply

    Ack

    RootlineUtility.php:113 Reply

    Ack

    RootlineUtility.php:170 Reply

    Ack

    RootlineUtility.php:356 Reply

    Ack

    RootlineUtility.php:375 Reply

    Ack
  5. crell uploaded patch set 2 04/14/22, 14:39

  6. 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

  7. Oliver Klee voted on patch set 2 CR +1 04/14/22, 15:06

  8. Stefan Bürk commented on patch set 2 04/15/22, 09:26

    RootlineUtility.php:199

    Do we really know that return array values are only string or int ? (Same for the other docblock annotations of this kind).
  9. crell commented on patch set 2 04/15/22, 23:12

    RootlineUtility.php:199 Reply

    I 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.)
  10. Stefan Bürk commented on patch set 2 04/16/22, 08:59

    RootlineUtility.php:199 Reply

    You 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 ?
  11. crell uploaded patch set 3 04/18/22, 14:24

  12. crell commented on patch set 2 04/18/22, 14:24

    RootlineUtility.php:199 Reply

    Oh for a `scalar` type in PHP... Done.
  13. Oliver Klee voted on patch set 3 CR +1 04/18/22, 14:25

  14. 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

  15. Simon Schaufelberger voted on patch set 3 V +1 CR +1 04/20/22, 14:57

  16. Georg Ringer voted on patch set 3 V +2 CR +2 04/21/22, 12:31

  17. Georg Ringer merged patch set 4 04/21/22, 12:31