Skip to content

Commit 23996a7

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: (29 commits) fix tests add missing method fix merge fix test fix merge fix test change test to use a real ObjectManager [Mailer] Document the usage of custom headers in Infobip bridge [SecurityBundle] Add `provider` XML attribute to the authenticators it’s missing from [DoctrineBridge] Test reset with a true manager Sync php-cs-fixer config file with 7.2 [HttpClient] Fix parsing SSE [Notifier] Fix thread key in GoogleChat bridge [HttpKernel][Security] Fix accessing session for stateless request [Serializer] Fix `ObjectNormalizer` with property path test handling of special "value" constraint option [PhpUnitBridge] Add missing import [FrameworkBundle] Fix setting default context for certain normalizers [57251] Missing translations for Romanian (ro) [ErrorHandler] Fix rendered exception code highlighting on PHP 8.3 ...
2 parents 82eb27b + c9b7cc0 commit 23996a7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ErrorRenderer/HtmlErrorRenderer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,10 @@ private function fileExcerpt(string $file, int $line, int $srcContext = 3): stri
252252
if (\PHP_VERSION_ID >= 80300) {
253253
// remove main pre/code tags
254254
$code = preg_replace('#^<pre.*?>\s*<code.*?>(.*)</code>\s*</pre>#s', '\\1', $code);
255-
// split multiline code tags
256-
$code = preg_replace_callback('#<code ([^>]++)>((?:[^<]*+\\n)++[^<]*+)</code>#', fn ($m) => "<code $m[1]>".str_replace("\n", "</code>\n<code $m[1]>", $m[2]).'</code>', $code);
257-
// Convert spaces to html entities to preserve indentation when rendered
258-
$code = str_replace(' ', '&nbsp;', $code);
255+
// split multiline span tags
256+
$code = preg_replace_callback('#<span ([^>]++)>((?:[^<\\n]*+\\n)++[^<]*+)</span>#', function ($m) {
257+
return "<span $m[1]>".str_replace("\n", "</span>\n<span $m[1]>", $m[2]).'</span>';
258+
}, $code);
259259
$content = explode("\n", $code);
260260
} else {
261261
// remove main code/span tags

Resources/assets/css/exception.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ header .container { display: flex; justify-content: space-between; }
349349
.trace-code li { color: #969896; margin: 0; padding-left: 10px; float: left; width: 100%; }
350350
.trace-code li + li { margin-top: 5px; }
351351
.trace-code li.selected { background: var(--trace-selected-background); margin-top: 2px; }
352-
.trace-code li code { color: var(--base-6); white-space: nowrap; }
352+
.trace-code li code { color: var(--base-6); white-space: pre; }
353353

354354
.trace-as-text .stacktrace { line-height: 1.8; margin: 0 0 15px; white-space: pre-wrap; }
355355

0 commit comments

Comments
 (0)