@@ -28,7 +28,7 @@ following information:
2828``kernel.request ``
2929~~~~~~~~~~~~~~~~~~
3030
31- **Event Class **: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ GetResponseEvent `
31+ **Event Class **: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ RequestEvent `
3232
3333This event is dispatched very early in Symfony, before the controller is
3434determined. It's useful to add information to the Request or return a Response
@@ -48,16 +48,16 @@ their priorities:
4848 ``kernel.controller ``
4949~~~~~~~~~~~~~~~~~~~~~
5050
51- **Event Class **: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ FilterControllerEvent `
51+ **Event Class **: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ ControllerEvent `
5252
5353This event is dispatched after the controller to be executed has been resolved
5454but before executing it. It's useful to initialize things later needed by the
5555controller, such as `param converters `_, and even to change the controller
5656entirely::
5757
58- use Symfony\Component\HttpKernel\Event\FilterControllerEvent ;
58+ use Symfony\Component\HttpKernel\Event\ControllerEvent ;
5959
60- public function onKernelController(FilterControllerEvent $event)
60+ public function onKernelController(ControllerEvent $event)
6161 {
6262 // ...
6363
@@ -79,15 +79,15 @@ their priorities:
7979 ``kernel.controller_arguments ``
8080~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8181
82- **Event Class **: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ FilterControllerArgumentsEvent `
82+ **Event Class **: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ ControllerArgumentsEvent `
8383
8484This event is dispatched just before a controller is called. It's useful to
8585configure the arguments that are going to be passed to the controller.
8686Typically, this is used to map URL routing parameters to their corresponding
8787named arguments; or pass the current request when the ``Request `` type-hint is
8888found::
8989
90- public function onKernelControllerArguments(FilterControllerArgumentsEvent $event)
90+ public function onKernelControllerArguments(ControllerArgumentsEvent $event)
9191 {
9292 // ...
9393
@@ -109,17 +109,17 @@ their priorities:
109109 ``kernel.view ``
110110~~~~~~~~~~~~~~~
111111
112- **Event Class **: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ GetResponseForControllerResultEvent `
112+ **Event Class **: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ ViewEvent `
113113
114114This event is dispatched after the controller has been executed but *only * if
115115the controller does *not * return a :class: `Symfony\\ Component\\ HttpFoundation\\ Response `
116116object. It's useful to transform the returned value (e.g. a string with some
117117HTML contents) into the ``Response `` object needed by Symfony::
118118
119119 use Symfony\Component\HttpFoundation\Response;
120- use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent ;
120+ use Symfony\Component\HttpKernel\Event\ViewEvent ;
121121
122- public function onKernelView(GetResponseForControllerResultEvent $event)
122+ public function onKernelView(ViewEvent $event)
123123 {
124124 $value = $event->getControllerResult();
125125 $response = new Response();
@@ -143,13 +143,13 @@ their priorities:
143143 ``kernel.response ``
144144~~~~~~~~~~~~~~~~~~~
145145
146- **Event Class **: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ FilterResponseEvent `
146+ **Event Class **: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ ResponseEvent `
147147
148148This event is dispatched after the controller or any ``kernel.view `` listener
149149returns a ``Response `` object. It's useful to modify or replace the response
150150before sending it back (e.g. add/modify HTTP headers, add cookies, etc.)::
151151
152- public function onKernelResponse(FilterResponseEvent $event)
152+ public function onKernelResponse(ResponseEvent $event)
153153 {
154154 $response = $event->getResponse();
155155
@@ -196,7 +196,7 @@ their priorities:
196196 ``kernel.terminate ``
197197~~~~~~~~~~~~~~~~~~~~
198198
199- **Event Class **: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ PostResponseEvent `
199+ **Event Class **: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ TerminateEvent `
200200
201201This event is dispatched after the response has been sent (after the execution
202202of the :method: `Symfony\\ Component\\ HttpKernel\\ HttpKernel::handle ` method).
@@ -219,16 +219,16 @@ their priorities:
219219``kernel.exception ``
220220~~~~~~~~~~~~~~~~~~~~
221221
222- **Event Class **: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ GetResponseForExceptionEvent `
222+ **Event Class **: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ ExceptionEvent `
223223
224224This event is dispatched as soon as an error occurs during the handling of the
225225HTTP request. It's useful to recover from errors or modify the exception details
226226sent as response::
227227
228228 use Symfony\Component\HttpFoundation\Response;
229- use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent ;
229+ use Symfony\Component\HttpKernel\Event\ExceptionEvent ;
230230
231- public function onKernelException(GetResponseForExceptionEvent $event)
231+ public function onKernelException(ExceptionEvent $event)
232232 {
233233 $exception = $event->getException();
234234 $response = new Response();
@@ -265,7 +265,7 @@ response:
265265
266266 If you want to overwrite the status code of the exception response, which
267267 you should not without a good reason, call
268- ``GetResponseForExceptionEvent ::allowCustomResponseCode() `` first and then
268+ ``ExceptionEvent ::allowCustomResponseCode() `` first and then
269269 set the status code on the response::
270270
271271 $event->allowCustomResponseCode();
0 commit comments