-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
HttpException not caught within Browserkit/Client->request #27720
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
Comments
Can you create a minimal example application that allows to reproduce your issue? |
Related to #27516? This was a BC break that has been reverted (see l linked issue.) |
@nicolas-grekas seems so, cause i had the error after removing some bundles (twig and security are two of them) |
This means you should fix your code I suppose, "not a bug"... |
@nicolas-grekas well, i used a original standard edition for demo, dropped twig, and this means all kernel exceptions need to catch by ourself? |
Yes, that's always been the case except in a few 3.4/4.0 versions but that introduced a BC break. You need to register an exception listener (what TwigBundle does) or to catch the exception yourself. |
Can you explain me, what http exception handling has to do with twig? |
TwigBundle, not Twig only. See https://github.com/symfony/symfony/blob/2.8/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml#L140 |
I have the same issue after upgrading from 3.4.11 to 3.4.12. When pages were not found it generated a nice standard error page (https://www.dropbox.com/s/udevmgjwra0p4zf/Screenshot%202018-06-27%2022.12.27.png?dl=0) but now an 500 Internal Server error is returned and the logs show
|
Yep, sorry about that. This behavior might be reintroduced but as a new feature on 4.2 (see #27519) and with an implementation that doesn't break BC. |
You can register an exception listener instead by the way. |
Symfony version(s) affected:3.4.12
Description
After updating from symfony 3.4.11 => 3.4.12 many of our integration tests break, cause Symfony\Component\HttpKernel\Exception get not catched anymore. Instead of a response with 400 in case of BadRequestHttpException, the test failed cause this exception.
The text was updated successfully, but these errors were encountered: