Review main Merged

73843[BUGFIX] Fix various phpstan-reported errors in filelist + recordlist

Benni Mack CR +2 V +2 Normal +19 −118 updated 03/14/22, 08:32

Commit message

Review

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

Issues 1

Files 8

Review log 1620

  1. Benni Mack uploaded patch set 1 03/07/22, 18:51

  2. core-ci voted on patch set 1 V +1 03/07/22, 19:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24683

  3. Benni Mack uploaded patch set 2 03/07/22, 21:29

  4. Stefan Bürk voted on patch set 2 V +1 CR +1 03/07/22, 21:39

  5. core-ci voted on patch set 2 V +1 03/07/22, 21:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24693

  6. Nikita Hovratov commented on patch set 2 CR -1 03/08/22, 20:11

    CreateFolderController.php:66

    Another solution would be here to typehint $folderObject as nullable. Let's do it additionally. Later this can be refactored to use PHP type declarations.

    CreateFolderController.php:120

    Should it really be FolderInterface not just Folder? The local typehint is Folder and the return type of getFolderObjectFromCombinedIdentifier is Folder, too.

    FileBrowser.php:171

    This should be FolderInterface (see typehint). Also let's add nullable to the typehint declaration.

    FileLinkHandler.php:104

    Let's add nullable to type declaration, too.

    FolderLinkHandler.php:80

    This is a straight up bug right? Change commit header to [BUGFIX]?
  7. Nikita Hovratov uploaded patch set 3 03/09/22, 11:37

  8. Nikita Hovratov commented on patch set 3 03/09/22, 11:38

    CreateFolderController.php:66 Reply

    Done

    CreateFolderController.php:120 Reply

    Done

    FileBrowser.php:171 Reply

    Done

    FileLinkHandler.php:104 Reply

    Done

    FolderLinkHandler.php:80 Reply

    Done
  9. Stefan Bürk commented on patch set 3 03/09/22, 11:52

    CreateFolderController.php:67

    Normally "Folder|null" is used in docblocks. I wonder if we can add real property types fully in this class, as it is internal and properties already protected. What do you think Nikita, have you checked if it is possible to use direct property typehints (with = null default than to avoid other issues) ? Maybe will do that check in the evening.
  10. core-ci voted on patch set 3 V -1 03/09/22, 11:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24743

  11. Nikita Hovratov uploaded patch set 4 03/09/22, 12:11

  12. Nikita Hovratov commented on patch set 3 03/09/22, 12:12

    CreateFolderController.php:67 Reply

    Changed it to |null. I we change one attribute, I would like to change all at once. But that's not the goal of this patch. So I would say let's do it in another patch.
  13. core-ci voted on patch set 4 V +1 03/09/22, 12:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24745

  14. Oliver Klee commented on patch set 4 03/09/22, 12:28

    CreateFolderController.php:68

    We then also should initialize it with null.

    FileBrowser.php:54

    We need to initialize it with null now.

    FileLinkHandler.php:55

    We need to initialize it with null now.
  15. Nikita Hovratov commented on patch set 4 03/09/22, 13:15

    FileLinkHandler.php:55 Reply

    Is it ok, if we change it, when migrating to PHP type declarations, as null is the default without type declarations?
  16. Oliver Klee commented on patch set 4 CR +1 03/09/22, 13:34

    FileLinkHandler.php:55 Reply

    Yes, I would be okay with that (as long as we remember to do it then).
  17. Nikita Hovratov voted on patch set 4 V +1 CR +1 03/09/22, 14:06

  18. Stefan Bürk commented on patch set 4 V +1 CR +1 03/09/22, 15:07

    CreateFolderController.php:68 Reply

    Will be added as followup along adding property types.

    FileBrowser.php:54 Reply

    Will be added as followup along adding property types.

    FileLinkHandler.php:55 Reply

    Without property type this not necessarily needed. If adding property type it is (it most cases). Would leave out the = null for now. Thus considdigering this as done.
  19. Oli Bartsch voted on patch set 4 V +2 CR +2 03/14/22, 08:32

  20. Oli Bartsch merged patch set 5 03/14/22, 08:32