Skip to content

Remove deprecated curl_close calls#21

Merged
loks0n merged 1 commit intomainfrom
codex/remove-curl-close-php85
Apr 29, 2026
Merged

Remove deprecated curl_close calls#21
loks0n merged 1 commit intomainfrom
codex/remove-curl-close-php85

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

What does this PR do?

Removes calls to curl_close(). Since PHP 8.0, cURL handles are CurlHandle objects and curl_close() no longer has an effect; handles are released by object lifetime instead. Removing these calls avoids noisy PHP 8.5 deprecation warnings without changing behavior for supported PHP versions.

Test Plan

  • Ran php -l on changed PHP files where applicable.
  • Confirmed no curl_close(...) calls remain in this repository.

Related PRs and Issues

N/A

Have you read the Contributing Guidelines on issues?

Yes.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

This PR removes the curl_close($this->handle) call from Curl::__destruct() to suppress the PHP 8.5 deprecation warning. Since PHP 8.0, CurlHandle objects are freed by their reference count, so setting $this->handle = null is sufficient and correct. The change is minimal, safe, and does not alter behavior on any supported PHP version.

Confidence Score: 5/5

This PR is safe to merge — it removes a deprecated no-op without changing any observable behavior.

Single-line removal of a deprecated function call that has been a no-op since PHP 8.0. No logic, state management, or API surface is affected.

No files require special attention.

Important Files Changed

Filename Overview
src/Adapter/Curl.php Removes the no-op curl_close() call from __destruct(); the remaining $this->handle = null correctly releases the CurlHandle object in PHP 8.0+.

Reviews (1): Last reviewed commit: "Remove deprecated curl_close calls" | Re-trigger Greptile

@loks0n loks0n merged commit 64f2b3a into main Apr 29, 2026
4 checks passed
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.

2 participants