Skip to content

[WebProfiler] File links (event panel) are not resolved using the router #22290

Closed
@matt-usurp

Description

@matt-usurp
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version ~3.2

When viewing the web-profiler event (?panel=events) panel the links against the class names appear to be fixed to a hard-coded route _profile/open?file=xyz instead of being resolved using the router. I believe this might be the case anywhere file links are rendered.

Because of this when I change my development route prefixes to be anything other than the default ones given in a standard Symfony installation these links will 404.

_profiler:
  resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
  prefix: /~dev/profiler

I looked at seeing whether I could implement a fix and noticed that this looks like it might be the issue, although I don't have the confidence to make this change.

<argument>/_profiler/open?file=%%f&amp;line=%%l#line%%l</argument>

<service id="debug.file_link_formatter" class="Symfony\Component\HttpKernel\Debug\FileLinkFormatter" public="false">
  <argument>%debug.file_link_format%</argument>
  <argument type="service" id="request_stack" on-invalid="ignore" />
  <argument>null</argument>
  <argument>/_profiler/open?file=%%f&amp;line=%%l#line%%l</argument>
</service>

I personally am not affected by this as I would rather view the file in my IDE, however I thought I should report this anyway. Thanks.

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