chargebee / chargebee-php

PHP library for the Chargebee API.
https://apidocs.chargebee.com/docs/api?lang=php
MIT License
72 stars 62 forks source link

utf8_encode() is deprecated in PHP 8.2 #47

Closed jszobody closed 1 year ago

jszobody commented 1 year ago

Getting a warning in PHP 8.2:

Function utf8_encode() is deprecated in vendor/chargebee/chargebee-php/lib/ChargeBee/Guzzle.php on line 20
drekinov commented 1 year ago

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

bruno-lp commented 1 year ago

Any updates please ?

SohrabZ commented 1 year ago

We also have the same issue

cb-khushbubibay commented 1 year ago

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.