-
-
Notifications
You must be signed in to change notification settings - Fork 453
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
Serialize arrays in a readable format instead of just counting the items. #697
Conversation
…lable in the reported events.
…avily for the API limits.
I ran all the things on PHP 7 and it worked fine, as it does in travis. However I see all the failing tests, it appears to me though that the dependencies do not even resolve in e.g. a 5.6 like scrutinizer is running:
How shall we handle this? |
There are already numerous attempts at refactoring this issue. We currently are working on the 2.0 branch for a new release, and we would like to address this issue thoroughly. This approach seems dangerous and not practical to me, since it doesn't take into account the fact that an array can contain any number of things, especially objects, so this PR doesn't seem feasible to me. |
@Jean85 You have a valid point, this is however the reason that I am using print_r and not var_export so one does not run into problems with circular references. I appreciate that object content may be serialized here as well, but how would this be a problem? Is your point that the request might be too big? Regardless, do you have any advice on how we could analyze our issue differently in the meantime before 2.0 is finished? |
We were in fact using an old version and the level was just cut off too early. Bummer I did not see this before trying to cook my own soup. Well, you never stop learning I guess. Thanks for the hint @Jean85 - I'm closing this PR as I agree it is nonsense then. |
We do currently have the problem that we are getting an exception where we can not really reproduce the issue but some of our users are running into the issue. Even though we are able to fail gracefully here, we'd like to resolve the issue.
However, the raven client for PHP serializes arrays in a not very helpful way by just counting the array items, which leads to event data like this:
With the proposed changes this changes to (amongst other points where arrays show up):
Which is evidently much more helpful as we can see the user input and reproduce the problem now.
Would be awesome if we could put that into one of the next releases for the official client so we can switch back to that from our forked one.
I adjusted the tests accordingly, let me know if I should change anything else and keep up the good work!