Skip to content

[12.x] Exclude decorative ASCII art SVG from exception page in non-browser contexts#58580

Merged
taylorotwell merged 3 commits intolaravel:12.xfrom
serhiilabs:fix/exclude-decorative-svg-in-non-browser-contexts
Feb 1, 2026
Merged

[12.x] Exclude decorative ASCII art SVG from exception page in non-browser contexts#58580
taylorotwell merged 3 commits intolaravel:12.xfrom
serhiilabs:fix/exclude-decorative-svg-in-non-browser-contexts

Conversation

@serhiilabs
Copy link
Contributor

The exception renderer includes a ~474KB inline SVG as a decorative ASCII art element at the bottom of the error page. The laravel-ascii-spotlight component renders this SVG twice (~970KB total) for the spotlight mouse-follow effect.

When running tests with constrained memory (memory_limit=128M), rendering this SVG during error page generation can cause memory exhaustion - masking the original exception with a confusing "Allowed memory size exhausted" error.

This change adds a shouldIncludeDecorations() method to the Renderer class that skips the decorative SVG in test and console contexts where it serves no purpose, while preserving the full visual error page for browser rendering.

Fixes #58560

serhiilabs and others added 3 commits February 1, 2026 12:23
…owser contexts

The exception renderer includes a ~474KB inline SVG (rendered twice, ~970KB total) as a decorative ASCII art element. When running tests with constrained memory (memory_limit=128M), rendering this SVG during error page generation can cause memory exhaustion, masking the original exception.

This change adds a shouldIncludeDecorations() method to the Renderer class that skips the decorative SVG in test and console contexts where it serves no purpose, while preserving the full visual error page for browser rendering.
@taylorotwell taylorotwell merged commit 00d6929 into laravel:12.x Feb 1, 2026
56 of 71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error handler's Massive SVG ascii art is causing memory exhaustion on tests

2 participants

Comments