-
Notifications
You must be signed in to change notification settings - Fork 30
Suppress jsonSerialize deprecation notice for php 8.1+ #242
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 jsonSerialize deprecation notice for php 8.1+ #242
Conversation
Since php 8.1 internal functions are using proper return types. This results in deprecation notices for some methods. To supress this for php8.1 the ReturnTypeWillChange attribute is introduced. For more info check out https://stitcher.io/blog/new-in-php-81#interal-method-return-types-rfc
hi @msohailhussain, could this PR be reviewed? Thanks in advance 😄 |
Sure let me review it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
@msohailhussain Is there something blocking this pull request? Would we be able to merge this? 😄 |
And please tag a new release as soon as this is merged. Thank you :) |
Next week, we are planning to release. |
@samybasset please sign the CLA https://docs.google.com/forms/d/e/1FAIpQLSf9cbouWptIpMgukAKZZOIAhafvjFCV8hS00XJLWQnWDFtwtA/viewform Your PR is all good, just need your signed CLA. |
Summary
Since php 8.1 internal functions are using proper return types. This results in deprecation notices for some of the methods. To suppress the notice for php8.1+ the proper return type or the new
ReturnTypeWillChange
attribute needs to be added to the method in question. If extending a class or implementing an interface (likeJsonSerializable
), the return type or attribute needs to be added as well. For more info check out https://stitcher.io/blog/new-in-php-81#interal-method-return-types-rfc