Skip to content

Commit

Permalink
RequestStack parameter is required since 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
leunggamciu authored and wouterj committed Dec 17, 2015
1 parent de11d3e commit cb54c5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/http_kernel/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ However, the HttpKernel component comes with some built-in listeners and
a built-in ControllerResolver that can be used to create a working example::

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernel;
use Symfony\Component\EventDispatcher\EventDispatcher;
Expand All @@ -641,7 +642,7 @@ a built-in ControllerResolver that can be used to create a working example::
$matcher = new UrlMatcher($routes, new RequestContext());

$dispatcher = new EventDispatcher();
$dispatcher->addSubscriber(new RouterListener($matcher));
$dispatcher->addSubscriber(new RouterListener($matcher, new RequestStack()));

$resolver = new ControllerResolver();
$kernel = new HttpKernel($dispatcher, $resolver);
Expand Down

0 comments on commit cb54c5e

Please sign in to comment.