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

Deprecation notices on v3.13.0 and PHP 8.1.14 #48

Open crmpicco opened 1 year ago

crmpicco commented 1 year ago

Following on from https://github.com/chargebee/chargebee-php/issues/40, I am experiencing a whole bunch of deprecation notices in my application originating from the chargebee/chargebee-php project.

User Deprecated: Method "Countable::count()" might add "int" as a native return type declaration in the future. Do the same in implementation "ChargeBee\ChargeBee\ListResult" now to avoid errors or add an explicit @return annotation to suppress this message. 

User Deprecated: Method "ArrayAccess::offsetSet()" might add "void" as a native return type declaration in the future. Do the same in implementation "ChargeBee\ChargeBee\ListResult" now to avoid errors or add an explicit @return annotation to suppress this message. 

User Deprecated: Method "ArrayAccess::offsetUnset()" might add "void" as a native return type declaration in the future. Do the same in implementation "ChargeBee\ChargeBee\ListResult" now to avoid errors or add an explicit @return annotation to suppress this message. 

I am on v3.13.0 and PHP 8.1.14.

nicozarris commented 1 year ago

Any updates on this? I get the same error.

cb-khushbubibay commented 1 year ago

Hi @nicozarris @crmpicco Could you help us with below information : 1 - What version of php. 2- What is version of chargebee-php.

I tried to reproduce this issue in my local with the php version PHP 8.1.19 and chargebee-php v3.13.0 version. But this deprecation issue is not reproducible.

crmpicco commented 1 year ago

Hi @cb-khushbubibay , I am on v3.13.0 and PHP 8.1.14.

crmpicco commented 5 months ago

I have now upgraded to PHP 8.2 and I am on version v.3.26.0 and i'm still hitting this issue. This is an example of the output:

User Deprecated: Method "Countable::count()" might add "int" as a native return type declaration in the future. Do the same in implementation "ChargeBee\ChargeBee\ListResult" now to avoid errors or add an explicit @return annotation to suppress this message. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Method \"Countable::count()\" might add \"int\" as a native return type declaration in the future. Do the same in implementation \"ChargeBee\\ChargeBee\\ListResult\" now to avoid errors or add an explicit @return annotation to suppress this message. at /var/www/crmpicco/vendor/symfony/error-handler/DebugClassLoader.php:331)"}

@nicozarris Are you also still seeing these notices?