chargebee / chargebee-php

PHP library for the Chargebee API.

Home Page:https://apidocs.chargebee.com/docs/api?lang=php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

utf8_encode() is deprecated in PHP 8.2

jszobody opened this issue · comments

Getting a warning in PHP 8.2:

Function utf8_encode() is deprecated in vendor/chargebee/chargebee-php/lib/ChargeBee/Guzzle.php on line 20

Hey, faster than me :)
To be a bit more useful lets reference possible solution as mentioned at https://php.watch/versions/8.2

utf8_encode and utf8_decode Functions Deprecated
PHP 8.2 finally deprecates the utf8_encode and utf8_decode functions that were unfortunately named without noting that they only encode/decode from Latin 1 (ISO-8859-1).

Majority of the PHP applications that use these functions tend to not be aware of this shortcoming. The recommended replacements include the better functionality provided by mbstring, iconv, and intl extensions.

and official php docs https://www.php.net/manual/en/function.utf8-encode.php

Any updates please ?

We also have the same issue

Hi @jszobody , @drekinov , @bruno-lp and @SohrabZ
This issue has been addressed in chargbee-php v3.15.0. Request you to please use that latest version.