Skip to content

[13.x] Cloud exceptions follow-ups - #62142

Merged
taylorotwell merged 2 commits into
laravel:13.xfrom
timacdonald:13.x-blade-mapper-stale-paths
Oct 22, 2026
Merged

taylorotwell merged 2 commits into
laravel:13.xfrom
timacdonald:13.x-blade-mapper-stale-paths

Conversation

@timacdonald

@timacdonald timacdonald commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Ensures the BladeMapper can work across different renderings of a template. This mostly impacts rendering mail on the queue but isn't impossible to happen with a single web request.


The Cloud exception reporter resolves its BladeMapper once and keeps it for the life of the process. BladeMapper::findCompiledView() caches the compiled paths it knows about with once(), and those paths only include the views being rendered when the first view exception is reported.

Afterwards, a view exception thrown from a different view keeps the compiled cache path and line instead of being mapped back to its Blade source. This affects any process that reports more than one view exception, most notably queue workers rendering mail and notification views. Octane is unaffected, as it flushes once() between requests.

The reporter now resolves the mapper once for each reported exception, and restores the previous mapper after a nested report, as it already does for the view exception flag.

Two tests cover this: one reporting view exceptions from two different views in the same process, and one asserting the mapper is resolved for each reported view exception.

@github-actions

Copy link
Copy Markdown

Thanks for submitting a PR!

Note that draft PRs are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@timacdonald timacdonald changed the title [13.x] Map view exceptions from every view a process renders [13.x] Cloud exceptions follow-ups Oct 22, 2026
@timacdonald
timacdonald force-pushed the 13.x-blade-mapper-stale-paths branch from 1dcad34 to 1b13f12 Compare October 22, 2026 05:32
@timacdonald
timacdonald force-pushed the 13.x-blade-mapper-stale-paths branch from 1b13f12 to 058631e Compare October 22, 2026 05:32
@timacdonald
timacdonald marked this pull request as ready for review October 22, 2026 05:40
@taylorotwell
taylorotwell merged commit 166e838 into laravel:13.x Oct 22, 2026
62 checks passed
@timacdonald
timacdonald deleted the 13.x-blade-mapper-stale-paths branch October 26, 2026 03:29
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.

2 participants