ArrayType - string offset might exist as integer offset#2928
ArrayType - string offset might exist as integer offset#2928ondrejmirtes merged 4 commits intophpstan:1.10.xfrom michalbundyra:fix/10610
Conversation
Fixes phpstan/phpstan#10610 I am not sure yet what changes to do in `phpstan-baseline.neon` (if any), and if we need any `assertType` in test case 🤔
|
@ondrejmirtes pretty unsure how to fix it now. Not completely sure if my changes are good too. Feel free to push change or if you could suggest something I am happy to try :) Thanks |
|
Looks like you fixed it. You just need to update the existing tests that are failing because it should no longe error. You should assertType |
|
Thanks for your help here.
It's done now - 72c18e8
Not sure how I can get that? And where it is needed as atm I cannot see any test failure 🤔 Thanks |
|
Basically do the same thing I did here 0b78c55 |
I do not really understand the changes in there - 0b78c55, as it is: $value = self::MAP[$value] ?? $value;
assertType("'Test1'|'Test2'", self::MAP[$value]);but as you see I've pushed some changes. Hope this is what we need 🤞 |
|
@ondrejmirtes it should be sorted now. Thanks 🙏
I've tried. But for mysterious reason I cannot replicate the issue with shorter array 🤦♂️ |
|
I only hope you squash PRs ;-) |
|
Thank you! |
Fixes phpstan/phpstan#10610
I am not sure yet what changes to do in
phpstan-baseline.neon(if any), and if we need anyassertTypein test case 🤔