Skip to content

Remove deprecated curl_close() for PHP 8.5 compatibility #1177

@mably

Description

@mably

Summary

PHP 8.5 deprecates curl_close() since it has been a no-op since PHP 8.0 (CurlHandle objects are freed automatically when they fall out of scope).

In src/Core/Client/Adapter/Curl.php, the getResponse() method calls curl_close() twice (lines 59 and 67), which triggers the following deprecation warning at runtime:

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

Fix

Simply remove both curl_close($handle) calls in getResponse().

Environment

  • solarium/solarium 6.4.1
  • PHP 8.5.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions