Skip to content

Commit ee94747

Browse files
AchillesKalxabbuh
authored andcommitted
Update http_kernel_httpkernel_class.rst
The current code generates a Fatal Error. I can see in the HttpKernel Component's documentation that RouterListener needs a $matcher and a RequestStack object as paramers.
1 parent 5439c7a commit ee94747

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

create_framework/http_kernel_httpkernel_class.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ And the new front controller::
4141
use Symfony\Component\Routing;
4242
use Symfony\Component\HttpKernel;
4343
use Symfony\Component\EventDispatcher\EventDispatcher;
44+
use Symfony\Component\HttpFoundation\RequestStack;
4445

4546
$request = Request::createFromGlobals();
4647
$routes = include __DIR__.'/../src/app.php';
@@ -50,7 +51,7 @@ And the new front controller::
5051
$resolver = new HttpKernel\Controller\ControllerResolver();
5152

5253
$dispatcher = new EventDispatcher();
53-
$dispatcher->addSubscriber(new HttpKernel\EventListener\RouterListener($matcher));
54+
$dispatcher->addSubscriber(new HttpKernel\EventListener\RouterListener($matcher, new RequestStack()));
5455

5556
$framework = new Simplex\Framework($dispatcher, $resolver);
5657

0 commit comments

Comments
 (0)