Repository navigation
[14.x] Fix report() passing a null log level to the exception handler - #61750
Merged
taylorotwell merged 2 commits intoSep 27, 2026
Merged
taylorotwell merged 2 commits into
taylorotwell merged 2 commits into
Conversation
binaryfire
added a commit
to hypervel/components-backup
that referenced
this pull request
Oct 1, 2026
The report() helper always passed its level to the exception handler, even when none was given. Handler mocks that expect the exception and context alone no longer matched report($e) or report($e, $context). The helper now passes the level only when one is given. report_if() and report_unless() go through report(), so they behave the same way. The handler expectations that had been changed to expect a trailing null level go back to the upstream two-argument form. Validation: the upstream helper test is ported. The changed test files and the full parallel suite pass. Upstream: laravel/framework#61750 Source: laravel/framework at 588c1c948c36443a6110c44a07bb58c463e98d27.
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.
Since #61694 the
report()helper always passes a third$levelargument to the exception handler, even when no level is given. Anything that mocks the handler with the arguments it expects now fails:This is why the test suite on master has been failing since that PR, in
ThrottlesExceptionsTest,ThrottlesExceptionsWithRedisTest,ValidationNotPwnedVerifierTestandImplicitRouteBindingTest. Applications with similar expectations in their own tests would run into the same thing after upgrading.This only passes the level when one is given, so
report($e)andreport($e, $context)call the handler exactly as before, whilereport($e, $context, LogLevel::WARNING)still forwards the level.report_if()andreport_unless()go throughreport(), so they're covered too.