From e9da1ba2f55058f5180db57e57f44e4d7d9fe030 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Tue, 19 Dec 2017 18:58:45 +1030 Subject: [PATCH] Remove Listener namespace We may reverse this in the future, but for now just going for consistency between domains (the majority do not use a Listener namespace) --- src/Admin/AdminServiceProvider.php | 1 - src/Admin/{Listener => }/CheckCustomLessFormat.php | 2 +- src/User/{Listener => }/SelfDemotionGuard.php | 2 +- src/User/UserServiceProvider.php | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) rename src/Admin/{Listener => }/CheckCustomLessFormat.php (97%) rename src/User/{Listener => }/SelfDemotionGuard.php (98%) diff --git a/src/Admin/AdminServiceProvider.php b/src/Admin/AdminServiceProvider.php index ccdf4fc62..d0ca1975f 100644 --- a/src/Admin/AdminServiceProvider.php +++ b/src/Admin/AdminServiceProvider.php @@ -11,7 +11,6 @@ namespace Flarum\Admin; -use Flarum\Admin\Listener\CheckCustomLessFormat; use Flarum\Admin\Middleware\RequireAdministrateAbility; use Flarum\Event\ConfigureMiddleware; use Flarum\Extension\Event\Disabled; diff --git a/src/Admin/Listener/CheckCustomLessFormat.php b/src/Admin/CheckCustomLessFormat.php similarity index 97% rename from src/Admin/Listener/CheckCustomLessFormat.php rename to src/Admin/CheckCustomLessFormat.php index c8d80d2b0..a2644945f 100644 --- a/src/Admin/Listener/CheckCustomLessFormat.php +++ b/src/Admin/CheckCustomLessFormat.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Flarum\Admin\Listener; +namespace Flarum\Admin; use Flarum\Foundation\ValidationException; use Flarum\Settings\Event\Serializing; diff --git a/src/User/Listener/SelfDemotionGuard.php b/src/User/SelfDemotionGuard.php similarity index 98% rename from src/User/Listener/SelfDemotionGuard.php rename to src/User/SelfDemotionGuard.php index 9c015ed83..1aec59e6c 100644 --- a/src/User/Listener/SelfDemotionGuard.php +++ b/src/User/SelfDemotionGuard.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Flarum\User\Listener; +namespace Flarum\User; use Flarum\Group\Group; use Flarum\User\Event\Saving; diff --git a/src/User/UserServiceProvider.php b/src/User/UserServiceProvider.php index 1b1a52954..dc7774e2e 100644 --- a/src/User/UserServiceProvider.php +++ b/src/User/UserServiceProvider.php @@ -78,7 +78,7 @@ class UserServiceProvider extends AbstractServiceProvider $events = $this->app->make('events'); - $events->subscribe(Listener\SelfDemotionGuard::class); + $events->subscribe(SelfDemotionGuard::class); $events->subscribe(EmailConfirmationMailer::class); $events->subscribe(UserMetadataUpdater::class); $events->subscribe(UserPolicy::class);