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

Skip to content

[ErrorHandler][HttpKernel] Removed ExceptionHandler class, use ErrorHandler instead #32636

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

Closed
wants to merge 1 commit into from

Conversation

yceruto
Copy link
Member

@yceruto yceruto commented Jul 20, 2019

Q A
Branch? 4.4
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets part of #32605
License MIT
Doc PR -

ExceptionHandler's job "converting an exception to a Response object" is now handled by DebugHandlersListener + ErrorRenderer.


$caughtLength = $this->caughtLength = 0;

ob_start(function ($buffer) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this logic is not needed anymore, because we use the very same renderer with or without Symony fullstack, right?

}

if (!headers_sent()) {
header(sprintf('HTTP/1.0 %s', $exception->getStatusCode()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have an equivalent logic in the error-render component?

if (null !== $this->fileLinkFormat) {
$handler->setFileLinkFormat($this->fileLinkFormat);
}
$handler->setExceptionHandler($this->exceptionHandler);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't be $this->exceptionHandler be used instead of $this->errorRenderer below, and decouple the rendering using proper DI?

@yceruto yceruto force-pushed the remove_exception_handler branch from 730969c to 80c760b Compare July 23, 2019 12:38
fabpot added a commit that referenced this pull request Jul 25, 2019
…yceruto)

This PR was squashed before being merged into the 4.4 branch (closes #32637).

Discussion
----------

[ErrorHandler] Decouple from ErrorRenderer component

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | part of #32605
| License       | MIT
| Doc PR        | -

built on top of #32636 (See 2nd commit only)

Commits
-------

8f13fc0 [ErrorHandler] Decouple from ErrorRenderer component
@yceruto
Copy link
Member Author

yceruto commented Jul 28, 2019

I'm closing here since #32637 was merged.

@nicolas-grekas I've added all your comments to my TODO list

@yceruto yceruto closed this Jul 28, 2019
@yceruto yceruto deleted the remove_exception_handler branch August 13, 2019 21:37
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.4 Oct 27, 2019
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.

3 participants