Repository navigation
Pre-release 4.2.117 → 4.2.116 — task 4.5 (error handling): v13 report/render API in the exception Handler - #89
Merged
Merged
Conversation
agissept
force-pushed
the
pre-release/4.2.117
branch
from
September 30, 2026 10:37
5c7de70 to
59b0325
Compare
agissept
force-pushed
the
pre-release/4.2.117
branch
4 times, most recently
from
October 2, 2026 06:48
ee8fd0f to
dfea34a
Compare
agissept
marked this pull request as ready for review
October 2, 2026 06:56
… 4.5) The Handler reports and renders the way v13's Foundation Handler does, so an app's error handling written against it keeps its meaning after the flip: - reportable() (a ReportableHandler: typed by its first parameter, false or stop() ends reporting), dontReport(), stopIgnoring() and v13's internal don't-report list. report() runs the exception's own report(), then the callbacks, then logs the message with the exception (and userId) as context. - renderable() callbacks run in registration order, first response wins, after the exception's own render()/Responsable and prepareException() (ModelNotFound -> 404, TokenMismatch -> 419, ...). An HttpResponseException answers with its response; anything else falls back to the displayers, as before. - handleException() reports, then renders the current request; the worker adapter reports and renders through the same methods. - Foundation\Configuration\Exceptions, v13's withExceptions() object, with render/report/dontReport/stopIgnoring. - App::error(), pushError(), missing() and fatal() go, with the newest-first handler list behind them: v13 has none of them. Tinker's silencing handler becomes a render callback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0169SsatCE8LhaTsQTPiGtVo
agissept
force-pushed
the
pre-release/4.2.117
branch
from
October 2, 2026 06:56
dfea34a to
2ce12b3
Compare
agissept
approved these changes
Oct 2, 2026
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.
Task 4.5, error handling — v13 report/render API in the exception
HandlerStacks on #88. The fork's exception
Handlerreports and renders the way v13'sFoundation\Exceptions\Handlerdoes. The app can then register its error handling through v13's API now, and after the flipbootstrap/app.php'swithExceptions()hands the same registration to v13's own handler. So what gets rendered and reported doesn't change at the flip.Changes
Illuminate\Exception\Handler, following v13's semantics:reportable()returns aReportableHandler(v13's class, added under v13's name). Its callback is matched by its first parameter's type, including union types. Returningfalse, or calling->stop(), ends reporting.dontReport(),stopIgnoring()and v13's internal don't-report list:HttpException,TokenMismatchException,ModelNotFoundException,ValidationException, Symfony's request exceptions, and the rest.report()calls the exception's ownreport()if it has one, then the callbacks. Finally it logs the message, with the exception (anduserId) as context.render()calls the exception's ownrender()(orResponsable) first, thenprepareException():ModelNotFound→ 404,TokenMismatch→ 419HttpException, and so on.renderable()callbacks run in registration order, and the first response wins.HttpResponseExceptionanswers with its response. Anything else falls back to the plain/debug displayers, as before.handleException()reports, then renders the current request. If a callback throws, what it throws is displayed, as before.ExceptionHandlerAdapterreports and renders through the same methods (it usedhandleConsole()).Illuminate\Foundation\Configuration\Exceptions: v13'swithExceptions()object, under v13's name, withrender(),report(),dontReport()andstopIgnoring().App::error(),pushError(),missing()andfatal(), and the newest-first handler list behind them. v13 has none of them.TinkerCommand's silencing handler becomes a render callback.HandlerTestis rewritten for the new API. It covers ordering, null fall-through,prepareException(), the request argument,HttpResponseException, the displayer fallbacks, logging, the don't-report lists, report callbacks andstop(), the exception's ownreport(), theExceptionsobject and the worker adapter.QueueForkBridgeTestexpectsreport().Not in this PR
App::down()(maintenance), and theApp::before()/after()global filters, are the next slice.Illuminate\Exceptionnamespace stay until the flip, soilluminate/exceptionstays inreplace.Verification
feature/platform/framework-4.2.117-rc1) moves itsApp::errorhandlers onto this API. It ran with vendor installed exactly from its lock and the local SMTP sink on127.0.0.1:1025:Application::handle()outside the testing environment renders the app's 404 page, and its JSON 404 for anapi/URL.Tag
4.2.117on5c7de70ais not pushed; tag pushes are refused for this session.🤖 Generated with Claude Code
https://claude.ai/code/session_0169SsatCE8LhaTsQTPiGtVo