-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: better debug info for PHP messages and repeated fields (#12718)
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. ```php $m = new Google\Protobuf\DoubleValue(); $m->setValue(1.5); var_dump($m); ``` will output ``` object(Google\Protobuf\DoubleValue)#12 (1) { ["value"]=> float(1.5) } ``` Closes #12718 COPYBARA_INTEGRATE_REVIEW=#12718 from bshaffer:php-add-debuginfo c40a6f9 PiperOrigin-RevId: 574115431
- Loading branch information
1 parent
d792703
commit 59d5006
Showing
3 changed files
with
662 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.