Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 refactor compatibility php 8 plus #749

Conversation

pabloolvcastro
Copy link

@pabloolvcastro pabloolvcastro commented Mar 2, 2023

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 125
  • lib/recurly/client.php line 139

Supporting files

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

Ref
#637

@pabloolvcastro pabloolvcastro force-pushed the v2-refactor-compatibility-php-8-plus branch from 2c76458 to c3ebef3 Compare July 4, 2023 19:47
@pabloolvcastro pabloolvcastro force-pushed the v2-refactor-compatibility-php-8-plus branch from c3ebef3 to 8774be9 Compare November 1, 2023 18:41
Pablo Castro added 2 commits May 7, 2024 13:49
The changes promoted by this commit maintain compatibility with previous versions as well. A mix of valid return types with the annotation ReturnTypeWillChange was used to guarantee compatibility, e.g. mixed new type.

Ref
recurly#637
This is an optional commit. It provides tools to help with compatibility checks for PHP 8+.

Ref recurly#637
@pabloolvcastro pabloolvcastro force-pushed the v2-refactor-compatibility-php-8-plus branch from 8774be9 to 922287f Compare May 7, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants