V2 refactor compatibility php 8 plus #749
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 2c76458 (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
lib/recurly/coupon.php
line 125lib/recurly/client.php
line 139Supporting files
Fix created for
https://github.com/proposify
Ref
#637