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

Fixable compatibility issues with PHP 8.2-8.3 #153

Open
unfulvio-godaddy opened this issue Mar 21, 2024 · 0 comments
Open

Fixable compatibility issues with PHP 8.2-8.3 #153

unfulvio-godaddy opened this issue Mar 21, 2024 · 0 comments

Comments

@unfulvio-godaddy
Copy link

Hi,

I'm using v0.0.47 of the SDK but the following seems to be an issue also on the latest version. Some classes seem to assign properties dynamically without declaring them. This has been deprecated in PHP 8.2 (resulting in thrown deprecation notices) and will result in fatal errors in future versions.

https://www.php.net/manual/en/language.oop5.properties.php#language.oop5.properties.dynamic-properties

Here's a partial list of notices I've seen:

  • vendor/cybersource/rest-client-php/lib/Authentication/Core/MerchantConfiguration.php on line 228
  • vendor/cybersource/rest-client-php/lib/ApiClient.php on line 108
  • vendor/cybersource/rest-client-php/lib/ApiClient.php on line 240
  • vendor/cybersource/rest-client-php/lib/Authentication/PayloadDigest/PayloadDigest.php on line 47
  • vendor/cybersource/rest-client-php/lib/Authentication/Http/HttpSignatureGenerator.php on line 78
  • vendor/cybersource/rest-client-php/lib/Authentication/PayloadDigest/PayloadDigest.php on line 47

there might be more

A quick workaround for this could be to add a #[AllowDynamicProperties] attribute at the start of the affected classes until a more robust handling is in place.

https://www.php.net/manual/en/class.allowdynamicproperties.php

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

1 participant