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

Issue with PHP 8.1 #117

Open
devdeepcoderin opened this issue Nov 16, 2022 · 1 comment
Open

Issue with PHP 8.1 #117

devdeepcoderin opened this issue Nov 16, 2022 · 1 comment

Comments

@devdeepcoderin
Copy link

Getting below error when using PHP 8.1,

offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/cybersource/rest-client-php/lib/Model/GeneratePublicKeyRequest.php on line 221

is there any other LIB i need to use ?

@TechN8
Copy link

TechN8 commented Jan 19, 2023

This seems to be the same issue as mentioned in #89 .

PHP 8.1 is warning that the return type of the functions doesn't match that of the base class they are extending / using.

If you don't need to maintain backwards compatibility to PHP5, the return types can be added.

To maintain backwards compatibility (at least until these warnings become errors). These warnings can be suppressed by adding #[\ReturnTypeWillChange] to the doc blocks in your mustache files and regenerating the code. Example model_generic.mustache

If this isn't something you plan to change soon, would you be open to a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants