8000 [WebProfiler] adding a condition in routing.yml breaks the router panel · Issue #17342 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[WebProfiler] adding a condition in routing.yml breaks the router panel #17342
Closed
@brunoroux

Description

@brunoroux

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0