-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArrayType - string offset might exist as integer offset #2928
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 anyassertType
in test case 🤔