[HttpKernel] changed the value of route to the pattern when it is a Route object in the data collector
This allows to have a meaningful information in the WDT when the route in the Request is not the route name but the route object (like in Drupal for instance).
This commit is contained in:
parent
5096292111
commit
761429e551
@ -50,6 +50,10 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
||||
|
||||
$attributes = array();
|
||||
foreach ($request->attributes->all() as $key => $value) {
|
||||
if ('_route' == $key && is_object($value)) {
|
||||
$value = $value->getPattern();
|
||||
}
|
||||
|
||||
$attributes[$key] = $this->varToString($value);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user