Skip to content

Commit

Permalink
Update http_kernel_httpkernel_class.rst
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AchillesKal authored and xabbuh committed Apr 24, 2016
1 parent 5439c7a commit ee94747
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion create_framework/http_kernel_httpkernel_class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ And the new front controller::
use Symfony\Component\Routing;
use Symfony\Component\HttpKernel;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\HttpFoundation\RequestStack;

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

$dispatcher = new EventDispatcher();
$dispatcher->addSubscriber(new HttpKernel\EventListener\RouterListener($matcher));
$dispatcher->addSubscriber(new HttpKernel\EventListener\RouterListener($matcher, new RequestStack()));

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

Expand Down

0 comments on commit ee94747

Please sign in to comment.