-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Note to create a service if you extend ExceptionController #6224
Conversation
I had some trouble to get the custom exception handling with inheritance of ExceptionController working, because I hadn't a clue to make a service out of the ExceptionController of the TwigBundle.
.. note:: | ||
|
||
In case of extending the :class:`Symfony\\Bundle\\TwigBundle\\Controller\\ExceptionController` | ||
you may configure a service to pass the twig-Environment and the debug-Flag to the constructor. |
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 would replace this:
twig-Environment and the debug-Flag
by this:
Twig environment and the ``debug`` flag
@pamuche thanks for your contribution. We love comments from people who followed the docs and faced problems or didn't know how to continue. I've left some comments when reviewing your changes, but overall they look OK to me. Thanks! |
Thank you for your recommendations. It helps me to contribute better additions to the docs in the future.
…r (pamuche) This PR was submitted for the 3.0 branch but it was merged into the 2.3 branch instead (closes #6224). Discussion ---------- Note to create a service if you extend ExceptionController I had some trouble to get the custom exception handling with inheritance of ExceptionController working, because I hadn't a clue to make a service out of the ExceptionController of the TwigBundle. Commits ------- fff23f7 Note to create a service if you extend ExceptionController
Thank you @pamuche for creating this PR and your quick response to the review! I've merged your pull request into the 2.3 version of the docs (that's the oldest version we maintain) and will merge it up to master from there. After the merge, I've fixed indentation (4 spaces) and added the XML and PHP format for the service in 3b0ea60. Feel free to comment if you have any more questions. |
I had some trouble to get the custom exception handling with inheritance of ExceptionController working, because I hadn't a clue to make a service out of the ExceptionController of the TwigBundle.