@@ -33,7 +33,8 @@ depending on your needs:
33
33
#. If you just want to change the contents and styles of the error pages to match
34
34
the rest of your application, :ref: `override the default error templates <use-default-error-controller >`;
35
35
36
- #. If you want to change the contents of non-HTML error output, :ref: `create a new normalizer <overriding-non-html-error-output >`;
36
+ #. If you want to change the contents of non-HTML error output,
37
+ :ref: `create a new normalizer <overriding-non-html-error-output >`;
37
38
38
39
#. If you also want to tweak the logic used by Symfony to generate error pages,
39
40
:ref: `override the default error controller <custom-error-controller >`;
@@ -47,9 +48,9 @@ depending on your needs:
47
48
Overriding the Default Error Templates
48
49
--------------------------------------
49
50
50
- You can use the built-in Twig error renderer to easily override the default error templates.
51
- Both the TwigBundle and TwigBridge need to be installed for this.
52
- Run this command to ensure both are installed:
51
+ You can use the built-in Twig error renderer to override the default error
52
+ templates. Both the TwigBundle and TwigBridge need to be installed for this. Run
53
+ this command to ensure both are installed:
53
54
54
55
.. code-block :: terminal
55
56
@@ -191,10 +192,14 @@ To override non-HTML error output, the Serializer component needs to be installe
191
192
192
193
$ composer require serializer
193
194
194
- The Serializer component has a built-in ``FlattenException `` normalizer (``ProblemNormalizer ``) and JSON/XML/CSV/YAML
195
- encoders by default. That means that if an exception were to be thrown in your application, Symfony can output it in
196
- a format supported by one of the encoders. If you want to change how the output is structured, all you have to do
197
- is create a new Normalizer that supports the ``FlattenException `` input::
195
+ The Serializer component has a built-in ``FlattenException `` normalizer
196
+ (``ProblemNormalizer ``) and JSON/XML/CSV/YAML encoders. When your application
197
+ throws an exception, Symfony can output it in one of those formats. If you want
198
+ to change the output contents, create a new Normalizer that supports the
199
+ ``FlattenException `` input::
200
+
201
+ # src/App/Serializer/MyCustomProblemNormalizer.php
202
+ namespace App\Serializer;
198
203
199
204
class MyCustomProblemNormalizer implements NormalizerInterface
200
205
{
0 commit comments