You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
This PR removes the try/finally block in Adapter::call() that previously ensured curl_close($ch) was always called. Since PHP 8.0, CurlHandle is a proper object whose lifetime is managed by PHP's reference-counting GC, making explicit curl_close() a no-op (and deprecated in PHP 8.4/8.5). The error-handling logic and exception-throwing paths are fully preserved; only the now-unnecessary cleanup call is removed.
Confidence Score: 5/5
Safe to merge — the change is correct, minimal, and behavior-preserving on PHP 8.0+.
Removing curl_close() in the finally block is the correct fix for PHP 8.0+ where the call is a no-op and deprecated in 8.4/8.5. All exception-throwing paths are retained unchanged; resource cleanup is handled automatically by object lifetime.
No files require special attention.
Important Files Changed
Filename
Overview
src/Analytics/Adapter.php
Removes try/finally block and curl_close($ch) call from the call() method; cURL handle cleanup is now handled by PHP 8.0+ object lifetime/GC.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Removes calls to
curl_close(). Since PHP 8.0, cURL handles areCurlHandleobjects andcurl_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
php -lon changed PHP files where applicable.curl_close(...)calls remain in this repository.Related PRs and Issues
N/A
Have you read the Contributing Guidelines on issues?
Yes.