[FrameworkBundle] deprecated HttpKernel::forward() (it is only used once now and not part of any interface anyway)
This commit is contained in:
parent
1240690cac
commit
a8ea4e4b10
@ -59,7 +59,10 @@ class Controller extends ContainerAware
|
||||
*/
|
||||
public function forward($controller, array $path = array(), array $query = array())
|
||||
{
|
||||
return $this->container->get('http_kernel')->forward($controller, $path, $query);
|
||||
$path['_controller'] = $controller;
|
||||
$subRequest = $this->container->get('request')->duplicate($query, null, $path);
|
||||
|
||||
return $this->container->get('http_kernel')->handle($subRequest, HttpKernelInterface::SUB_REQUEST);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -65,9 +65,13 @@ class HttpKernel extends BaseHttpKernel
|
||||
* @param array $query An array of request query parameters
|
||||
*
|
||||
* @return Response A Response instance
|
||||
*
|
||||
* @deprecated in 2.2, will be removed in 2.3
|
||||
*/
|
||||
public function forward($controller, array $attributes = array(), array $query = array())
|
||||
{
|
||||
trigger_error('forward() is deprecated since version 2.2 and will be removed in 2.3.', E_USER_DEPRECATED);
|
||||
|
||||
$attributes['_controller'] = $controller;
|
||||
$subRequest = $this->container->get('request')->duplicate($query, null, $attributes);
|
||||
|
||||
|
Reference in New Issue
Block a user