From b7a8861f5558cf5ecd11b11696a1f3d347737d7b Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Tue, 23 Jun 2020 20:37:29 +0000 Subject: [PATCH] [CORE][Event] Move GSEvent to Event, no longer a name collision --- src/Controller/NetworkPublic.php | 3 +-- src/Core/{GSEvent.php => Event.php} | 3 +-- src/Core/GNUsocial.php | 2 +- src/Core/ModulesManager.php | 2 -- 4 files changed, 3 insertions(+), 7 deletions(-) rename src/Core/{GSEvent.php => Event.php} (99%) diff --git a/src/Controller/NetworkPublic.php b/src/Controller/NetworkPublic.php index 9da7ff2ed7..0f26ca15b8 100644 --- a/src/Controller/NetworkPublic.php +++ b/src/Controller/NetworkPublic.php @@ -17,7 +17,6 @@ // along with GNU social. If not, see . // }}} - /** * Handle network public feed * @@ -31,7 +30,7 @@ namespace App\Controller; -use App\Core\GSEvent as Event; +use App\Core\Event; use App\Util\Common; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; diff --git a/src/Core/GSEvent.php b/src/Core/Event.php similarity index 99% rename from src/Core/GSEvent.php rename to src/Core/Event.php index 1336abcaff..f3ea511657 100644 --- a/src/Core/GSEvent.php +++ b/src/Core/Event.php @@ -17,7 +17,6 @@ // along with GNU social. If not, see . // }}} - /** * GNU social's event handler wrapper around Symfony's, * keeping our old interface, which is more convenient and just as powerful @@ -35,7 +34,7 @@ namespace App\Core; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\GenericEvent; -abstract class GSEvent +abstract class Event { /** * Constants to be returned from event handlers, for increased clarity diff --git a/src/Core/GNUsocial.php b/src/Core/GNUsocial.php index aca8a1d9f3..cf1d0eedcf 100644 --- a/src/Core/GNUsocial.php +++ b/src/Core/GNUsocial.php @@ -87,7 +87,7 @@ class GNUsocial implements EventSubscriberInterface public function register(EventDispatcherInterface $event_dispatcher): void { Log::setLogger($this->logger); - GSEvent::setDispatcher($event_dispatcher); + Event::setDispatcher($event_dispatcher); I18nHelper::setTranslator($this->translator); DB::setManager($this->entity_manager); Router::setRouter($this->router); diff --git a/src/Core/ModulesManager.php b/src/Core/ModulesManager.php index a08ca2c902..a6ff27617b 100644 --- a/src/Core/ModulesManager.php +++ b/src/Core/ModulesManager.php @@ -17,7 +17,6 @@ // along with GNU social. If not, see . // }}} - /** * Module and plugin loader code, one of the main features of GNU social * @@ -35,7 +34,6 @@ namespace App\Core; use Functional as F; -use GSEvent as Event; abstract class ModulesManager {