Skip to content

PHP 8.5 Deprecation: curl_close() #72

Description

@Soean

When I run DeepL with PHP 8.5, I get a deprecation notice.

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

See https://www.php.net/manual/en/function.curl-close.php

https://github.com/DeepLcom/deepl-php/blob/68d192da11791ae249b35b3a3f87008a1cf1d298/src/HttpClientWrapper.php#L76

We should add a check:

if (PHP_VERSION_ID < 80000) {
   \curl_close($this->curlHandle);
}

Activity

  1. daniel-jones-dev commented on Dec 9, 2025

    @daniel-jones-dev
    Contributor

    Hi @Soean, I noticed this recently too, thanks for suggesting a fix. I'll add it in soon.

  2. Stirreg commented on Feb 27, 2026

    @Stirreg

    Hi @daniel-jones-dev I was wondering if there's an indication of when this will be fixed? Would it help if I open a PR with the suggested fix?

  3. daniel-jones-dev commented on Mar 12, 2026

    @daniel-jones-dev
    Contributor

    Hey sorry for the delay, and thanks for the reminder. The fix in main now, we'll tag a new release soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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