Skip to content

Commit be082ec

Browse files
committed
minor #6509 Update http_kernel_httpkernel_class.rst (AchillesKal)
This PR was submitted for the 3.0 branch but it was merged into the 2.8 branch instead (closes #6509). Discussion ---------- 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. Commits ------- ee94747 Update http_kernel_httpkernel_class.rst
2 parents 5439c7a + ee94747 commit be082ec

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)