-
Notifications
You must be signed in to change notification settings - Fork 15.5k
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
feat: better debug info for PHP messages and repeated fields #12718
Conversation
Is the output of Suppose that at some point, we wanted to change the output of |
Thanks @haberman. This is a great question. As __debugInfo has "debug" in the name, I feel like it's self-evident that this behavior shouldn't be relied upon in production systems (and probably isn't being relied upon currently, given the output). However, if a major version bump is coming already, I think it'd make sense to have this be a part of it, for continuity. So, while not strictly necessary to put this behind a major version bump, it would be appropriate to do so. Any update on when this can be merged? |
Ping on this @haberman ! I think this would be a very great improvement for our customers! |
This would have been a huge help when implementing v2 for Cloud Speech a couple weeks ago. @bshaffer thanks for doing this and I hope it gets merged soon. |
(Note, another LGTM was needed after rebase, since review needs to be at head commit to be imported) |
@zhangskz I submitted a fix for the failing tests, could you approve them to run again? |
addresses #12714 by dumping more concise debug info for protobuf messages and repeated fields via the
serializeToJsonString
function. Additionally, message types which serialize into something other than an array (e.g.Google\Protobuf\Value
,Google\Protobuf\Timestamp
, etc) are handled in a special way to make their output consistent with other messages.will output