recurly / recurly-client-php

Recurly PHP Client
http://recurly.com
MIT License
172 stars 93 forks source link

V2 refactor compatibility php 8 plus #749

Closed pabloolvcastro closed 1 month ago

pabloolvcastro commented 1 year ago

Dear Reviewers,

Please review this PR regarding PHP 8+ compatibility. And could you merge it if you feel it meets expectations?

Goal Fix errors and warnings caused by upgrading the runtime PHP version to 8+, keeping compatibility with <=7.4 versions and not changing business logic. You will find the error log file that contains the error I was facing that triggered the making of this PR.

All changes were made based on compatibility check results provided by the tool in the commit 2c76458d972b650e4b2921d43e872d8147a42e34 (this commit is entirely optional and can be removed from the branch if required). Compatibility check results are attached to this PR (you will notice that I left some compatibility check items as they go beyond my initial intention, e.g. PHP has reserved all method names with a double underscore prefix for future use).

This change keeps code compatibility with PHP's previous versions and will work with <= 7.4. The whole test suite was run using PHP 7.4 and PHP 8.1. Test suit execution results can be found attached to this PR.

There are no logic changes in this PR apart from

Supporting files

Fix created for https://github.com/proposify

Ref

637