Review main Merged

80084[TASK] Introduce type declarations in StorageRepository

Alexander Schnitzler CR +2 V +2 Normal +39 −58 updated 07/23/23, 07:17

Commit message

Type declarations have been introduced for properties and
methods. In addition, PHPStan-specific PHPDoc annotations
have been introduced to give PHPStan more insights.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1926

Show 1 earlier messages
  1. Alexander Schnitzler uploaded patch set 1 07/18/23, 14:58

  1. core-ci voted on patch set 1 V -1 07/18/23, 15:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44266

  2. Alexander Schnitzler uploaded patch set 2 V -1 07/18/23, 15:50

  3. core-ci voted on patch set 2 V +1 07/18/23, 15:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44270

  4. Alexander Schnitzler updated the commit message in patch set 3 V +1 07/20/23, 06:42

  5. Alexander Schnitzler marked it ready for review 07/20/23, 06:42

  6. Alexander Schnitzler wrote 07/20/23, 06:42

    Topic set to FAL
  7. core-ci voted on patch set 3 V +1 07/20/23, 06:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44329

  8. Oliver Klee updated the commit message in patch set 4 V +1 07/20/23, 07:58

  9. Oliver Klee commented on patch set 4 07/20/23, 08:01

    StorageRepository.php:229

    Can we say more about the return value? (My guest would be `positive-int`.)

    StorageRepository.php:316

    We can remove this check now (and the corresponding `@throws` annotation).

    StorageRepository.php:369

    `@return int<0, max>`, I'd guess.
  10. core-ci voted on patch set 4 V +1 07/20/23, 08:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44331

  11. Alexander Schnitzler uploaded patch set 5 V +1 07/20/23, 08:13

  12. Alexander Schnitzler uploaded patch set 6 07/20/23, 08:15

  13. Alexander Schnitzler commented on patch set 6 07/20/23, 08:16

    StorageRepository.php:229 Reply

    Nope, lastInsertId might return a falsy value.

    StorageRepository.php:316 Reply

    Done

    StorageRepository.php:369 Reply

    Done
  14. Oliver Klee voted on patch set 6 CR +1 07/20/23, 08:17

  15. core-ci voted on patch set 5 V +1 07/20/23, 08:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44333

  16. core-ci voted on patch set 6 V +1 07/20/23, 08:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44334

  17. Oliver Klee voted on patch set 6 V +1 07/20/23, 08:28

  18. Oliver Klee commented on patch set 7 CR +1 V +1 07/20/23, 08:32

    Published edit on patch set 6.
  19. Oliver Klee voted on patch set 7 V +1 CR +1 07/20/23, 08:32

  20. core-ci voted on patch set 7 V +1 07/20/23, 08:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44335

  21. Stefan Bürk commented on patch set 7 07/21/23, 21:30

    StorageRepository.php:37

    This class neither final nor marked as @internal. I would tend to say that we should consider this class kind of public api which may be extended and used. Therefore, at least the added property type-hint would be "breaking" following casual breaking patch policies. method type-hints (public) should be reconsidered as well. What do you think ?
  22. Alexander Schnitzler commented on patch set 7 07/22/23, 06:07

    StorageRepository.php:37 Reply

    This patch is the reason I asked this https://typo3.slack.com/archives/C03AM9R17/p1689835021009679 in the coredev-channel. I first marked it breaking and tried to write a rst file but couldn't come up with any words describing what's actually breaking here. Unless you used the former implementation wrong, those type declarations will not break anything. You can prove me wrong here though.
  23. Stefan Bürk commented on patch set 7 07/22/23, 07:33

    StorageRepository.php:37 Reply

    Done
  24. Stefan Bürk voted on patch set 7 V +2 CR +2 07/23/23, 07:17

  25. Stefan Bürk merged patch set 8 07/23/23, 07:17