Repository navigation
[14.x] feat: allow per-report log levels - #61694
Merged
Merged
Conversation
Let callers override an individual exception's severity without a global exception-class mapping.
Member
|
I think this is pretty interesting and useful! Right now, the only signal we have is handled vs unhandled, however that is not a great indicator of criticality. It is in indicator that a user had a bad experience, sure, but a handled exception stopping users from signing up is more critical than an unhandled exception that occurs when a random setting hardly anyone touches throws when you toggle it. This would allow us to communicate the business criticality of exceptions, which I'm all for. |
crynobone
pushed a commit
to orchestral/testbench-core
that referenced
this pull request
Sep 26, 2026
Keep Testbench's exception handler compatible with the level-aware report signature introduced by laravel/framework#61694.
binaryfire
added a commit
to hypervel/components-backup
that referenced
this pull request
Oct 1, 2026
Forward an optional log level through the exception handler contract, helpers, testing wrappers and fakes. An explicit report level takes precedence over the exception-type default while preserving report context and cancellation handling. Update handler implementations, generated facade annotations and reporting expectations, and document the public helper argument. Upstream: laravel/framework#61694 Source: laravel/framework master 7068848dfe48fc3a433598e09ce798799d442a52.
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.
Hello!
There's been many times where I've wanted/needed to report an exception with a given level, in light of call-site context, rather than using the global defaults. This PR adds a
levelparameter to the report methods to achieve that---ifnullthen the default behaviour is preserved:cc: @timacdonald
Note
There's a chicken-egg problem here: orchestral/testbench-core#427 is the companion PR
Thanks!