-
Notifications
You must be signed in to change notification settings - Fork 848
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
Add array<string, mixed>
as return type for getJsonBody
#821
Conversation
@ruudk Thanks for doing the work. I'm not sure if we should change this one so I'm going to defer to @ob-stripe who'll get back to you in a few days! |
Could you clarify what this helps with exactly? I was unable to find what |
See https://phpstan.org/r/466e6dbe-7e8d-4fae-bfce-6c65b9e69df0 PHPStan does not understand what is inside Either by changing it to |
Interesting! Thanks for sharing. Note that this warning only occurs at level 6 or higher. Currently we use level 1 in our CI pipeline and we'd have many other things to fix before we can get to level 6 (just gave it a try, there are 457 errors at the moment). Anyway, I'm not opposed to this change, but would you mind making a couple of updates?
|
This makes it easier for PHPStan et all to understand that the array will be mixed.
@ob-stripe We run at level 8 🤓 Applied your feedback. |
I'm jealous 😛 Thanks for the PR! Will release this shortly. |
array<string, mixed>
as return type for getJsonBody
Released as 7.17.0. |
This makes it easier for PHPStan et all to understand that the array will be mixed.