80184[!!!][TASK] Introduce type declarations in AbstractFile
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Oliver Klee +1
- Christian Kuhn +1
-
Verified V +2 Done
- Stefan Bürk +2
- Oliver Klee +1
- Christian Kuhn +1
- core-ci +1 CI
Issues 1
Files 11
- Build/phpstan/phpstan-baseline.neon+7 −7
- typo3/sysext/core/Classes/Resource/AbstractFile.php7+40 −64
- typo3/sysext/core/Classes/Resource/File.php3+1 −1
- typo3/sysext/core/Classes/Resource/ProcessedFile.php+3 −9
- typo3/sysext/core/Classes/Resource/ResourceStorage.php+4 −0
- typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php3+1 −1
- typo3/sysext/core/Documentation/Changelog/13.0/Breaking-101459-IntroduceTypeDeclarationsInAbstractFile.rstnew+58 −0
- typo3/sysext/core/Tests/Unit/LinkHandling/FileLinkHandlerTest.php+1 −1
- typo3/sysext/core/Tests/Unit/LinkHandling/LegacyLinkNotationConverterTest.php+1 −1
- typo3/sysext/core/Tests/Unit/Resource/FileTest.php+2 −2
- typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php+1 −1
Review log 1622
-
Alexander Schnitzler uploaded patch set 1 07/27/23, 10:50
-
core-ci voted on patch set 1 V -1 07/27/23, 10:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44608
-
Alexander Schnitzler uploaded patch set 2
V -107/27/23, 11:11 -
core-ci voted on patch set 2 V +1 07/27/23, 11:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44612
-
Alexander Schnitzler uploaded patch set 3
V +107/27/23, 12:41 -
Alexander Schnitzler wrote 07/27/23, 12:41
Topic set to FAL -
core-ci voted on patch set 3 V +1 07/27/23, 12:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44615
-
Oliver Klee commented on patch set 3 V +1 07/27/23, 13:27
AbstractFile.php:232Nice!AbstractFile.php:259Would this be possible here? `@return self::FILETYPE_*`AbstractFile.php:477`@param DuplicationBehavior::* $conflictMode` (Ditto für `moveTo`, and also for the subclasses.)File.php:38`MetaDataAspect`ExtendedFileUtility.php:612Would it make sense to shorten this to `ResourceInterface|false`? -
Alexander Schnitzler commented on patch set 3 07/27/23, 13:58
AbstractFile.php:259ReplyYes, we can do this.AbstractFile.php:477ReplyWe can do this of course but I left it out because we will introduce an enum here anyway and then we don't need additional information.File.php:38ReplyI'd like to introduce type declarations in this class in a seperate patch.ExtendedFileUtility.php:612ReplyLet's put it this way: phpstan doesn't complain. But that's just because the only method calling this then widens the return type to mixed. I am not sure how FAL understands a resource. It is the base interface for files and folders at the moment but I am not sure if resources can be copied or if this behaviour is tied to folders and files. func_copy distinguishes between copying files and folders and doesn't even check the interfaces but actual implementations (needs to change in the future) but it cannot simply copy a resource because it doesn't provide all necessary information for the process I guess. Following that logic, we currently can only widen the return type of this method that far. I don't even know if we could return a FolderInterface here but this area is not really part of the main change here, so I don't want to check further and end up changing param and return types all over the place. -
Alexander Schnitzler uploaded patch set 4
V +107/27/23, 14:07 -
core-ci voted on patch set 4 V +1 07/27/23, 14:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44619
-
Alexander Schnitzler commented on patch set 4 07/27/23, 14:16
AbstractFile.php:259ReplyDone -
Oliver Klee commented on patch set 4 07/27/23, 14:24
AbstractFile.php:477ReplyAckFile.php:38ReplyAckExtendedFileUtility.php:612ReplyAck -
Oliver Klee voted on patch set 4 V +1 CR +1 07/27/23, 14:25
-
Alexander Schnitzler uploaded patch set 5
CR +1V +107/28/23, 06:32 -
core-ci voted on patch set 5 V -1 07/28/23, 06:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44641
-
Alexander Schnitzler uploaded patch set 6
V -107/28/23, 07:14 -
core-ci voted on patch set 6 V +1 07/28/23, 07:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44644
-
Oliver Klee voted on patch set 6 V +1 CR +1 07/28/23, 07:56
-
Christian Kuhn voted on patch set 6 V +1 CR +1 07/28/23, 17:51
-
Stefan Bürk voted on patch set 6 V +2 CR +2 07/28/23, 17:52
-
Stefan Bürk merged patch set 7 07/28/23, 17:52