[12.x] Exclude decorative ASCII art SVG from exception page in non-browser contexts#58580
Merged
taylorotwell merged 3 commits intolaravel:12.xfrom Feb 1, 2026
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The exception renderer includes a ~474KB inline SVG as a decorative ASCII art element at the bottom of the error page. The
laravel-ascii-spotlightcomponent 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 theRendererclass 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