83076[TASK] Harden ResourceFactory->getFileReferenceObject()
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Oliver Klee +1
- Stefan Bürk +1
-
Verified V +2 Done
- Christian Kuhn +2
- Oliver Klee +1
- Stefan Bürk +1
- core-ci +1 CI
Issues 1
Files 6
- Build/phpstan/phpstan-baseline.neon+0 −25
- typo3/sysext/core/Classes/Resource/Filter/FileExtensionFilter.php+1 −1
- typo3/sysext/core/Classes/Resource/ResourceFactory.php3+4 −15
- typo3/sysext/extbase/Classes/Service/ImageService.php+1 −1
- typo3/sysext/form/Classes/Mvc/Property/TypeConverter/UploadedFileReferenceConverter.php+1 −1
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php+5 −5
Review log 910
-
Christian Kuhn uploaded patch set 1 02/22/24, 11:30
-
core-ci voted on patch set 1 V +1 02/22/24, 11:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53445
-
Stefan Bürk voted on patch set 1 CR +1 V +1 02/22/24, 11:43
-
Mathias Brodala commented on patch set 1 02/22/24, 11:43
-
Oliver Klee commented on patch set 1 V +1 02/22/24, 11:43
I propose we backport this to 12.4 and 11.5 as well (as the problem can occur there as well, I'd suppose). -
Oliver Klee commented on patch set 1 CR +1 02/22/24, 11:44
Reply
Ah, scratch that. I was thinking in a nonsensical direction. -
Christian Kuhn commented on patch set 1 02/22/24, 11:54
ResourceFactory.php:427Replynah. I don't think so. giving this one a float is 'obviously' wrong. the fact this did not except yet is a bug. the class is not declare strict_types=1, so php will turn a string into int if given. and phpstan already mumbles for consumers that an int must be given. i'd say it's fine to change this without further notice. what do you think? -
Mathias Brodala commented on patch set 1 02/22/24, 11:56
ResourceFactory.php:427ReplyGood hint about the missing strict_types, didn't notice. In this case it may indeed continue to work albeit unclean/pending to fix. -
Christian Kuhn voted on patch set 1 CR +2 V +2 02/22/24, 12:05
-
Christian Kuhn merged patch set 2 02/22/24, 12:05
ResourceFactory.php:427