-
Notifications
You must be signed in to change notification settings - Fork 850
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 PHPDoc return types #1230
Add PHPDoc return types #1230
Conversation
Symfony PHPUnit Bridge has a deprecation helper that warns when things might break in the future. It currently reports the following errors when using Stripe PHP SDK: ``` Method "ArrayAccess::offsetExists()" might add "bool" as a native return type declaration in the future. Do the same in implementation "Stripe\StripeObject" now to avoid errors or add an explicit @return annotation to suppress this message. Method "ArrayAccess::offsetGet()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "Stripe\StripeObject" now to avoid errors or add an explicit @return annotation to suppress this message. Method "ArrayAccess::offsetSet()" might add "void" as a native return type declaration in the future. Do the same in implementation "Stripe\StripeObject" now to avoid errors or add an explicit @return annotation to suppress this message. Method "ArrayAccess::offsetUnset()" might add "void" as a native return type declaration in the future. Do the same in implementation "Stripe\StripeObject" now to avoid errors or add an explicit @return annotation to suppress this message. Method "Countable::count()" might add "int" as a native return type declaration in the future. Do the same in implementation "Stripe\StripeObject" now to avoid errors or add an explicit @return annotation to suppress this message. Method "JsonSerializable::jsonSerialize()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "Stripe\StripeObject" now to avoid errors or add an explicit @return annotation to suppress this message. ``` By adding these PHPDoc types, the problem disappears. It's also more clear for users of the package. Fixes stripe#1210
So I'll just wait for it to be merged, thanks |
@yejia-stripe What do you think of this? Can it be merged? |
@richardm-stripe will review as they were looking at #1210. |
Any news? |
@dcr-stripe do you have any news? |
Any updates on this? |
Hey everyone, sorry for the radio silence on that one. I'll raise this internally and get you a clearer answer/update next week. |
Sorry for the silence, presently this PR cannot be merged as type errors are causing it to fail CI. I will spend some time to see if it can be repaired. |
Seems to have been an unrelated problem in the particular SHA of the master branch -- merging the latest has fixed the problem. Everything seems to be in order -- thanks for the contribution! |
Thanks, would be great to have this tagged too 🙏 |
Symfony PHPUnit Bridge has a deprecation helper that warns when things might break in the future.
It currently reports the following errors when using Stripe PHP SDK:
By adding these PHPDoc types, the problem disappears. It's also more clear for users of the package.
Fixes #1210