Skip to content

v8.0.2 - Fix PHP 8.5 Deprecation Warning

Latest

Choose a tag to compare

@cl77 cl77 released this 26 Nov 04:57
274e477

πŸ› Bug Fix

Removed Deprecated curl_close() Call

Problem:

  • PHP 8.5 introduced a deprecation warning for curl_close()
  • The function has had no effect since PHP 8.0 (curl handles are automatically closed)
  • Users upgrading to PHP 8.5 would see deprecation warnings in their logs

Solution:

  • Removed the unnecessary curl_close($ch) call from Client::request()
  • Since this project requires PHP >=8.2, the call was both unnecessary and problematic
  • No functional changes - curl handles are automatically cleaned up

Impact:

  • βœ… No more deprecation warnings in PHP 8.5+
  • βœ… Cleaner code without unnecessary function calls
  • βœ… No breaking changes for existing code

Files Changed:

  • src/Client.php

Credits:
Thanks to @justpilot for identifying this issue in #22 and proposing the initial fix!

Closes #22