From 0e5a485e83ff3302f146a7e4a440b6497347e438 Mon Sep 17 00:00:00 2001 From: leunggamciu Date: Tue, 8 Dec 2015 12:33:53 +0800 Subject: [PATCH] RequestStack parameter is required since 3.0 --- components/http_kernel/introduction.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/http_kernel/introduction.rst b/components/http_kernel/introduction.rst index 692698eceb0..fd4682a9a53 100644 --- a/components/http_kernel/introduction.rst +++ b/components/http_kernel/introduction.rst @@ -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; @@ -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);