Commit 06eee41
Update dependency_injection.rst because it has an error.
The line:
$sc->register('listener.router', 'Symfony\Component\HttpKernel\EventListener\RouterListener')
->setArguments(array(new Reference('matcher')))
;
is wrong, because the Symfony\Component\HttpKernel\EventListener\ResponseListener has two mandatory arguments; an instance of Symfony\Component\Routing\Matcher\UrlMatcher (or RequestMatcher), and an instance of RequestStack; so, we need to add the line:
$sc->register('request_stack', 'Symfony\Component\HttpFoundation\RequestStack');
And change the registration of listener.router on this form:
$sc->register('listener.router', 'Symfony\Component\HttpKernel\EventListener\RouterListener')
->setArguments(array(new Reference('matcher'), new Reference('request_stack')))
;1 parent 3d3bac0 commit 06eee41
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
106 | | - | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
0 commit comments