Review main Merged

75034[TASK] Annotate that methods from InaccessibleFolder never return

Oliver Klee CR +2 V +2 Normal +19 −92 updated 07/07/22, 15:05

Commit message

Methods from InaccessibleFolder should not be called and always
throw an exception when called. Annotate this to help static code
analysis understand this.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Mathias Brodala +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Mathias Brodala +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1012

  1. Oliver Klee uploaded patch set 1 07/05/22, 10:23

  2. Oliver Klee commented on patch set 1 07/05/22, 10:26

    How to verify: Check that PHPStan is happy.
  3. core-ci voted on patch set 1 V -1 07/05/22, 10:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28658

  4. Oliver Klee uploaded patch set 2 07/05/22, 10:40

  5. Oliver Klee commented on patch set 2 07/05/22, 10:41

    Note to the merger: As the 11.5 backport required changing the native return type to a PHPDoc annotation, I will take care of creating the backport so that the main merger does not need to do this.
  6. core-ci voted on patch set 2 V +1 07/05/22, 10:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28660

  7. Mathias Brodala commented on patch set 2 V +1 CR +1 07/05/22, 10:52

    As discussed this does not block adding return types to FolderInterface/ResourceInterface at some point, if e.g. "?string" is used then. See e.g. https://3v4l.org/8shXL#v8.1.7
  8. Simon Schaufelberger voted on patch set 2 V +1 CR +1 07/05/22, 11:08

  9. Benni Mack commented on patch set 2 07/05/22, 15:33

    this patch is said to be backported in v11.5. However "never" was added in PHP 8.1, although TYPO3 v11.5 also supported PHP 7.4. How to handle that?
  10. Oliver Klee commented on patch set 2 07/05/22, 15:40

    Reply

    For 11.5, we'll replace the native never type with a PHPDoc type annotation. As this is additional work, I'll take care of this after the main merge so the merger won't have to do the work (as discussed on Slack).
  11. Benni Mack voted on patch set 2 V +2 CR +2 07/07/22, 15:05

  12. Benni Mack merged patch set 3 07/07/22, 15:05