feat: better debug info for PHP messages and repeated fields#12718
feat: better debug info for PHP messages and repeated fields#12718bshaffer wants to merge 7 commits intoprotocolbuffers:mainfrom
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
serializeToJsonStringfunction. 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