You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The v16.5.0 release notes states that support for advice_code in the StripeError object is added:
Add support for advice_code on StripeError
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 as ErrorObject.
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 in PaymentIntent.php as being an ErrorObject, instead of a generic StripeObject, again for code completion and linters.
To Reproduce
Fetch version 16.5.0 (or newer, at least up to 05c7c3a)
Notice how /lib/ErrorObject.php does not define the advice_code field in the class description (PHPDoc)
Notice how in the entire project advice_code is only mentioned once: in the release notes of v16.5.0
Expected behavior
The field advice_code should be defined in the PHPDoc of class ErrorObject in lib/ErrorObject.php
And if possible, the field $last_payment_error in PaymentIntent.php should be defined as an ErrorObject instead of a generic StripeObject
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:
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!
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: