93472[TASK] Update phpstan to 2.1.45
Commit message
Review
-
Code review CR +2 Done
- Anja Leichsenring +2
- Garvin Hicking +1
- Stefan Bürk +1
- Elias Häußler +1
-
Verified V +2 Done
- Anja Leichsenring +2
- Garvin Hicking +1
- Stefan Bürk +1
- Elias Häußler +1
- core-ci +1 CI
Issues 1
Files 5
Review log 1213
-
Anja Leichsenring uploaded patch set 1 03/31/26, 03:50
-
core-ci voted on patch set 1 V +1 03/31/26, 04:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99197
-
Elias Häußler commented on patch set 1 03/31/26, 05:18
-
Garvin Hicking commented on patch set 1 CR +1 V +1 03/31/26, 05:18
phpstan-baseline.neon:367Yeah I'm also not confident enough to change this at this timeTimeTracker.php:269(only floats allowed, valid)ExtbasePluginEnhancer.php:112(valid, AbstractEnhancer sets $aspects = [] with array notation) -
Garvin Hicking commented on patch set 1 03/31/26, 05:20
phpstan-baseline.neon:364ReplyThinking more about this, it only got introduced with https://review.typo3.org/c/Packages/TYPO3.CMS/+/92018 in 14.2 - so we could change this, I change my mind....? -
Anja Leichsenring commented on patch set 1 03/31/26, 05:25
phpstan-baseline.neon:364Replythe $value argument put into the function states itself as all kind of types, so while I agree there _should_ be nothing but objects in an objectStorage, and phpstan agrees with all of us, I am reluctant to remove the check right now. I would prefer to have more thorough look after the release. -
Elias Häußler commented on patch set 1 03/31/26, 05:28
phpstan-baseline.neon:364ReplyAcknowledged -
Elias Häußler voted on patch set 1 CR +1 V +1 03/31/26, 05:29
-
Stefan Bürk commented on patch set 1 CR +1 V +1 03/31/26, 05:37
phpstan-baseline.neon:364ReplyI disagree here with phpstan. It seems that it takes the `@template TEntity of object` on class level higher than the \ArrayAccess methods implementations having mixed for the item to set/get and similar with method docblocks of * offsetGet `TEntity|int|string` * offsetUnset `TEntity|int|string` * offsetExists `TEntity|int|string` * offsetGet `TEntity|string|null` ObjectStorage needs some love and hardening with custom checks and exception instead of ending up in generic TypeErrors. That PHPStan is now thinking that this is possible and save is a side effect that we disabled `treatPhpDocTypesAsCertain` with 93027: [TASK] phpstan: do not treatPhpDocTypesAsCertain | https://review.typo3.org/c/Packages/TYPO3.CMS/+/93027 I would currently not take ObjectStorage that objectsafe like PHPSTan. That means I'm here against removing the is_object() call from the ViewHelper and going with adding the baseline entry for now special for the backports. -
Stefan Bürk commented on patch set 1 03/31/26, 05:37
phpstan-baseline.neon:364ReplyDone -
Anja Leichsenring voted on patch set 1 CR +2 V +2 03/31/26, 05:39
-
Anja Leichsenring merged patch set 2 03/31/26, 05:39
-
Stefan Bürk voted on patch set 1 CR +2 V +2 03/31/26, 05:40
phpstan-baseline.neon:364