74602[TASK] Resolve strict comparison with === warnings in PHPStan
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 39
- Build/phpstan/phpstan-baseline.neon+0 −185
- typo3/sysext/backend/Classes/Controller/File/ThumbnailController.php+1 −1
- typo3/sysext/backend/Classes/Controller/Wizard/AddController.php+8 −20
- typo3/sysext/backend/Classes/Form/Element/SelectMultipleSideBySideElement.php1+3 −0
- typo3/sysext/core/Classes/Authentication/IpLocker.php+1 −3
- typo3/sysext/core/Classes/Database/Connection.php+1 −3
- typo3/sysext/core/Classes/Database/ReferenceIndex.php+2 −2
- typo3/sysext/core/Classes/DataHandling/Model/RecordStateFactory.php+4 −20
- typo3/sysext/core/Classes/DataHandling/DataHandler.php+2 −2
- typo3/sysext/core/Classes/DataHandling/SlugHelper.php+1 −4
- typo3/sysext/core/Classes/Http/Request.php+9 −15
- typo3/sysext/core/Classes/Locking/SemaphoreLockStrategy.php2+6 −9
- typo3/sysext/core/Classes/Page/PageRenderer.php+1 −1
- typo3/sysext/core/Classes/Resource/Processing/TaskTypeRegistry.php+1 −4
- typo3/sysext/core/Classes/Resource/Service/UserFileMountService.php+0 −1
- typo3/sysext/core/Classes/Resource/Folder.php+1 −1
- typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php+1 −1
- typo3/sysext/core/Classes/Utility/GeneralUtility.php+3 −3
- typo3/sysext/core/Tests/Unit/Http/RequestFactoryTest.php+0 −27
- typo3/sysext/core/Tests/Unit/Http/RequestTest.php+0 −61
Show 19 more files
- typo3/sysext/core/Tests/Unit/Http/ServerRequestFactoryTest.php+0 −27
- typo3/sysext/core/Tests/Unit/Resource/ResourceStorageTest.php+7 −10
- typo3/sysext/core/Tests/Unit/Utility/Fixtures/GeneralUtilityFilesystemFixture.php+3 −2
- typo3/sysext/extbase/Classes/Mvc/Controller/Arguments.php+0 −4
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMap.php+1 −1
- typo3/sysext/extbase/Classes/Persistence/Generic/LazyObjectStorage.php+0 −3
- typo3/sysext/extbase/Classes/Validation/Validator/ConjunctionValidator.php+4 −14
- typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php+1 −1
- typo3/sysext/form/Classes/Domain/Finishers/ClosureFinisher.php+1 −1
- typo3/sysext/form/Classes/Mvc/Configuration/YamlSource.php+6 −0
- typo3/sysext/frontend/Tests/Functional/SiteHandling/Framework/Builder/VariablesContext.php+1 −1
- typo3/sysext/install/Classes/Service/LanguagePackService.php+4 −1
- typo3/sysext/install/Classes/Updates/ShortcutRecordsMigration.php+0 −4
- typo3/sysext/recycler/Tests/Functional/Recycle/AbstractRecycleTestCase.php+1 −2
- typo3/sysext/redirects/Classes/ViewHelpers/TargetPageIdViewHelper.php+1 −1
- typo3/sysext/scheduler/Classes/CronCommand/NormalizeCommand.php1+3 −1
- typo3/sysext/scheduler/Classes/Task/AbstractTask.php1+1 −1
- typo3/sysext/scheduler/Classes/Scheduler.php1+0 −4
- typo3/sysext/setup/Classes/Controller/SetupModuleController.php+2 −3
Review log 78
-
crell uploaded patch set 1 05/10/22, 22:41
-
core-ci voted on patch set 1 V +1 05/10/22, 22:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27104
-
Oliver Klee commented on patch set 1 05/11/22, 08:28
Could you please split this up into two changesets: one that is non-breaking that is backportable to 11.5, and one with the breaking changes? -
Georg Ringer commented on patch set 1 05/11/22, 10:30
Reply
I would like to avoid backporting such stuff. we had a lot of regressions with such changes already -
Stefan Bürk commented on patch set 1 CR -2 05/11/22, 12:04
This patch is to wide-spreaded, doing a lot of different things in a lot of different ways, mixing lot of things. This patch is really really hard to review and ensure it is working properly, checking for breakings and not breakings etc. Shortly said: Everything already stated and noted in dozen of patches and again ignored. * split the patch in smaller pieces, more grouped * properly check for correct pre-evaluation by *you* which is breaking and without the possibility for extension developer to make v11/v12 compatible code without a lot of ugly workarounds etc. * better check if there is really not a solution to fix code instead of simply adding a comment as "phpstan-ignore" replacement * split breaking and non-breaking things more * ... -
crell commented on patch set 1 05/11/22, 12:45
Reply
I also don't really think these patches are worth backporting. They're not bug fixes (except maybe by accident). And often they're using PHP 8.x language features for the fix, which aren't backportable. Trying to separate those out is just more work for no value. -
Stefan Bürk commented on patch set 1 05/11/22, 19:04
Reply Unresolved
just some first quick(little bit deeper lookthrough) findings ...SelectMultipleSideBySideElement.php:203Unresolvedno @phpstan-ignore-next-line / @phpstan-ignoreline in core code; and also in test classes only in very explict situations. 2 lines comment and ignore line can be replaced with following annotation: ``` /** @var array{header?:array{disabled?: bool, title?: string},items?: null|array<int|string, array{label?: string, attributes?: array{disabled?: string, title?: string, class?: string, value?: mixed}}>} $selectableItemGroup*/ ``` with the same effect.SemaphoreLockStrategy.php:44Unresolvedbreaking without marking patch as breaking + breaking rst. This class is not internal, so it should be considered as public api. Compatible code for v11/v12 can be written, but still should be documented basicly as breaking. see: https://3v4l.org/EYkNCSemaphoreLockStrategy.php:49Unresolvedbreaking, see above.NormalizeCommand.php:194UnresolvedInstead of these two lines use: ``` /** @var string $fieldValues */ ```Scheduler.php:380Unresolvedsolved by adding a breaking return type to AbstractTaskAbstractTask.php:236UnresolvedBreaking without patch marked as breaking + breaking rst. -
crell abandoned the change 05/11/22, 21:22