-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpKernel] Introduce ExceptionEvent::isKernelTerminating()
to skip error rendering when kernel is terminating
#52128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
VincentLanglet
commented
Oct 18, 2023
•
edited by nicolas-grekas
Loading
edited by nicolas-grekas
Q | A |
---|---|
Branch? | 7.1 |
Bug fix? | no |
New feature? | yes |
Deprecations? | no |
Tickets | Fix #51912 |
License | MIT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I likely misunderstood your proposal but I was expecting the new method on class ExceptionEvent
.
Indeed I thought about it first, then I saw the kernel was accessible in the ExceptionEvent, this would have avoid an extra param. Also, it would have avoid having to think about passing both the kernel and the terminated state. I updated the PR to follow this strategy if it's preferred @nicolas-grekas |
a892f94
to
c9dfb2d
Compare
src/Symfony/Component/HttpKernel/EventListener/ErrorListener.php
Outdated
Show resolved
Hide resolved
Don't miss adding a line to the changelog of the component. |
Should it be in the 6.4 changelog or should I create a 7.1 one ? |
7.1 indeed now |
src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php
Show resolved
Hide resolved
ExceptionEvent::isKernelTerminating()
to skip error rendering when kernel is terminating
76d7513
to
5a1ecf8
Compare
…p error rendering when kernel is terminating
Thank you @VincentLanglet. |
HttpKernel | ||
---------- | ||
|
||
* `ExceptionEvent` now takes an optional `$isKernelTerminating` parameter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we add this to the CHANGELOG instead to the upgrade guide, as this is an optional one?
…er than the upgrade files (xabbuh) This PR was merged into the 7.1 branch. Discussion ---------- [HttpKernel] document added method in the changelog rather than the upgrade files | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | #52128 (comment) | License | MIT Commits ------- d77db34 document added method in the changelog rather than the upgrade files