Hello, I use SendGrid with PHP 8.5 and got: `Function curl_close() is deprecated since 8.5, as it has no effect since PHP 8.0 in vendor/sendgrid/php-http-client/lib/Client.php`
Activity
alekr-jsausa commentedon Feb 3, 2026
I am running into this issue as well. I think it can be fixed by replacing the offending line with:
to keep compatibility with PHP 7. I'm happy to file a PR for this if that's what is needed to get this fixed.
slipszenko commentedon Feb 6, 2026
This is in a library used by this library, and has a couple of PRs open:
It'd be great to see one of those merged.
andreas-aeschlimann commentedon Feb 8, 2026
If you do not want to downgrade PHP or use an own fork of SendGrid, you can use a drop-in hack into their namespace as follows:
Create a PHP file
Curl.phpsomewhere:Import this file BEFORE the autoload/ClassLoader system, for example in your custom
autoload.php:This works because SendGrid is not using
\curl_close, butcurl_closein their files.esetnik commentedon Jun 18, 2026
sendgrid/php-http-client#176 was merged