Description
Describe the bug
The v16.5.0 release notes states that support for advice_code
in the StripeError
object is added:
Add support for
advice_code
onStripeError
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
.
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
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 theadvice_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
Activity