73843[BUGFIX] Fix various phpstan-reported errors in filelist + recordlist
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
- Build/phpstan/phpstan-baseline.neon+0 −95
- typo3/sysext/filelist/Classes/Controller/File/CreateFolderController.php8+3 −2
- typo3/sysext/filelist/Classes/Controller/FileListController.php+1 −1
- typo3/sysext/filelist/Classes/FileList.php+2 −4
- typo3/sysext/recordlist/Classes/Browser/FileBrowser.php4+10 −10
- typo3/sysext/recordlist/Classes/LinkHandler/FileLinkHandler.php6+2 −2
- typo3/sysext/recordlist/Classes/LinkHandler/FolderLinkHandler.php2+1 −1
- typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php+0 −3
Review log 1620
-
Benni Mack uploaded patch set 1 03/07/22, 18:51
-
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
-
Benni Mack uploaded patch set 2 03/07/22, 21:29
-
Stefan Bürk voted on patch set 2 V +1 CR +1 03/07/22, 21:39
-
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
-
Nikita Hovratov commented on patch set 2 CR -1 03/08/22, 20:11
CreateFolderController.php:120Should it really be FolderInterface not just Folder? The local typehint is Folder and the return type of getFolderObjectFromCombinedIdentifier is Folder, too.FileBrowser.php:171This should be FolderInterface (see typehint). Also let's add nullable to the typehint declaration.FileLinkHandler.php:104Let's add nullable to type declaration, too.FolderLinkHandler.php:80This is a straight up bug right? Change commit header to [BUGFIX]? -
Nikita Hovratov uploaded patch set 3 03/09/22, 11:37
-
Nikita Hovratov commented on patch set 3 03/09/22, 11:38
CreateFolderController.php:66ReplyDoneCreateFolderController.php:120ReplyDoneFileBrowser.php:171ReplyDoneFileLinkHandler.php:104ReplyDoneFolderLinkHandler.php:80ReplyDone -
Stefan Bürk commented on patch set 3 03/09/22, 11:52
CreateFolderController.php:67Normally "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. -
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
-
Nikita Hovratov uploaded patch set 4 03/09/22, 12:11
-
Nikita Hovratov commented on patch set 3 03/09/22, 12:12
CreateFolderController.php:67ReplyChanged 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. -
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
-
Oliver Klee commented on patch set 4 03/09/22, 12:28
CreateFolderController.php:68We then also should initialize it with null.FileBrowser.php:54We need to initialize it with null now.FileLinkHandler.php:55We need to initialize it with null now. -
Nikita Hovratov commented on patch set 4 03/09/22, 13:15
FileLinkHandler.php:55ReplyIs it ok, if we change it, when migrating to PHP type declarations, as null is the default without type declarations? -
Oliver Klee commented on patch set 4 CR +1 03/09/22, 13:34
FileLinkHandler.php:55ReplyYes, I would be okay with that (as long as we remember to do it then). -
Nikita Hovratov voted on patch set 4 V +1 CR +1 03/09/22, 14:06
-
Stefan Bürk commented on patch set 4 V +1 CR +1 03/09/22, 15:07
CreateFolderController.php:68ReplyWill be added as followup along adding property types.FileBrowser.php:54ReplyWill be added as followup along adding property types.FileLinkHandler.php:55ReplyWithout 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. -
Oli Bartsch voted on patch set 4 V +2 CR +2 03/14/22, 08:32
-
Oli Bartsch merged patch set 5 03/14/22, 08:32
CreateFolderController.php:66