Skip to content

Commit

Permalink
[HttpKernel] changed the value of route to the pattern when it is a R…
Browse files Browse the repository at this point in the history
…oute 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).
  • Loading branch information
fabpot committed Dec 26, 2012
1 parent 5096292 commit 761429e
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -50,6 +50,10 @@ public function collect(Request $request, Response $response, \Exception $except

$attributes = array();
foreach ($request->attributes->all() as $key => $value) {
if ('_route' == $key && is_object($value)) {

This comment has been minimized.

Copy link
@Tobion

Tobion Dec 26, 2012

Member

'_route' === $key and also $value instanceof Route would probably be better

$value = $value->getPattern();
}

$attributes[$key] = $this->varToString($value);
}

Expand Down

0 comments on commit 761429e

Please sign in to comment.