Skip to content

[TwigBundle] Only remove kernel exception listener if twig is used #38350

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
Oct 1, 2020

Conversation

dmolineus
Copy link
Contributor

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets contao/contao#1527
License MIT
Doc PR

In a setup using the template engine but not twig as the template engine no exceptions are logged. This is caused by the twig-bundle which removes the exception_listener service. For my understanding this should only happen if twig is used as template engine. This PR fixes the logic that only for the case where twig is enabled as template engine the http kernel exception listener is removed. Otherwise the twig exception listener got removed now.

Disclaimer: I'm not too deep into the details, so maybe I oversee something why it's implemented the way it is.

@nicolas-grekas nicolas-grekas changed the title Only remove kernel exception listener if twig is used [TwigBundle] Only remove kernel exception listener if twig is used Oct 1, 2020
@nicolas-grekas nicolas-grekas force-pushed the fix/exception-listener branch from 7fc2952 to 7c34f6e Compare October 1, 2020 13:17
@nicolas-grekas
Copy link
Member

Thank you @dmolineus.

@nicolas-grekas nicolas-grekas merged commit dadce4b into symfony:4.4 Oct 1, 2020
@dmolineus dmolineus deleted the fix/exception-listener branch October 1, 2020 19:33
This was referenced Oct 4, 2020
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.

5 participants