minor #20790 Don't use the "app" global variable in the profiler (javiereguiluz)

This PR was merged into the 3.1 branch.

Discussion
----------

Don't use the "app" global variable in the profiler

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

The use of the `app` variable makes this incompatible with projects like Silex (as pointed by @stof in https://github.com/symfony/symfony/pull/20646#discussion_r91080514)

Commits
-------

a777618 Don't use the "app" global variable in the profiler
This commit is contained in:
Javier Eguiluz 2016-12-06 17:22:34 +01:00
commit ea78cf8d23

View File

@ -39,7 +39,7 @@
{%- else -%}
{{ redirect_route }}
{%- endif %}
(<a href="{{ path('_profiler', { token: redirect.token, panel: app.request.query.get('panel', 'request') }) }}">{{ redirect.token }}</a>)
(<a href="{{ path('_profiler', { token: redirect.token, panel: request.query.get('panel', 'request') }) }}">{{ redirect.token }}</a>)
</dd>
</dl>
{%- endif %}