Skip to content

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

Merged
merged 1 commit into from
May 11, 2022
Merged

Suppress jsonSerialize deprecation notice for php 8.1+ #242

merged 1 commit into from
May 11, 2022

Conversation

samybasset
Copy link
Contributor

@samybasset samybasset commented Apr 12, 2022

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 (like JsonSerializable ), 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

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
@samybasset
Copy link
Contributor Author

hi @msohailhussain, could this PR be reviewed? Thanks in advance 😄

@msohailhussain
Copy link
Contributor

hi @msohailhussain, could this PR be reviewed? Thanks in advance 😄

Sure let me review it.

Copy link
Contributor

@msohailhussain msohailhussain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

@samybasset
Copy link
Contributor Author

@msohailhussain Is there something blocking this pull request? Would we be able to merge this? 😄

@ruudk
Copy link

ruudk commented May 3, 2022

And please tag a new release as soon as this is merged. Thank you :)

@msohailhussain
Copy link
Contributor

Next week, we are planning to release.

@msohailhussain
Copy link
Contributor

msohailhussain commented May 4, 2022

@samybasset please sign the CLA https://docs.google.com/forms/d/e/1FAIpQLSf9cbouWptIpMgukAKZZOIAhafvjFCV8hS00XJLWQnWDFtwtA/viewform

Your PR is all good, just need your signed CLA.

@msohailhussain msohailhussain merged commit 5580a9a into optimizely:master May 11, 2022
@samybasset samybasset deleted the samybasset/add-return-type-will-change-attribute-to-json-serialize-method branch May 11, 2022 08:35
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