88506[TASK] Update to PHPStan 2.1.7 with adjusted baseline
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Oliver Klee +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Oliver Klee +1
- core-ci +1 CI
Issues 2
Files 7
- Build/phpstan/phpstan-baseline.neon+0 −42
- typo3/sysext/backend/Classes/Preview/StandardPreviewRendererResolver.php3+1 −2
- typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php6+1 −2
- typo3/sysext/core/Tests/Unit/Context/SecurityAspectTest.php+0 −9
- typo3/sysext/install/Classes/Configuration/FeatureManager.php+0 −3
- composer.json+1 −1
- composer.lock+6 −6
Review log 1619
-
Garvin Hicking uploaded patch set 1 03/06/25, 08:20
-
core-ci voted on patch set 1 V +1 03/06/25, 08:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75207
-
Oliver Klee commented on patch set 1 03/06/25, 08:49
-
Garvin Hicking commented on patch set 2
V +103/06/25, 08:51Published edit on patch set 1. -
Garvin Hicking commented on patch set 2 03/06/25, 08:51
StandardPreviewRendererResolver.php:60ReplyThanks, that's better :-) -
core-ci voted on patch set 2 V +1 03/06/25, 08:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75208
-
Oliver Klee voted on patch set 2 CR +1 V +1 03/06/25, 08:58
-
Oliver Klee updated the commit message in patch set 3
CR +1V +103/06/25, 08:59 -
Oliver Klee voted on patch set 3 CR +1 V +1 03/06/25, 09:00
-
core-ci voted on patch set 3 V +1 03/06/25, 09:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75209
-
Benjamin Franzke commented on patch set 3 03/06/25, 10:35
StandardPreviewRendererResolver.php:60👍AbstractTreeView.php:329Imho `!is_array` is actually not needed and would would probably have been enough to remove `/** @var array $row */`, because phpstan now transform `array|false` to `array` automatically, no? -
Benjamin Franzke commented on patch set 3 03/06/25, 11:09
That's not correct. It is resolved to `array|false` and narrowed down do `array` (due to the phpstan upgrade), because `false` is excluded implicitly due to the condition in `while()`. -
Garvin Hicking commented on patch set 3 03/06/25, 11:17
AbstractTreeView.php:329ReplyI checked the getDataNext return type hint that says @return array|bool shouldnt that be bool|false instead then? I only checked until that point. -
Garvin Hicking commented on patch set 3 03/06/25, 11:20
AbstractTreeView.php:329Reply(my intent was to prevent "true" getting in here inside the while()) -
Oliver Klee commented on patch set 3 03/06/25, 11:32
AbstractTreeView.php:329ReplyThe return type annotation for `getDataNext` should indeed be `array|false`. -
Benjamin Franzke commented on patch set 3 CR +1 V +1 03/06/25, 12:05
Reply
nvmAbstractTreeView.php:329Replyack, can be fixed now or later, I don't care/mind -
Garvin Hicking commented on patch set 3 03/06/25, 13:22
I have adapted the 12+13 backports. It would have proven to take too much time to to move the RepositoryTest methods from unit to functionals, so I've instead gone another route to just check for a not-null object response in these two tests. Please see if this is acceptable, IMO this is better than just including it in a phpstan baseline?AbstractTreeView.php:329ReplyThanks. Since my IDE doesn't really allow to follow `$res->fetchAssociative` to the full doctrine DBAL onion layering, I'll go the "safe" and less time-consuming route and not change the annotation to array|false, but instead use the `is_array()` gating for a possible "true" (even though unlikely), hope that's fine for everybody. -
Benjamin Franzke voted on patch set 3 CR +2 V +2 03/06/25, 18:01
-
Benjamin Franzke merged patch set 4 03/06/25, 18:01
StandardPreviewRendererResolver.php:60