Skip to content

Commit df5de24

Browse files
committed
Use ControllerEvent instead of deprecated FilterControllerEvent
1 parent e48cfb7 commit df5de24

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

components/http_kernel.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ have been determined (e.g. the controller, routing information) but before
292292
the controller is executed. For some examples, see the Symfony section below.
293293

294294
Listeners to this event can also change the controller callable completely
295-
by calling :method:`FilterControllerEvent::setController <Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent::setController>`
295+
by calling :method:`ControllerEvent::setController <Symfony\\Component\\HttpKernel\\Event\\ControllerEvent::setController>`
296296
on the event object that's passed to listeners on this event.
297297

298298
.. sidebar:: ``kernel.controller`` in the Symfony Framework
@@ -606,7 +606,7 @@ each event has their own event object:
606606
Name ``KernelEvents`` Constant Argument passed to the listener
607607
=========================== ====================================== ===================================================================================
608608
kernel.request ``KernelEvents::REQUEST`` :class:`Symfony\\Component\\HttpKernel\\Event\\RequestEvent`
609-
kernel.controller ``KernelEvents::CONTROLLER`` :class:`Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent`
609+
kernel.controller ``KernelEvents::CONTROLLER`` :class:`Symfony\\Component\\HttpKernel\\Event\\ControllerEvent`
610610
kernel.controller_arguments ``KernelEvents::CONTROLLER_ARGUMENTS`` :class:`Symfony\\Component\\HttpKernel\\Event\\FilterControllerArgumentsEvent`
611611
kernel.view ``KernelEvents::VIEW`` :class:`Symfony\\Component\\HttpKernel\\Event\\ViewEvent`
612612
kernel.response ``KernelEvents::RESPONSE`` :class:`Symfony\\Component\\HttpKernel\\Event\\ResponseEvent`

event_dispatcher/before_after_filters.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ event subscribers, you can learn more about them at :doc:`/event_dispatcher`::
115115

116116
use App\Controller\TokenAuthenticatedController;
117117
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
118-
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
118+
use Symfony\Component\HttpKernel\Event\ControllerEvent;
119119
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
120120
use Symfony\Component\HttpKernel\KernelEvents;
121121

@@ -128,7 +128,7 @@ event subscribers, you can learn more about them at :doc:`/event_dispatcher`::
128128
$this->tokens = $tokens;
129129
}
130130

131-
public function onKernelController(FilterControllerEvent $event)
131+
public function onKernelController(ControllerEvent $event)
132132
{
133133
$controller = $event->getController();
134134

@@ -188,7 +188,7 @@ For example, take the ``TokenSubscriber`` from the previous example and first
188188
record the authentication token inside the request attributes. This will
189189
serve as a basic flag that this request underwent token authentication::
190190

191-
public function onKernelController(FilterControllerEvent $event)
191+
public function onKernelController(ControllerEvent $event)
192192
{
193193
// ...
194194

reference/events.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

5353
This event is dispatched after the controller to be executed has been resolved
5454
but before executing it. It's useful to initialize things later needed by the
5555
controller, such as `param converters`_, and even to change the controller
5656
entirely::
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

0 commit comments

Comments
 (0)