-
Notifications
You must be signed in to change notification settings - Fork 849
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
Fix all phpdoc annotations when they can be null #789
Comments
Looking at https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.yaml it should be doable to automatically fix all these issues. |
@ruudk tagging as future for now. We're working on auto-generating the client library from the openapi spec (we do already for java, ruby, python and node). Once that is shipped we should be able to add the nullability context to the phpdocs. Tagging @ob-stripe who is working on this. |
Cool, that seems like the way to go indeed! Is there a PR to track the progress or an ETA on this? |
No PR or firm ETA just yet no but it's being worked on internally! |
Would it already be possible that I submit a PR to fix some (10-15) of these issues? I'm running https://psalm.dev/ and it complains a lot. |
Hmmm that might conflict with our autogen approach so I'd recommend punting for now. But cc @ob-stripe in case you have more context. |
Hi @ruudk. Really appreciate the offer, but as @remi-stripe mentioned I think it might conflict with our own efforts. We'll try to release a fix for this soon. Thanks for your patience! |
Fixed in v7.8.0 (by #790). All nullable fields should now be marked as such in PHPDoc. |
I'm looking at Card.php:
stripe-php/lib/Card.php
Lines 11 to 18 in b6b8bdd
and I see that all these properties are marked as
string
type. But when I check the documentation, I see that these properties can be eitherstring
ornull
:https://stripe.com/docs/api/cards/object
Is there a full list of all properties and the nullability? I think it would be good to fix all these properties as they can lead to bugs.
The text was updated successfully, but these errors were encountered: