Repository navigation
fix: remove the curl_close() call deprecated in PHP 8.5 - #3
Merged
Merged
Conversation
drkjc
requested review from
Samy-O7,
ashkan-spreedly and
britth
and
a balanced review from Copilot
October 19, 2026 19:32
There was a problem hiding this comment.
🟢 Approval recommended
The changes are compatible with the supported PHP versions, existing tests cover request handling, and no blocking issues were identified.
No open issues 🎉
What changed in this PR
Removes a deprecated cURL call from the SDK’s request handling and strengthens PHP compatibility checks.
Changes:
- Remove
curl_close(), relying on automatic handle cleanup. - Add PHP 8.5 to CI.
- Make PHPUnit fail on deprecations, warnings, and notices.
| File | Description |
|---|---|
| src/Utilities.php | Removes the deprecated curl_close() call. |
| phpunit.xml | Enables failure on runtime diagnostics. |
| .github/workflows/ci.yml | Adds PHP 8.5 to the test matrix. |
Review effort: Balanced
Samy-O7
approved these changes
Oct 19, 2026
Samy-O7
left a comment
There was a problem hiding this comment.
Approving. Dropping curl_close() is safe: since PHP 8.0 the handle is a CurlHandle object that's freed when it goes out of scope, and on PHP 8.5 the deprecation notice could end up in the response when display_errors is on. CI now covers PHP 8.2 through 8.5, and failing PHPUnit on deprecations, warnings and notices will catch the next one early.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
curl_close(), which PHP 8.5 deprecates and which has had no effect since PHP 8.0 (the handle is freed when it goes out of scope). On PHP 8.5 every request triggered a deprecation notice, and withdisplay_errorson, the notice was written into the response before the caller's output.