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

Lines changed: 2 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy