-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix #282: Fix dumper #283
Fix #282: Fix dumper #283
Conversation
samdark
commented
Sep 25, 2024
Q | A |
---|---|
Is bugfix? | ✔️ |
New feature? | ❌ |
Breaks BC? | ❌ |
@olegbaturin would you please test it? |
@@ -56,7 +56,7 @@ public function asJson(int $depth = 50, bool $format = false): string | |||
public function asJsonObjectsMap(int $depth = 50, bool $prettyPrint = false): string | |||
{ | |||
$this->buildObjectsCache($this->variable, $depth); | |||
return $this->asJsonInternal($this->objects, $prettyPrint, $depth, 1, true); | |||
return $this->asJsonInternal($this->objects, $prettyPrint, 2, 1, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be that 2 is more than enough and 1 would do as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 would do as well
2 is min, because property of the root object, that is object, must be converted to the expected string
Line 150 in 90bb196
if ($depth <= $level || array_key_exists($variable::class, $this->excludedClasses)) { |
but this works only if dumped variable object or function, if it's an array, than it must be dumped deeper (or no?
).
@xepozz seem to fail tests. |
|
@samdark I've added some tests for dumping of loop and one test for your solution. If you show me expected results for those cases, I can make a fix. |
this fixes the issue, but changes some dumped structures, |
@xepozz need your help with expected results. |
https://github.com/olegbaturin/yii3-debug/tree/282-fix-dumper @samdark, @xepozz check the output to |
@olegbaturin I like your fix more. |