diff --git a/src/Symfony/Bundle/FrameworkBundle/DataCollector/RequestDataCollector.php b/src/Symfony/Bundle/FrameworkBundle/DataCollector/RequestDataCollector.php index 6e726812fd..be5cdeecc2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DataCollector/RequestDataCollector.php +++ b/src/Symfony/Bundle/FrameworkBundle/DataCollector/RequestDataCollector.php @@ -37,7 +37,6 @@ class RequestDataCollector extends BaseRequestDataCollector { parent::collect($request, $response, $exception); - $this->data['route'] = $request->attributes->get('_route'); $this->data['controller'] = 'n/a'; if (isset($this->controllers[$request])) { @@ -71,7 +70,17 @@ class RequestDataCollector extends BaseRequestDataCollector */ public function getRoute() { - return $this->data['route']; + return $this->data['request_attributes']['_route']; + } + + /** + * Returns the route parameters. + * + * @return array The parameters + */ + public function getRouteParams() + { + return $this->data['request_attributes']['_route_params']; } /** diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig index c8b71f417c..7bc07dd6c0 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig @@ -96,23 +96,7 @@

Session Attributes

{% if collector.sessionattributes|length %} - - - - - - - - - {% set attributes = collector.sessionattributes %} - {% for key in attributes|keys|sort %} - - - - - {% endfor %} - -
KeyValue
{{ key }}{{ attributes[key]|yaml_dump }}
+ {% include 'WebProfilerBundle:Profiler:table.html.twig' with { 'data': collector.sessionattributes } only %} {% else %}

No session attributes diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/bag.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/bag.html.twig index 2a45f75d08..b85d744e35 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/bag.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/bag.html.twig @@ -1,16 +1,16 @@ - - - - - - - - - {% for key in bag.keys|sort %} +
KeyValue
+ + + + + + + + {% for key in bag.keys|sort %} - {% endfor %} - + {% endfor %} +
KeyValue
{{ key }} {{ bag.get(key)|yaml_dump }}
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/table.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/table.html.twig new file mode 100644 index 0000000000..c1427003d2 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/table.html.twig @@ -0,0 +1,16 @@ + + + + + + + + + {% for key in data|keys|sort %} + + + + + {% endfor %} + +
KeyValue
{{ key }}{{ data[key]|yaml_dump }}
\ No newline at end of file diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Router/panel.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Router/panel.html.twig index 5c27f46fa0..bc5482c998 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Router/panel.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Router/panel.html.twig @@ -14,3 +14,5 @@ {% endfor %} +Note: The above matching is based on the configuration for the current router which might differ from +the configuration used while routing this request. \ No newline at end of file