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

Recursively wrap closures within existing object #131

Open
oojacoboo opened this issue Mar 18, 2023 · 1 comment
Open

Recursively wrap closures within existing object #131

oojacoboo opened this issue Mar 18, 2023 · 1 comment

Comments

@oojacoboo
Copy link

oojacoboo commented Mar 18, 2023

Excellent lib - thanks for this!

I'm not sure if this has been discussed before, but I'm wondering if there is a way to wrap closures nested within an existing object. We're trying to do some caching for a rather large object that includes vendor managed objects and don't have the ability to wrap closures within it directly.

Are there any current plans or docs around this?

Maybe something like this would work with a check on instanceof \Closure... https://gist.github.com/mlconnor/2989980

@frodeborli
Copy link

@oojacoboo I published https://github.com/frodeborli/serializor today, which should handle the scenario you mention.

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

No branches or pull requests

2 participants