From 1c3008556cebf7232f38f23084b816a466d27edb Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Thu, 26 Nov 2026 16:34:19 +0400 Subject: [PATCH 1/2] Fix closure detection in call stack on PHP 8.4+ Since PHP 8.4 closure frames are named like `{closure:Foo::bar():12}`, so the `{closure}` check never matched and the renderer tried to reflect a non-existent method on every closure frame. Assisted-By: Claude Opus 5.5 --- src/Renderer/HtmlRenderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Renderer/HtmlRenderer.php b/src/Renderer/HtmlRenderer.php index e1097df..c764298 100644 --- a/src/Renderer/HtmlRenderer.php +++ b/src/Renderer/HtmlRenderer.php @@ -360,7 +360,7 @@ public function renderCallStack(Throwable $t, array $trace = []): string $function = null; if (!empty($traceItem['function']) && $traceItem['function'] !== 'unknown') { $function = $traceItem['function']; - if (!str_contains($function, '{closure}')) { + if (!str_contains($function, '{closure')) { try { if ($class !== null && class_exists($class)) { $parameters = (new ReflectionMethod($class, $function))->getParameters(); From 720abebf7d268523e4c9ad7ba679bc362010f7c9 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Thu, 26 Nov 2026 16:34:33 +0400 Subject: [PATCH 2/2] Add changelog entry for #194 Assisted-By: Claude Opus 5.5 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9250d0..c01de21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Enh #104, #168: Render exception class PHPDoc description with safe markdown links in HTML debug output (@dbuhonov, @vjik) - Chg #162: Replace deprecated `ThrowableResponseFactory` class usage to new one, and remove it (@vjik) - Enh #163: Explicitly import classes, functions, and constants in "use" section (@mspirkov) +- Bug #194: Fix closure detection in call stack HTML output on PHP 8.4+ (@roxblnfk) ## 4.3.3 November 25, 2026