92900[TASK] Remove last remaining obvious phpstan issues
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Oliver Klee +1
- Garvin Hicking +1
-
Verified V +2 Done
- Benni Mack +2
- Oliver Klee +1
- Garvin Hicking +1
- core-ci +1 CI
Issues 1
Files 63
- Build/phpstan/phpstan-baseline.neon+5 −335
- typo3/sysext/backend/Classes/Form/Container/SingleFieldContainer.php+1 −1
- typo3/sysext/backend/Tests/Functional/Form/FormDataProvider/TcaSelectItemsTest.php+2 −4
- typo3/sysext/core/Classes/Authentication/Mfa/Provider/RecoveryCodesProvider.php+44 −45
- typo3/sysext/core/Classes/Authentication/Mfa/Provider/TotpProvider.php+33 −34
- typo3/sysext/core/Classes/Authentication/AuthenticationService.php+1 −1
- typo3/sysext/core/Classes/Configuration/Processor/Placeholder/EnvVariableProcessor.php4+0 −4
- typo3/sysext/core/Classes/DataHandling/SoftReference/TypolinkSoftReferenceParser.php+3 −3
- typo3/sysext/core/Classes/DataHandling/SoftReference/TypolinkTagSoftReferenceParser.php+1 −1
- typo3/sysext/core/Classes/DataHandling/DataHandler.php+2 −3
- typo3/sysext/core/Classes/Domain/Repository/PageRepository.php+1 −1
- typo3/sysext/core/Classes/Error/PageErrorHandler/PageContentErrorHandler.php+1 −2
- typo3/sysext/core/Classes/Html/SimpleParser.php2+5 −16
- typo3/sysext/core/Classes/Http/NormalizedParams.php+30 −81
- typo3/sysext/core/Classes/Imaging/ImageProcessingInstructions.php+1 −1
- typo3/sysext/core/Classes/IO/CsvStreamFilter.php+2 −1
- typo3/sysext/core/Classes/LinkHandling/FolderLinkHandler.php+2 −10
- typo3/sysext/core/Classes/LinkHandling/LegacyLinkNotationConverter.php+1 −4
- typo3/sysext/core/Classes/Log/Writer/SyslogWriter.php+1 −5
- typo3/sysext/core/Classes/Mail/TransportFactory.php+3 −1
Show 43 more files
- typo3/sysext/core/Classes/Resource/File.php+0 −1
- typo3/sysext/core/Classes/Resource/StorageRepository.php+2 −0
- typo3/sysext/core/Classes/Routing/Aspect/MappableProcessor.php+3 −1
- typo3/sysext/core/Classes/Routing/Enhancer/AbstractEnhancer.php+1 −1
- typo3/sysext/core/Classes/Routing/Enhancer/PluginEnhancer.php+1 −1
- typo3/sysext/core/Classes/Routing/Enhancer/SimpleEnhancer.php+1 −1
- typo3/sysext/core/Classes/Routing/Enhancer/VariableProcessor.php+2 −2
- typo3/sysext/core/Classes/Routing/PageArguments.php+1 −1
- typo3/sysext/core/Classes/Routing/PageRouter.php2+7 −15
- typo3/sysext/core/Classes/Routing/RouteSorter.php+7 −7
- typo3/sysext/core/Classes/Schema/Struct/SelectItemCollection.php2+4 −2
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Scope.php+1 −2
- typo3/sysext/core/Classes/Settings/Type/BoolType.php+2 −2
- typo3/sysext/core/Classes/Site/SiteFinder.php+2 −2
- typo3/sysext/core/Classes/Slug/SlugNormalizer.php+2 −2
- typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php+7 −24
- typo3/sysext/core/Classes/Utility/ArrayUtility.php+7 −12
- typo3/sysext/core/Classes/Utility/GeneralUtility.php2+6 −2
- typo3/sysext/core/Classes/Utility/IpAnonymizationUtility.php+5 −1
- typo3/sysext/core/Classes/Utility/RootlineUtility.php+0 −3
- typo3/sysext/core/Tests/Functional/Category/Collection/CategoryCollectionTest.php+0 −14
- typo3/sysext/core/Tests/Functional/Log/LoggerAwareChannelTest.php+0 −3
- typo3/sysext/core/Tests/Unit/Compatibility/PublicMethodDeprecationTraitTest.php+5 −9
- typo3/sysext/core/Tests/Unit/Error/ErrorHandlerTest.php+5 −2
- typo3/sysext/core/Tests/Unit/Http/StreamFactoryTest.php+1 −1
- typo3/sysext/core/Tests/Unit/Http/StreamTest.php2+1 −1
- typo3/sysext/core/Tests/Unit/TypoScript/AST/Traverser/AstTraverserTest.php+1 −2
- typo3/sysext/core/Tests/Unit/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverserTest.php+1 −2
- typo3/sysext/core/Tests/Unit/TypoScript/IncludeTree/Traverser/IncludeTreeTraverserTest.php+1 −2
- typo3/sysext/extbase/Classes/Mvc/Controller/MvcPropertyMappingConfigurationService.php3+0 −2
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php+9 −17
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php2+2 −5
- typo3/sysext/extbase/Classes/Persistence/Generic/LazyLoadingProxy.php7+1 −4
- typo3/sysext/extbase/Classes/Persistence/Generic/Query.php+2 −18
- typo3/sysext/extbase/Classes/Property/PropertyMapper.php+0 −9
- typo3/sysext/extbase/Classes/Reflection/ObjectAccess.php+1 −5
- typo3/sysext/extbase/Tests/Functional/Persistence/Generic/BackendTest.php+1 −2
- typo3/sysext/extbase/Tests/Functional/Persistence/RepositoryTest.php+3 −6
- typo3/sysext/extbase/Tests/Functional/Property/TypeConverter/ObjectConverterTest.php+2 −4
- typo3/sysext/impexp/Classes/Export.php+1 −3
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/InterfaceMethodChangedMatcher.php+2 −2
- typo3/sysext/install/Tests/Unit/SystemEnvironment/DatabaseCheck/Platform/MySqlTest.php+4 −6
- typo3/sysext/scheduler/Classes/Command/SchedulerListCommand.php+1 −2
Review log 2534
Show 69 earlier messages
-
Benni Mack uploaded patch set 1 02/19/26, 14:33
-
core-ci voted on patch set 1 V -1 02/19/26, 14:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96254
-
Oliver Klee commented on patch set 1 02/19/26, 18:04
-
Garvin Hicking uploaded patch set 2
V -102/20/26, 14:23 -
Garvin Hicking commented on patch set 2 02/20/26, 14:23
MvcPropertyMappingConfigurationService.php:79This removal here needs an adaptation in: `dataProviderForGenerateTrustedPropertiesTokenWithUnallowedValues` of `typo3/sysext/extbase/Tests/Unit/Mvc/Controller/MvcPropertyMappingConfigurationServiceTest.php` -
core-ci voted on patch set 2 V -1 02/20/26, 14:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96360
-
Benni Mack uploaded patch set 3
V -102/25/26, 13:39 -
core-ci voted on patch set 3 V -1 02/25/26, 13:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96823
-
Benni Mack uploaded patch set 4
V -102/25/26, 15:46
-
core-ci voted on patch set 4 V -1 02/25/26, 16:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96837
-
Benni Mack rebased onto patch set 5
V -102/25/26, 21:45 -
core-ci voted on patch set 5 V -1 02/25/26, 21:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96858
-
Benni Mack uploaded patch set 6
V -102/26/26, 13:29 -
core-ci voted on patch set 6 V -1 02/26/26, 13:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96919
-
Benni Mack uploaded patch set 7
V -102/26/26, 14:23 -
core-ci voted on patch set 7 V +1 02/26/26, 14:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96928
-
Garvin Hicking commented on patch set 7 02/26/26, 17:07
Nice work! I went through all of them and only a few comments.PageRouter.php:103How did this not cause breakage before -.-SelectItemCollection.php:92This one hurts a bit, and it would be fair to convert this into a proper type error but needs a BC 😞GeneralUtility.php:3111This will break usage of makeInstanceService on extensions like mksearch and rn_base, same topic as in https://review.typo3.org/c/Packages/TYPO3.CMS/+/92963 we tried to solve.MvcPropertyMappingConfigurationService.php:79ReplyDoneLazyLoadingProxy.php:82That parentObject is an DomainObjectInterface isn't really guaranteed in userland due to only being a typehint?! I think the phpdoc inference could cause real-world issues and might return null. I think we're too late in v14 cycle to do this for a vital method. We should do actual type declaration for this in v15 and have it fall under BC?Typo3DbQueryParser.php:488Why do (int) cast here, if we do a "> 0" comparison above that feels superflous? And is there really never a case where the PROPERTY_LOCALIZED_UID might be passed as a string or null? The AbstractDomainObject only uses "mixed" as native return type...? This one makes me feel afraid a bit :D -
Benni Mack uploaded patch set 8
V +102/27/26, 12:48 -
Benni Mack commented on patch set 8 02/27/26, 12:48
This change is ready for review.PageRouter.php:103ReplyPageArguments is a subtype / implementation of RouteResultInterfaceMvcPropertyMappingConfigurationService.php:79ReplyDoneLazyLoadingProxy.php:82ReplyI don't think so, because otherwise "$this->parentObject->_getProperty()" below is also called. I think we could even fully-type this property. -
Benni Mack commented on patch set 8 02/27/26, 12:49
SelectItemCollection.php:92ReplyDoneStreamTest.php:107ReplyDone -
Benni Mack commented on patch set 8 02/27/26, 12:49
GeneralUtility.php:3111ReplyDone -
core-ci voted on patch set 8 V +1 02/27/26, 12:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96971
-
Oliver Klee voted on patch set 8 V +1 02/27/26, 12:59
-
Oliver Klee commented on patch set 8 02/27/26, 13:14
Neat! I've commented some smaller things.EnvVariableProcessor.php:33According to https://www.php.net/manual/en/function.getenv.php, `getenv` returns `string|array|false`. So we could use this: `@return string|array|false`SimpleParser.php:35We can drop this type annotation now.LazyLoadingProxy.php:82Should we convert the `$this->dataMapper` check to an `instanceof` check? -
Benni Mack commented on patch set 8 02/27/26, 14:42
EnvVariableProcessor.php:33Replywhy? we check for "false" and the rest is handled via PHPstan directly? -
Benni Mack commented on patch set 8 02/27/26, 14:44
LazyLoadingProxy.php:82Replywe have a PHPStan rule to avoid "instanceof" checks when such a case exists. -
Oliver Klee commented on patch set 8 02/27/26, 15:10
EnvVariableProcessor.php:33ReplyCurrently, we don't have any direct return type information (neither via native type declaration nor via PHPDoc type annotation). Are you suggesting to not have any of those for this method? (I honestly am not sure that I understand your question correctly.)LazyLoadingProxy.php:82ReplyOr `!== null` - my main point was avoiding using `class|null` as a boolean. -
Garvin Hicking uploaded patch set 9
V +102/27/26, 15:24 -
Garvin Hicking commented on patch set 8 CR +1 V +1 02/27/26, 15:25
EnvVariableProcessor.php:33ReplySince we always pass `$value` as a non-nullable string, we can never return an array, actually.SimpleParser.php:35ReplyDoneLazyLoadingProxy.php:82ReplyOh yeah. I see focussed so hard on the if structure that I did not see the lower call to `_getProperty`. So this should really be good - but I'd opt not for strongly typing this just to not accidentally break it.LazyLoadingProxy.php:82ReplyDoneTypo3DbQueryParser.php:488ReplyI'm resolving this; it's more a "gut" feeling but nothing I can back up here now. We'll fix it in post. ;) -
Garvin Hicking voted on patch set 9 CR +1 V +1 02/27/26, 15:25
-
Oliver Klee voted on patch set 9 CR +1 V +1 02/27/26, 15:27
-
core-ci voted on patch set 9 V +1 02/27/26, 15:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96976
-
Benni Mack commented on patch set 9 CR +2 V +2 02/27/26, 15:38
thank you 🙏 -
Benni Mack merged patch set 10 02/27/26, 15:38
StreamTest.php:107