82056[TASK] Resolve various PHPStan-related issues
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Benjamin Franzke +1
-
Verified V +2 Done
- Christian Kuhn +2
- Benjamin Franzke +1
- Oliver Klee +1
- core-ci +1 CI
Issues 1
Files 19
- Build/phpstan/phpstan-baseline.neon+0 −145
- typo3/sysext/core/Classes/DataHandling/Localization/DataMapItem.php+7 −15
- typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php+2 −2
- typo3/sysext/core/Classes/DataHandling/Localization/State.php+28 −83
- typo3/sysext/core/Classes/DataHandling/Model/CorrelationId.php+6 −31
- typo3/sysext/core/Classes/DataHandling/Model/RecordStateFactory.php+3 −12
- typo3/sysext/core/Classes/DataHandling/DataHandler.php+66 −68
- typo3/sysext/core/Classes/DataHandling/SlugHelper.php+1 −1
- typo3/sysext/core/Classes/Site/Entity/NullSite.php+3 −8
- typo3/sysext/core/Tests/Unit/Mail/MailMessageTest.php+4 −1
- typo3/sysext/core/Tests/Unit/Page/AssetRendererTest.php5+6 −4
- typo3/sysext/fluid/Classes/ViewHelpers/Transform/HtmlViewHelper.php+2 −1
- typo3/sysext/frontend/Tests/Functional/SiteHandling/EnhancerSiteRequest/AbstractEnhancerSiteRequestTestCase.php+1 −1
- typo3/sysext/frontend/Tests/Unit/Middleware/SiteBaseRedirectResolverTest.php+0 −2
- typo3/sysext/frontend/Tests/Unit/Middleware/SiteResolverTest.php+0 −3
- typo3/sysext/frontend/Tests/Unit/Resource/FilePathSanitizerTest.php+12 −3
- typo3/sysext/linkvalidator/Classes/Repository/BrokenLinkRepository.php+1 −1
- typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php+4 −4
- typo3/sysext/recycler/Classes/Controller/RecyclerAjaxController.php+1 −1
Review log 1926
Show 1 earlier messages
-
Benni Mack uploaded patch set 1 12/01/23, 08:16
-
Benni Mack uploaded patch set 2 12/01/23, 08:23
-
core-ci voted on patch set 1 V -1 12/01/23, 08:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50195
-
core-ci voted on patch set 2 V -1 12/01/23, 08:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50196
-
Benni Mack uploaded patch set 3
V -112/01/23, 08:34 -
core-ci voted on patch set 3 V -1 12/01/23, 08:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50197
-
Benjamin Franzke commented on patch set 3 12/01/23, 08:46
♥ -
Benni Mack uploaded patch set 4
V -112/01/23, 08:48 -
core-ci voted on patch set 4 V -1 12/01/23, 08:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50198
-
Benni Mack uploaded patch set 5
V -112/01/23, 09:09 -
core-ci voted on patch set 5 V +1 12/01/23, 09:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50199
-
Oliver Klee commented on patch set 5 12/01/23, 09:38
AssetRendererTest.php:31A note on the type of mocks: Mocks are always an intersection type of the mocked class/interface and `MockObject`, not a union type (as they are both types at the same time). So in this case, the type should be: `(EventDispatcherInterface&MockObject)|null` -
Benjamin Franzke voted on patch set 5 CR +1 12/01/23, 09:38
-
Oliver Klee commented on patch set 5 12/01/23, 09:39
And thank you for getting rif of all those PHPStan warnings! <3 -
Benjamin Franzke uploaded patch set 6
CR +1V +112/01/23, 09:43 -
Benjamin Franzke commented on patch set 6 12/01/23, 09:43
AssetRendererTest.php:31ReplyDone -
core-ci voted on patch set 6 V +1 12/01/23, 09:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50203
-
Oliver Klee commented on patch set 6 12/01/23, 09:52
AssetRendererTest.php:31This type is now incomplete as it's missing `EventDispatcherInterface`. `(EventDispatcherInterface&MockObject)|null` is be the complete type. -
Benjamin Franzke commented on patch set 6 12/01/23, 09:58
AssetRendererTest.php:31ReplyIt's actually fine. Only `MockObject` related methods are needed in these testcases. `(EventDispatcherInterface&MockObject)|null` is not an allowed type: Message: syntax error, unexpected token "(", expecting variable -
Oliver Klee commented on patch set 6 12/01/23, 14:44
AssetRendererTest.php:31ReplyYes, this type (with the parenthesis) indeed only works as a PHPDoc annotation (for PHPStan and the human reader), not as a native type declaration. In this case, we can simplify this to `MockObject&EventDispatcherInterface` though (without losing information for the reader) as this property does not need to be nullable. (It's set in `setUp()` and never accessed before.) I'm going to push an updated changeset in a minute. -
Oliver Klee uploaded patch set 7
CR +1V +112/01/23, 14:44 -
core-ci voted on patch set 7 V +1 12/01/23, 14:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50210
-
Benjamin Franzke voted on patch set 7 CR +1 V +1 12/01/23, 16:44
-
Oliver Klee voted on patch set 7 V +1 12/02/23, 08:51
-
Christian Kuhn voted on patch set 7 CR +2 V +2 12/02/23, 11:32
-
Christian Kuhn merged patch set 8 12/02/23, 11:32