{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block head %} {{ parent() }} {% endblock %} {% block toolbar %} {% set request_handler %} {{ _self.set_handler(collector.controller) }} {% endset %} {% if collector.redirect %} {% set redirect_handler %} {{ _self.set_handler(collector.redirect.controller, collector.redirect.route, 'GET' != collector.redirect.method ? collector.redirect.method) }} {% endset %} {% endif %} {% if collector.forwardtoken %} {% set forward_profile = profile.childByToken(collector.forwardtoken) %} {% set forward_handler %} {{ _self.set_handler(forward_profile ? forward_profile.collector('request').controller : 'n/a') }} {% endset %} {% endif %} {% set request_status_code_color = (collector.statuscode >= 400) ? 'red' : (collector.statuscode >= 300) ? 'yellow' : 'green' %} {% set icon %} {{ collector.statuscode }} {% if collector.route %} {% if collector.redirect %}{{ source('@WebProfiler/Icon/redirect.svg') }}{% endif %} {% if collector.forwardtoken %}{{ source('@WebProfiler/Icon/forward.svg') }}{% endif %} {{ 'GET' != collector.method ? collector.method }} @ {{ collector.route }} {% endif %} {% endset %} {% set text %}
HTTP status {{ collector.statuscode }} {{ collector.statustext }}
{% if 'GET' != collector.method -%}
Method {{ collector.method }}
{%- endif %}
Controller {{ request_handler }}
Route name {{ collector.route|default('n/a') }}
Has session {% if collector.sessionmetadata|length %}yes{% else %}no{% endif %}
Stateless Check {% if collector.statelesscheck %}yes{% else %}no{% endif %}
{% if redirect_handler is defined -%}
{{ collector.redirect.status_code }} Redirect from {{ redirect_handler }} ({{ collector.redirect.token }})
{% endif %} {% if forward_handler is defined %}
Forwarded to {{ forward_handler }} ({{ collector.forwardtoken }})
{% endif %} {% endset %} {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }} {% endblock %} {% block menu %} {{ source('@WebProfiler/Icon/request.svg') }} Request / Response {% endblock %} {% block panel %} {% set controller_name = _self.set_handler(collector.controller) %}

{{ 'n/a' in controller_name ? 'Request / Response' : controller_name }}

Request

{% set has_no_query_post_or_files = collector.requestquery.all is empty and collector.requestrequest.all is empty and collector.requestfiles is empty %} {% if has_no_query_post_or_files %}

GET Parameters

None

POST Parameters

None

Uploaded Files

None

{% else %}

GET Parameters

{% if collector.requestquery.all is empty %}

No GET parameters

{% else %} {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestquery, maxDepth: 1 }, with_context = false) }} {% endif %}

POST Parameters

{% if collector.requestrequest.all is empty %}

No POST parameters

{% else %} {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestrequest, maxDepth: 1 }, with_context = false) }} {% endif %}

Uploaded Files

{% if collector.requestfiles is empty %}

No files were uploaded

{% else %} {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestfiles, maxDepth: 1 }, with_context = false) }} {% endif %} {% endif %}

Request Attributes

{% if collector.requestattributes.all is empty %}

No attributes

{% else %} {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestattributes }, with_context = false) }} {% endif %}

Request Headers

{{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestheaders, labels: ['Header', 'Value'], maxDepth: 1 }, with_context = false) }}

Request Content

{% if collector.content == false %}

Request content not available (it was retrieved as a resource).

{% elseif collector.content %}
{% set prettyJson = collector.isJsonRequest ? collector.prettyJson : null %} {% if prettyJson is not null %}

Pretty

{{ prettyJson }}
{% endif %}

Raw

{{ collector.content }}
{% else %}

No content

{% endif %}

Response

Response Headers

{{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.responseheaders, labels: ['Header', 'Value'], maxDepth: 1 }, with_context = false) }}

Cookies

Request Cookies

{% if collector.requestcookies.all is empty %}

No request cookies

{% else %} {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestcookies }, with_context = false) }} {% endif %}

Response Cookies

{% if collector.responsecookies.all is empty %}

No response cookies

{% else %} {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.responsecookies }, with_context = true) }} {% endif %}

Session{% if collector.sessionusages is not empty %} {{ collector.sessionusages|length }}{% endif %}

Session Metadata

{% if collector.sessionmetadata is empty %}

No session metadata

{% else %} {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.sessionmetadata }, with_context = false) }} {% endif %}

Session Attributes

{% if collector.sessionattributes is empty %}

No session attributes

{% else %} {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.sessionattributes, labels: ['Attribute', 'Value'] }, with_context = false) }} {% endif %}

Session Usage

{{ collector.sessionusages|length }} Usages
{{ source('@WebProfiler/Icon/' ~ (collector.statelesscheck ? 'yes' : 'no') ~ '.svg') }} Stateless check enabled
{% if collector.sessionusages is empty %}

Session not used.

{% else %} {% for key, usage in collector.sessionusages %} {% endfor %}
Usage
{%- set link = usage.file|file_link(usage.line) %} {%- if link %}{% else %}{% endif %} {{ usage.name }} {%- if link %}{% else %}{% endif %}
{% set usage_id = 'session-usage-trace-' ~ key %} Show trace
{{ profiler_dump(usage.trace, maxDepth=2) }}
{% endif %}

Flashes

Flashes

{% if collector.flashes is empty %}

No flash messages were created.

{% else %} {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.flashes }, with_context = false) }} {% endif %}

Server Parameters

Server Parameters

Defined in .env

{{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.dotenvvars }, with_context = false) }}

Defined as regular env variables

{% set requestserver = [] %} {% for key, value in collector.requestserver|filter((_, key) => key not in collector.dotenvvars.keys) %} {% set requestserver = requestserver|merge({(key): value}) %} {% endfor %} {{ include('@WebProfiler/Profiler/table.html.twig', { data: requestserver }, with_context = false) }}
{% if profile.parent %}

Parent Request

Return to parent request (token = {{ profile.parent.token }})

{{ include('@WebProfiler/Profiler/bag.html.twig', { bag: profile.parent.getcollector('request').requestattributes }, with_context = false) }}
{% endif %} {% if profile.children|length %}

Sub Requests {{ profile.children|length }}

{% for child in profile.children %}

{{ _self.set_handler(child.getcollector('request').controller) }} (token = {{ child.token }})

{{ include('@WebProfiler/Profiler/bag.html.twig', { bag: child.getcollector('request').requestattributes }, with_context = false) }} {% endfor %}
{% endif %}
{% endblock %} {% macro set_handler(controller, route, method) %} {% if controller.class is defined -%} {%- if method|default(false) %}{{ method }}{% endif -%} {%- set link = controller.file|file_link(controller.line) %} {%- if link %}{% else %}{% endif %} {%- if route|default(false) -%} @{{ route }} {%- else -%} {{- controller.class|abbr_class|striptags -}} {{- controller.method ? ' :: ' ~ controller.method -}} {%- endif -%} {%- if link %}{% else %}{% endif %} {%- else -%} {{ route|default(controller) }} {%- endif %} {% endmacro %}