github stripe/stripe-php v16.5.0-beta.1

pre-release16 hours ago
  • #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.

    * @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.

    stripe-php/lib/Customer.php

    Line 25 in bae10cd

    * @property null|\Stripe\StripeObject $invoice_settings

    Now you will be able to reference custom_fields and rendering_options on customer->invoice_settings without PHPStan complaining.

    * @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
     */

See the changelog for more details.

Don't miss a new stripe-php release

NewReleases is sending notifications on new releases.