Review main Merged

72695[BUGFIX] Fix PHP 8 strict warning in Package MetaData

Helmut Hummel CR +2 V +2 Normal +73 −7 updated 12/18/21, 15:11

Commit message

A "type" does not need to be set in a composer.json,
so the checks for package type must account for the type
being null, to not trigger a warning in PHP 8

Review

  • Code review CR +2 Done
    • Helmut Hummel +2
    • Markus Klein +1
    • Simon Gilli +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Helmut Hummel +2
    • Markus Klein +1
    • Simon Gilli +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 2427

Show 2 earlier messages
  1. Helmut Hummel uploaded patch set 1 12/16/21, 15:03

  2. Simon Gilli voted on patch set 1 CR +1 12/16/21, 15:13

  1. core-ci voted on patch set 1 V +1 12/16/21, 15:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21188

  2. Simon Gilli voted on patch set 1 V +1 12/16/21, 15:35

  3. Simon Schaufelberger commented on patch set 1 12/16/21, 16:18

    MetaData.php:43

    is this valid doctype? I'm only aware of string|null. Where can I find the official docs of doctype header?
  4. Simon Schaufelberger commented on patch set 1 CR -1 12/16/21, 16:21

    MetaData.php:43 Reply

  5. Markus Klein commented on patch set 2 12/16/21, 21:55

    Published edit on patch set 1.
  6. Markus Klein commented on patch set 2 12/16/21, 21:55

    MetaData.php:43 Reply

    Yes, must be string|null
  7. Markus Klein voted on patch set 2 V +1 CR +1 12/16/21, 21:55

  8. core-ci voted on patch set 2 V +1 12/16/21, 22:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21197

  9. Helmut Hummel commented on patch set 2 12/17/21, 00:32

    MetaData.php:43 Reply

    It is a valid PHP type, how do you come to the assumption that PHP types are not allowed to be used in doc block? Yes, ?string is an alias of string|null but it does not make the first invalid.
  10. Markus Klein commented on patch set 2 12/17/21, 08:06

    MetaData.php:43 Reply

    My experience regarding this: - letting create phpstorm the docblock for a ?* type always creates it as *|null - doctrine annotator does not parse ?* correctly (extbase) Both can be seen as a deficiency of course.
  11. Simon Schaufelberger voted on patch set 2 CR +1 12/17/21, 09:01

  12. Oliver Klee voted on patch set 2 CR +1 12/17/21, 10:24

  13. Stefan Bürk commented on patch set 2 12/17/21, 14:18

    I'm a little bit puzzled. Regarind the commit message, I would assume that strict typings are used. But that's not the case at all, neighter before or after. I would assume that this patch introduce or sets php types for method arguments, return types or properties .. so I do not get this. And have no real fealing about it. Thought if i should drop a comment or not .. maybe some can help me to understand it.
  14. Helmut Hummel commented on patch set 2 12/17/21, 14:56

    MetaData.php:43 Reply

    I'm fine with string|null here. Was just wondering why this wouldn't work in a comment, but is a valid PHP type
  15. Helmut Hummel updated the commit message in patch set 3 12/17/21, 14:58

  16. Helmut Hummel commented on patch set 3 12/17/21, 14:59

    Reply

    Better?
  17. Markus Klein voted on patch set 3 V +1 CR +1 12/17/21, 14:59

  18. core-ci voted on patch set 3 V +1 12/17/21, 15:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21214

  19. Simon Gilli voted on patch set 3 V +1 CR +1 12/17/21, 15:33

  20. Stefan Bürk voted on patch set 3 V +1 CR +1 12/17/21, 15:44

  21. Helmut Hummel voted on patch set 3 V +2 CR +2 12/17/21, 15:58

  22. Helmut Hummel merged patch set 4 12/17/21, 15:58

  23. Simon Schaufelberger commented on patch set 4 12/17/21, 19:18

    MetaDataTest.php:53

    Helmut, you missed this one.
  24. Markus Klein commented on patch set 4 12/17/21, 20:19

    MetaDataTest.php:53 Reply

    Actually it was me changing this. So I missed it, yes.
  25. Helmut Hummel commented on patch set 4 12/18/21, 15:11

    MetaDataTest.php:53 Reply

    Ack