Skip to content

curl_close() deprecated warning in PHP 8.5 #355

@daveo91

Description

@daveo91

While running the SDK on PHP 8.5 I’m seeing a deprecation warning originating from curl_close():

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

This triggers every time the SDK makes a request.

From PHP 8.0 onward, cURL handles are automatically closed when they fall out of scope, and curl_close() no longer does anything. As of PHP 8.5 the function is formally deprecated.

Would it be possible to remove or conditionally guard the call to curl_close() to avoid triggering warnings in PHP 8.5?

This seems to be the main line causing the issue (excluding tests);

curl_close($this->_handle);

Environment details:

  • PHP version: 8.5.0
  • SDK Version: 6.30.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions