liip / LiipMonitorBundle

Integrates the LiipMonitor library into Symfony
http://liip.ch
467 stars 103 forks source link

Allow custom_error_pages check to work in Symfony 4.0+ #243

Closed kbond closed 4 years ago

kbond commented 4 years ago

As described in #242, I believe this check has been broken since 4.0 (false positive in 4.x/5.0 and errors in 5.1).

I removed the code that checks the "exception controller" and just check the configured path for the required templates. If the given path is kernel.project_dir, look for the templates in app/Resources/TwigBundle/views/Exception if using 3.4 and templates/bundles/TwigBundle/Exception if using 4.0+.

kbond commented 4 years ago

@Knallcharge, possible for you to check if this PR fixes your app?

knallcharge commented 4 years ago

Just applied your changes to my files and ran the test: Works for me now using Symfony 5.1 (don't have a Symfony 4.4 project at hand right now, so couldn't test for that version), thanks for the quick fix!