Skip to content

Commit

Permalink
Bump version to 16.5.0-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
prathmesh-stripe committed Dec 20, 2024
1 parent 231848d commit 99912a3
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
```

<img width="417" alt="PHPStorm IDE with array type hints" src="https://github.com/user-attachments/assets/e914dcda-354f-4df2-b82e-217ad931e71d">

### 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`
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.4.0-beta.3
16.5.0-beta.1
2 changes: 1 addition & 1 deletion lib/Stripe.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 99912a3

Please sign in to comment.