1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-29 10:39:19 +02:00

[ticket/16379] Update deprecated event dispatcher class

PHPBB3-16379
This commit is contained in:
mrgoldy 2020-02-27 16:03:24 +01:00
parent b1f0276307
commit 4334b446b5

View File

@ -13,11 +13,11 @@
namespace phpbb\event;
use Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\EventDispatcher\Event;
/**
* Extension of the Symfony2 EventDispatcher
* Extension of the Symfony3.3 EventDispatcher
*
* It provides an additional `trigger_event` method, which
* gives some syntactic sugar for dispatching events. Instead
@ -30,7 +30,7 @@ use Symfony\Component\EventDispatcher\Event;
* extract($phpbb_dispatcher->trigger_event('core.index', compact($vars)));
*
*/
class dispatcher extends ContainerAwareEventDispatcher implements dispatcher_interface
class dispatcher extends EventDispatcher implements dispatcher_interface
{
/**
* @var bool
@ -40,7 +40,7 @@ class dispatcher extends ContainerAwareEventDispatcher implements dispatcher_int
/**
* {@inheritdoc}
*/
public function trigger_event($eventName, $data = array())
public function trigger_event($eventName, $data = [])
{
$event = new \phpbb\event\data($data);
$this->dispatch($eventName, $event);