Skip to content

Add proper return type to user context json serialize #250

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

Conversation

samybasset
Copy link
Contributor

Summary

The following indirect deprecation notice is popping up when calling OptimizelyUserContext::jsonSerialize in php 8+:

1x: Method "JsonSerializable::jsonSerialize()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "Optimizely\OptimizelyUserContext" now to avoid errors or add an explicit @return annotation to suppress this message.

To remove the notice, the proper return type is added.

The following indirect deprecation notice is popping up when calling OptimizelyUserContext::jsonSerialize in php 8+:

1x: Method "JsonSerializable::jsonSerialize()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "Optimizely\OptimizelyUserContext" now to avoid errors or add an explicit @return annotation to suppress this message.
@russell-loube-optimizely
Copy link
Contributor

Hi Samy, I apologize for the extremely prolonged reply and lack of acknowledgement. Thank you for raising this.

I'll open an internal ticket to get reviewed with our team.

@russell-loube-optimizely
Copy link
Contributor

I have created an internal ticket with our Developer Experience team (FSSDK-8940 for your reference) currently awaiting review.

@samybasset
Copy link
Contributor Author

That's okay, thanks for picking this up. Not sure if you are the right person to ask, but is the team also going to make the Optimizely SDK php 8.2 ready? We are dropping the dependency for now since it is raising all kinds of issues that blocks our upgrade. Would love to add it again 😄

@russell-loube-optimizely
Copy link
Contributor

Hi @samybasset , I'll discuss with our Developer Experience team regarding making the Optimizely SDK compatible with PHP 8.2. I unfortunately can't comment on prioritization or timelines at the moment but will consult our team this week.

I'll let you know as soon as I have more information. Thank you for your patience.

@russell-loube-optimizely
Copy link
Contributor

Hi @samybasset , I'm happy to share that one of our developers is looking into technical feasibility of supporting PHP 8.2 now. I hope to give you an update in about 2 weeks at the end of our current sprint.

We unfortunately still haven't been able to prioritize the original issue reported, but we have reviewed it as a team. I'll do my best to see if we can get it prioritized over the coming weeks and will update you accordingly.

@mikechu-optimizely
Copy link
Contributor

We've outlined the requirements for our developer to accomplish (pretty simple) update. Of course, we have to walk this properly through our development and release SOP.

Thanks for hanging in there with us.

@rafinutshaw-optimizely
Copy link
Contributor

rafinutshaw-optimizely commented Mar 29, 2023

Hi @samybasset, thanks for hanging on there. We just released a patch which should cover your change request please look into it and let us know how it goes.
Also we are working on full testing and support for php 8.2.

@mikechu-optimizely
Copy link
Contributor

@samybasset We've released a version that includes your suggestion from this PR. Thanks for the help.

@samybasset samybasset deleted the samybasset/add-proper-return-type-to-optimizely-user-context-json-serialize branch April 12, 2023 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy