Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

eWAY Rapid PHP — PHP 8.5 compatibility patch

Compatibility patch for eway/eway-rapid-php when used with PHP 8.5, including Magento 2.4.9 installations.

Problem

PHP 8.5 deprecates curl_close().

eway/eway-rapid-php explicitly calls curl_close() in Rapid\Service\Http\Curl::close(), which results in a deprecation warning when running the package on PHP 8.5.

Fix

The patch replaces:

curl_close($this->handler);

with:

$this->handler = null;

Since cURL handles have been represented by CurlHandle objects since PHP 8.0, releasing the reference allows the handle to be cleaned up without calling the deprecated curl_close() function.

Compatibility

This patch was created while upgrading a Magento installation to:

  • Magento 2.4.9
  • PHP 8.5
  • eway/eway-rapid-php

Composer

The patch can be applied to the eway/eway-rapid-php package using a Composer patches plugin.

Example:

{
    "extra": {
        "patches": {
            "eway/eway-rapid-php": {
                "curl_close deprecated": "https://raw.githubusercontent.com/magenable/eway-rapid-php-php85-patch/master/eway-rapid-php-php8-curl-close-issue.patch"
            }
        }
    }
}

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors