8000 minor #18059 [WebProfilerBundle] fix context log pre wrap (HeahDude) · symfony/symfony@464a492 · GitHub
[go: up one dir, main page]

Skip to content

Commit 464a492

Browse files
committed
minor #18059 [WebProfilerBundle] fix context log pre wrap (HeahDude)
This PR was squashed before being merged into the 3.1-dev branch (closes #18059). Discussion ---------- [WebProfilerBundle] fix context log pre wrap | Q | A | ------------- | --- | Branch | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | - Commits ------- 6b23861 [WebProfilerBundle] fix context log pre wrap
2 parents 117d83b + 6b23861 commit 464a492

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,7 @@ table.logs .metadata .context {
827827
table.logs .metadata .context pre {
828828
margin: 5px 0;
829829
padding: 5px 10px;
830+
white-space: pre-wrap;
830831
}
831832

832833
table.logs .sf-call-stack {

src/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ public function exportValue($value, $depth = 1, $deep = false)
5858
return sprintf("[\n%s%s\n%s]", $indent, implode(sprintf(", \n%s", $indent), $a), str_repeat(' ', $depth - 1));
5959
}
6060

61-
return sprintf('[%s]', implode(', ', $a));
61+
$s = sprintf('[%s]', implode(', ', $a));
62+
63+
if (80 > strlen($s)) {
64+
return $s;
65+
}
66+
67+
return sprintf("[\n%s%s\n]", $indent, implode(sprintf(",\n%s", $indent), $a));
6268
}
6369

6470
if (is_resource($value)) {

0 commit comments

Comments
 (0)
0