diff --git a/create_framework/dependency_injection.rst b/create_framework/dependency_injection.rst index f5ff56c1b38..d380e19abd3 100644 --- a/create_framework/dependency_injection.rst +++ b/create_framework/dependency_injection.rst @@ -100,10 +100,11 @@ Create a new file to host the dependency injection container configuration:: $sc->register('matcher', 'Symfony\Component\Routing\Matcher\UrlMatcher') ->setArguments(array($routes, new Reference('context'))) ; + $sc->register('request_stack', 'Symfony\Component\HttpFoundation\RequestStack'); $sc->register('resolver', 'Symfony\Component\HttpKernel\Controller\ControllerResolver'); $sc->register('listener.router', 'Symfony\Component\HttpKernel\EventListener\RouterListener') - ->setArguments(array(new Reference('matcher'))) + ->setArguments(array(new Reference('matcher'), new Reference('request_stack'))) ; $sc->register('listener.response', 'Symfony\Component\HttpKernel\EventListener\ResponseListener') ->setArguments(array('UTF-8'))