Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

pamuche
Copy link
Contributor

@pamuche pamuche commented Feb 4, 2016

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.

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.
Copy link
Member

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

@javiereguiluz
Copy link
Member

@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.
wouterj added a commit that referenced this pull request Feb 6, 2016
…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
wouterj added a commit that referenced this pull request Feb 6, 2016
@wouterj
Copy link
Member

wouterj commented Feb 6, 2016

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.

@wouterj wouterj closed this Feb 6, 2016
xabbuh added a commit that referenced this pull request Feb 7, 2016
wouterj added a commit that referenced this pull request Feb 7, 2016
This PR was merged into the 2.3 branch.

Discussion
----------

[#6224] some tweaks

Commits
-------

75142a5 [#6224] some tweaks
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.

None yet

4 participants