Skip to content

Deprecations regarding curl_close in Stripe PHP for PHP 8.5 #1814

@clytras

Description

@clytras

Cashier Stripe Version

16.1

Laravel Version

12.0

PHP Version

8.5

Database Driver & Version

No response

Description

Stripe PHP v17.3.0 uses deprecated PHP 8.5 curl_close function and it shows in logs and in tests on deprecation log levels.

PHP Deprecated:  Function curl_close() is deprecated since 8.5, as it has no effect since PHP 8.0 in /var/www/html/vendor/stripe/stripe-php/lib/HttpClient/CurlClient.php on line 761
PHP Stack trace:
PHP   1. Stripe\HttpClient\CurlClient->__destruct() /var/www/html/vendor/stripe/stripe-php/lib/HttpClient/CurlClient.php:0
PHP   2. Stripe\HttpClient\CurlClient->closeCurlHandle() /var/www/html/vendor/stripe/stripe-php/lib/HttpClient/CurlClient.php:80

This issue if fixed in stripe/stripe-php v19.1.0 (stripe/stripe-php#1973 Remove deprecated usage of curl_close() for PHP versions > 8.0).

How safe is it to upgrade to latest Stripe package? Is there any refactoring path or key compatibility points that need to be checked and addressed? I see that Stripe SDK v19.0.0 has changed API version to 2025-11-17.clover.

Steps To Reproduce

$user = $request->user();

// Ensure user is a Stripe customer
if (!$user->hasStripeId()) {
    $user->createAsStripeCustomer();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions