diff --git a/CHANGELOG.md b/CHANGELOG.md index ae291ec38..34ef62903 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 16.5.0-beta.1 - 2024-12-20 +* [#1794](https://github.com/stripe/stripe-php/pull/1794) Improved php type hints + + ### Adds Create/Update/Retrieve/Delete/All/Search parameters + + You will now be able to get type hints of the keys that can passed without switching out of your IDE. Eg. + ```php + * @param null|array{customer:string, components: array} $params + ``` + + PHPStorm IDE with array type hints + + ### Updated StripeObject class properties + We changed the type of class properties from `StripeObject` to something more specific. + + For example: Invoice settings was defined as a StripeObject in Customer resource. + + https://github.com/stripe/stripe-php/blob/bae10cd799404f0f4862ec03810c5ff8ca634b30/lib/Customer.php#L25 + + Now you will be able to reference `custom_fields` and `rendering_options` on `customer->invoice_settings` without PHPStan complaining. + ```php + * @property object{custom_fields: null|object{name: string, value: string}&\Stripe\StripeObject&\stdClass[], default_payment_method: null|string|\Stripe\PaymentMethod, footer: null|string, rendering_options: null|object{amount_tax_display: null|string, template: null|string}&\Stripe\StripeObject&\stdClass}&\Stripe\StripeObject&\stdClass $invoice_settings + */ + ``` + ## 16.4.0-beta.3 - 2024-12-12 * [#1792](https://github.com/stripe/stripe-php/pull/1792) Update generated code for beta * Add support for `allow_redisplay` on `Card` and `Source` diff --git a/VERSION b/VERSION index 191d9ad31..a0131818e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -16.4.0-beta.3 +16.5.0-beta.1 diff --git a/lib/Stripe.php b/lib/Stripe.php index 86d9988a0..4afd3b78d 100644 --- a/lib/Stripe.php +++ b/lib/Stripe.php @@ -64,7 +64,7 @@ class Stripe /** @var float Initial delay between retries, in seconds */ private static $initialNetworkRetryDelay = 0.5; - const VERSION = '16.4.0-beta.3'; + const VERSION = '16.5.0-beta.1'; /** * @return string the API key used for requests