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

Suppress type deprecation warnings for ArrayAccess on PHP 8.1 #12

Closed
wants to merge 1 commit into from

Conversation

enricobono
Copy link

Suppress deprecated function notices when implementing the following methods:

  • ArrayAccess::offsetExists()
  • ArrayAccess::offsetGet()
  • ArrayAccess::offsetSet()
  • ArrayAccess::offsetUnset()

by adding #[\ReturnTypeWillChange], on the entire codebase.

@justinyost
Copy link
Collaborator

Thanks @enricobono noting, we're working on a new 1.2 release that corrects this outstanding issue, that includes this set of fixes here: #13

So I'm going to close this at the moment, but thanks for the PR.

@justinyost justinyost closed this Feb 1, 2023
@enricobono
Copy link
Author

Thank @justinyost! This is a very good news! 😊
Is there any way we can help?

@justinyost
Copy link
Collaborator

Yeah, sure if have the ability/time to check out the branch and review it, that would be always be useful.

You can install it in your consuming project with composer require thewirecutter/paapi5-php-sdk:dev-fully-support-php8.

Otherwise at the moment, I think my branch is about where I wanted it to wind up.

@enricobono
Copy link
Author

Downloaded and tested. It's working on my side.
I just have this warning:

local.WARNING: Creation of dynamic property Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\auth\SignHelper::$config is deprecated in /var/www/html/vendor/thewirecutter/paapi5-php-sdk/src/com/amazon/paapi5/v1/auth/SignHelper.php on line 54

@justinyost
Copy link
Collaborator

@enricobono Thanks so much, I'll get a fix for this incorporated.

justinyost added a commit that referenced this pull request Feb 3, 2023
Noted as an issue here: #12 (comment)

Signed-off-by: Justin Yost <[email protected]>
@justinyost
Copy link
Collaborator

@enricobono Should be resolved with this commit: b2a1d75

@enricobono
Copy link
Author

Downloaded and tested. I confirm it's working. No warnings raised 😊
Thanks, Justin!

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.

3 participants