Skip to content

Commit cb54c5e

Browse files
leunggamciuwouterj
authored andcommitted
RequestStack parameter is required since 3.0
1 parent de11d3e commit cb54c5e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/http_kernel/introduction.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,7 @@ However, the HttpKernel component comes with some built-in listeners and
616616
a built-in ControllerResolver that can be used to create a working example::
617617

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

643644
$dispatcher = new EventDispatcher();
644-
$dispatcher->addSubscriber(new RouterListener($matcher));
645+
$dispatcher->addSubscriber(new RouterListener($matcher, new RequestStack()));
645646

646647
$resolver = new ControllerResolver();
647648
$kernel = new HttpKernel($dispatcher, $resolver);

0 commit comments

Comments
 (0)