return;
} if ($request->attributes->
has('_controller'
)) { // Is a sub-request: no need to parse _path but it should still be removed from query parameters as below.
$request->query->
remove('_path'
);
return;
} if ($event->
isMainRequest()) { $this->
validateRequest($request);
} parse_str($request->query->
get('_path', ''
),
$attributes);
$request->attributes->
add($attributes);
$request->attributes->
set('_route_params',
array_replace($request->attributes->
get('_route_params',
[]),
$attributes));
$request->query->
remove('_path'
);
} protected function validateRequest(Request
$request): void
{ // is the Request safe?