-
Notifications
You must be signed in to change notification settings - Fork 863
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
advice_code
not defined in StripeError
(incorrect release notes for v16.5.0)
#1815
Comments
Hi @LeonMelis thanks for the report, and very sorry for the inconvenience here! Let me look into this and see what is going on. Will be back in touch soon! |
Hi @LeonMelis , sorry for the delay in getting back to you here! It looks like this field was not supposed to be included in our changelog. We are fixing this (see #1819). Sorry again for the trouble here! |
If you need access to |
I understand that I can access that field, but it would be better to describe the field annotations of the I'm not sure whether the Same goes for correctly annotating the |
Hi @LeonMelis totally understand! The GA version of stripe-php does not have type hints like you are describing, but our beta SDK does: #1787. We definitely understand the value of having type annotations here, and we're working to make that happen; in this case, it was an error in the release notes because we usually do not generate changelog entries for things that do not produce a tangible change in the SDK experience. Thanks again for your feedback here, and please jump on that related issue if you want to try out the php SDK with type hints! |
Describe the bug
The v16.5.0 release notes states that support for
advice_code
in theStripeError
object is added:However, it does not seem to be actually added. In fact, searching for
advice_code
in the entire repository only yields one occurrence: the release notes of 16.5.0.Also note that the release notes mention
StripeError
, though in this PHP lib the class is known asErrorObject
.See: https://github.com/stripe/stripe-php/releases/tag/v16.5.0
This field should be added to the PHPDoc of the ErrorObject class, so IDEs and linters can use this.
While we are at it: it would be really helpful to define the
$last_payment_error
inPaymentIntent.php
as being anErrorObject
, instead of a genericStripeObject
, again for code completion and linters.To Reproduce
/lib/ErrorObject.php
does not define theadvice_code
field in the class description (PHPDoc)advice_code
is only mentioned once: in the release notes of v16.5.0Expected behavior
The field
advice_code
should be defined in the PHPDoc of classErrorObject
inlib/ErrorObject.php
And if possible, the field
$last_payment_error
inPaymentIntent.php
should be defined as anErrorObject
instead of a genericStripeObject
Code snippets
OS
n/a
PHP version
n/a
Library version
stripe-php v16.5.0
API version
n/a
Additional context
No response
The text was updated successfully, but these errors were encountered: