Skip to content

Remove deprecated curl_close() call (no-op since PHP 8.0)#7

Open
lerni wants to merge 1 commit intoespresso-dev:mainfrom
lerni:fix/remove-curl-close
Open

Remove deprecated curl_close() call (no-op since PHP 8.0)#7
lerni wants to merge 1 commit intoespresso-dev:mainfrom
lerni:fix/remove-curl-close

Conversation

@lerni
Copy link
Copy Markdown

@lerni lerni commented Apr 17, 2026

curl_close() has been a no-op since PHP 8.0 (when curl resources were migrated to CurlHandle objects) and is now formally deprecated in PHP 8.5, emitting:

Function curl_close() is deprecated since 8.5, as it has no effect since PHP 8.0

This PR replaces the curl_close($ch) call with a version check following the recommended replacement pattern from php.watch:

  • PHP >= 8.0: unset($ch) to explicitly destroy the CurlHandle object
  • PHP < 8.0: curl_close($ch) to properly free the resource

This maintains backward compatibility with the package's >=5.6 PHP requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant