Description
It like theirs is few missing cases on overriding error page :
- PHP errors:
If you have PHP errors like TypeError or Division by zero
Then you can Override theSymfony\Component\HttpKernel\Controller\ErrorController
using the service.yml when in production env.
You will just have the exception to render your page but you still can use Twig.
- Errors that happens before Twig was initialized
This can happen when you do not have a connection to your database for instance.
Then you need to set the template of HtmlErrorRenderer on your kernel :
HtmlErrorRenderer::setTemplate($this->getProjectDir().'/templates/error.html');
- The PHP is not responding (503)
It might be good to mention that you should configure a pure html error page on your upper layers like nginx/apache/traffeik/varnish/...
Note : I'm not sure this the best way to solve this issues but I think the doc should mention that you do not catch 100% of errors with Overriding the Default Error Templates or Overriding the Default ErrorController.