Closed
Description
Adding a condition (using a regex match on the HTTP_HOST of the request) in my routing.yml breaks the WebProfiler router panel.
My routing.yml is as follows :
app:
resource: "@AppBundle/Controller/"
type: annotation
condition: "request.server.get('HTTP_HOST') matches '/dev\.local/'"
The minimum reproducing repo can be found here : https://github.com/brunoroux/symfony-standard/tree/bug/profiler
Accessing : http://dev.local/app_dev.php/_profiler/6ae9ed?panel=router throws a Twig_Error_Runtime :
An exception has been thrown during the rendering of a template ("Unable to get a property on a non-object.") in @WebProfiler/Collector/router.html.twig at line 13.
Edit : Forgot to mention that used version is 2.8