Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

VincentLanglet
Copy link
Contributor

@VincentLanglet VincentLanglet commented Oct 18, 2023

Q A
Branch? 7.1
Bug fix? no
New feature? yes
Deprecations? no
Tickets Fix #51912
License MIT

Copy link
Member

@nicolas-grekas nicolas-grekas left a 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.

@VincentLanglet VincentLanglet changed the title Introduce isTerminated method to skip error rendering when kernel is terminated Introduce ExceptionEvent::isKernelTerminated method to skip error rendering when kernel is terminated Oct 18, 2023
@VincentLanglet
Copy link
Contributor Author

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

@carsonbot carsonbot changed the title Introduce ExceptionEvent::isKernelTerminated method to skip error rendering when kernel is terminated [HttpKernel] Introduce ExceptionEvent::isKernelTerminated method to skip error rendering when kernel is terminated Oct 18, 2023
@nicolas-grekas
Copy link
Member

Don't miss adding a line to the changelog of the component.

@VincentLanglet
Copy link
Contributor Author

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 ?

@nicolas-grekas
Copy link
Member

7.1 indeed now

@nicolas-grekas nicolas-grekas changed the title [HttpKernel] Introduce ExceptionEvent::isKernelTerminated method to skip error rendering when kernel is terminated [HttpKernel] Introduce ExceptionEvent::isKernelTerminating() to skip error rendering when kernel is terminating Oct 18, 2023
@VincentLanglet VincentLanglet force-pushed the terminated branch 2 times, most recently from 76d7513 to 5a1ecf8 Compare October 18, 2023 10:22
…p error rendering when kernel is terminating
@fabpot
Copy link
Member

fabpot commented Nov 23, 2023

Thank you @VincentLanglet.

@fabpot fabpot merged commit 638f7d0 into symfony:7.1 Nov 23, 2023
HttpKernel
----------

* `ExceptionEvent` now takes an optional `$isKernelTerminating` parameter
Copy link
Contributor

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?

nicolas-grekas added a commit that referenced this pull request Nov 24, 2023
…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
@fabpot fabpot mentioned this pull request May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[HttpKernel] ErrorListener::onKernelException should ignore exception thrown after kernel.terminate
5 participants