Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Refactor a bunch of events for #11544
James Cole203a80147a72
diff --git a/app/Events/RegisteredUser.php b/app/Events/Security/System/NewUserRegistered.phpsimilarity index 76%rename from app/Events/RegisteredUser.phprename to app/Events/Security/System/NewUserRegistered.phpindex 160844b0ec..b8c0b92523 100644--- a/app/Events/RegisteredUser.php+++ b/app/Events/Security/System/NewUserRegistered.php@@ -1,8 +1,7 @@<?php--/**- * RegisteredUser.php- * Copyright (c) 2019 [email protected]+/*+ * NewUserRegistered.php+ * Copyright (c) 2026 [email protected]** This file is part of Firefly III (https://github.com/firefly-iii).*@@ -20,23 +19,16 @@* along with this program. If not, see <https://www.gnu.org/licenses/>.*/-declare(strict_types=1);--namespace FireflyIII\Events;+namespace FireflyIII\Events\Security\System;+use FireflyIII\Events\Event;use FireflyIII\Notifications\Notifiables\OwnerNotifiable;use FireflyIII\User;use Illuminate\Queue\SerializesModels;-/**- * Class RegisteredUser.- */-class RegisteredUser extends Event+class NewUserRegistered extends Event{use SerializesModels;- /**- * Create a new event instance. This event is triggered when a new user registers.- */public function __construct(public OwnerNotifiable $owner, public User $user) {}}diff --git a/app/Events/NewVersionAvailable.php b/app/Events/Security/System/SystemFoundNewVersionOnline.phpsimilarity index 64%rename from app/Events/NewVersionAvailable.phprename to app/Events/Security/System/SystemFoundNewVersionOnline.phpindex 64c93f01f4..dc6b711c7d 100644--- a/app/Events/NewVersionAvailable.php+++ b/app/Events/Security/System/SystemFoundNewVersionOnline.php@@ -1,8 +1,7 @@<?php-/*- * NewVersionAvailable.php- * Copyright (c) 2022 [email protected]+ * SystemFoundNewVersionOnline.php+ * Copyright (c) 2026 [email protected]** This file is part of Firefly III (https://github.com/firefly-iii).*@@ -20,25 +19,15 @@* along with this program. If not, see <https://www.gnu.org/licenses/>.*/-declare(strict_types=1);--namespace FireflyIII\Events;+namespace FireflyIII\Events\Security\System;+use FireflyIII\Events\Event;use Illuminate\Queue\SerializesModels;-use Illuminate\Support\Facades\Log;-/**- * Class NewVersionAvailable- */-class NewVersionAvailable extends Event+class SystemFoundNewVersionOnline extends Event{use SerializesModels;- /**- * Create a new event instance. This event is triggered when a new version is available.- */- public function __construct(public string $message)- {- Log::debug(__METHOD__);- }+ public function __construct(public string $message) {}}+diff --git a/app/Handlers/Events/AdminEventHandler.php b/app/Handlers/Events/AdminEventHandler.phpindex 9d6e17c7ea..66abc16d6a 100644--- a/app/Handlers/Events/AdminEventHandler.php+++ b/app/Handlers/Events/AdminEventHandler.php@@ -25,14 +25,8 @@ namespace FireflyIII\Handlers\Events;use Exception;use FireflyIII\Events\Admin\InvitationCreated;-use FireflyIII\Events\NewVersionAvailable;-use FireflyIII\Events\Test\OwnerTestsNotificationChannel;use FireflyIII\Notifications\Admin\UserInvitation;-use FireflyIII\Notifications\Admin\VersionCheckResult;use FireflyIII\Notifications\Notifiables\OwnerNotifiable;-use FireflyIII\Notifications\Test\OwnerTestNotificationEmail;-use FireflyIII\Notifications\Test\OwnerTestNotificationPushover;-use FireflyIII\Notifications\Test\OwnerTestNotificationSlack;use FireflyIII\Support\Facades\FireflyConfig;use Illuminate\Support\Facades\Log;use Illuminate\Support\Facades\Notification;@@ -71,30 +65,4 @@ class AdminEventHandler/*** Send new version message to admin.*/- public function sendNewVersion(NewVersionAvailable $event): void- {- $sendMail = FireflyConfig::get('notification_new_version', true)->data;- if (false === $sendMail) {- return;- }-- try {- $owner = new OwnerNotifiable();- Notification::send($owner, new VersionCheckResult($event->message));- } catch (Exception $e) {- $message = $e->getMessage();- if (str_contains($message, 'Bcc')) {- Log::warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');-- return;- }- if (str_contains($message, 'RFC 2822')) {- Log::warning('[RFC] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');-- return;- }- Log::error($e->getMessage());- Log::error($e->getTraceAsString());- }- }}diff --git a/app/Handlers/Events/UserEventHandler.php b/app/Handlers/Events/UserEventHandler.phpindex 4a54563caf..3e8df36b3f 100644--- a/app/Handlers/Events/UserEventHandler.php+++ b/app/Handlers/Events/UserEventHandler.php@@ -23,25 +23,16 @@ declare(strict_types=1);namespace FireflyIII\Handlers\Events;-use Database\Seeders\ExchangeRateSeeder;use Exception;-use FireflyIII\Enums\UserRoleEnum;use FireflyIII\Events\Admin\InvitationCreated;-use FireflyIII\Events\RegisteredUser;use FireflyIII\Events\RequestedNewPassword;use FireflyIII\Events\UserChangedEmail;use FireflyIII\Exceptions\FireflyException;use FireflyIII\Mail\ConfirmEmailChangeMail;use FireflyIII\Mail\InvitationMail;use FireflyIII\Mail\UndoEmailChangeMail;-use FireflyIII\Models\GroupMembership;-use FireflyIII\Models\UserGroup;-use FireflyIII\Models\UserRole;-use FireflyIII\Notifications\Admin\UserRegistration as AdminRegistrationNotification;use FireflyIII\Notifications\User\UserNewPassword;-use FireflyIII\Notifications\User\UserRegistration as UserRegistrationNotification;use FireflyIII\Repositories\User\UserRepositoryInterface;-use FireflyIII\Support\Facades\FireflyConfig;use FireflyIII\Support\Facades\Preferences;use FireflyIII\User;use Illuminate\Auth\Events\Login;@@ -58,20 +49,7 @@ use Illuminate\Support\Facades\Notification;*/class UserEventHandler{- /**- * This method will bestow upon a user the "owner" role if he is the first user in the system.- */- public function attachUserRole(RegisteredUser $event): void- {- /** @var UserRepositoryInterface $repository */- $repository = app(UserRepositoryInterface::class);- // first user ever?- if (1 === $repository->count()) {- Log::debug('User count is one, attach role.');- $repository->attachRole($event->user, 'owner');- }- }/*** Fires to see if a user is admin.@@ -101,58 +79,6 @@ class UserEventHandler}}- /**- * @SuppressWarnings("PHPMD.UnusedFormalParameter")- */- public function createExchangeRates(RegisteredUser $event): void- {- $seeder = new ExchangeRateSeeder();- $seeder->run();- }-- /**- * @throws FireflyException- */- public function createGroupMembership(RegisteredUser $event): void- {- $user = $event->user;- $groupExists = true;- $groupTitle = $user->email;- $index = 1;-- /** @var null|UserGroup $group */- $group = null;-- // create a new group.- while ($groupExists) { // @phpstan-ignore-line- $groupExists = UserGroup::where('title', $groupTitle)->count() > 0;- if (false === $groupExists) {- $group = UserGroup::create(['title' => $groupTitle]);-- break;- }- $groupTitle = sprintf('%s-%d', $user->email, $index);- ++$index;- if ($index > 99) {- throw new FireflyException('Email address can no longer be used for registrations.');- }- }-- /** @var null|UserRole $role */- $role = UserRole::where('title', UserRoleEnum::OWNER->value)->first();- if (null === $role) {- throw new FireflyException('The user role is unexpectedly empty. Did you run all migrations?');- }- GroupMembership::create(- [- 'user_id' => $user->id,- 'user_group_id' => $group->id,- 'user_role_id' => $role->id,- ]- );- $user->user_group_id = $group->id;- $user->save();- }/*** Set the demo user back to English.@@ -173,31 +99,6 @@ class UserEventHandler}}- public function sendAdminRegistrationNotification(RegisteredUser $event): void- {- $sendMail = (bool)FireflyConfig::get('notification_admin_new_reg', true)->data;- if ($sendMail) {- $owner = $event->owner;-- try {- Notification::send($owner, new AdminRegistrationNotification($event->user));- } catch (Exception $e) {- $message = $e->getMessage();- if (str_contains($message, 'Bcc')) {- Log::warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');-- return;- }- if (str_contains($message, 'RFC 2822')) {- Log::warning('[RFC] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');-- return;- }- Log::error($e->getMessage());- Log::error($e->getTraceAsString());- }- }- }/*** Send email to confirm email change. Will not be made into a notification, because@@ -291,31 +192,5 @@ class UserEventHandler}}- /**- * This method will send the user a registration mail, welcoming him or her to Firefly III.- * This message is only sent when the configuration of Firefly III says so.- */- public function sendRegistrationMail(RegisteredUser $event): void- {- $sendMail = (bool)FireflyConfig::get('notification_user_new_reg', true)->data;- if ($sendMail) {- try {- Notification::send($event->user, new UserRegistrationNotification());- } catch (Exception $e) {- $message = $e->getMessage();- if (str_contains($message, 'Bcc')) {- Log::warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');- return;- }- if (str_contains($message, 'RFC 2822')) {- Log::warning('[RFC] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');-- return;- }- Log::error($e->getMessage());- Log::error($e->getTraceAsString());- }- }- }}diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.phpindex 69c0258d2d..741f4d81ca 100644--- a/app/Http/Controllers/Auth/RegisterController.php+++ b/app/Http/Controllers/Auth/RegisterController.php@@ -23,11 +23,12 @@ declare(strict_types=1);namespace FireflyIII\Http\Controllers\Auth;-use FireflyIII\Events\RegisteredUser;+use FireflyIII\Events\Security\System\NewUserRegistered;use FireflyIII\Exceptions\FireflyException;use FireflyIII\Http\Controllers\Controller;use FireflyIII\Notifications\Notifiables\OwnerNotifiable;use FireflyIII\Repositories\User\UserRepositoryInterface;+use FireflyIII\Support\Facades\FireflyConfig;use FireflyIII\Support\Http\Controllers\CreateStuff;use FireflyIII\User;use Illuminate\Contracts\Foundation\Application;@@ -41,7 +42,6 @@ use Illuminate\Validation\ValidationException;use Illuminate\View\View;use Psr\Container\ContainerExceptionInterface;use Psr\Container\NotFoundExceptionInterface;-use FireflyIII\Support\Facades\FireflyConfig;/*** Class RegisterController@@ -83,10 +83,10 @@ class RegisterController extends Controller* @throws FireflyException* @throws ValidationException*/- public function register(Request $request): Redirector|RedirectResponse+ public function register(Request $request): Redirector | RedirectResponse{$allowRegistration = $this->allowedToRegister();- $inviteCode = (string) $request->get('invite_code');+ $inviteCode = (string)$request->get('invite_code');$repository = app(UserRepositoryInterface::class);$validCode = $repository->validateInviteCode($inviteCode);@@ -95,14 +95,14 @@ class RegisterController extends Controller}$this->validator($request->all())->validate();- $user = $this->createUser($request->all());+ $user = $this->createUser($request->all());Log::info(sprintf('Registered new user %s', $user->email));- $owner = new OwnerNotifiable();- event(new RegisteredUser($owner, $user));+ $owner = new OwnerNotifiable();+ event(new NewUserRegistered($owner, $user));$this->guard()->login($user);- session()->flash('success', (string) trans('firefly.registered'));+ session()->flash('success', (string)trans('firefly.registered'));$this->registered($request, $user);@@ -123,11 +123,11 @@ class RegisterController extends Controllertry {$singleUserMode = FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;- } catch (ContainerExceptionInterface|NotFoundExceptionInterface) {+ } catch (ContainerExceptionInterface | NotFoundExceptionInterface) {$singleUserMode = true;}- $userCount = User::count();- $guard = config('auth.defaults.guard');+ $userCount = User::count();+ $guard = config('auth.defaults.guard');if (true === $singleUserMode && $userCount > 0 && 'web' === $guard) {$allowRegistration = false;}@@ -147,10 +147,10 @@ class RegisterController extends Controller* @throws FireflyException* @throws NotFoundExceptionInterface*/- public function showInviteForm(Request $request, string $code): Factory|\Illuminate\Contracts\View\View+ public function showInviteForm(Request $request, string $code): Factory | \Illuminate\Contracts\View\View{$isDemoSite = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;- $pageTitle = (string) trans('firefly.register_page_title');+ $pageTitle = (string)trans('firefly.register_page_title');$repository = app(UserRepositoryInterface::class);$allowRegistration = $this->allowedToRegister();$inviteCode = $code;@@ -167,7 +167,7 @@ class RegisterController extends Controllerreturn view('errors.error', ['message' => $message]);}- $email = $request->old('email');+ $email = $request->old('email');return view('auth.register', ['isDemoSite' => $isDemoSite, 'email' => $email, 'pageTitle' => $pageTitle, 'inviteCode' => $inviteCode]);}@@ -181,10 +181,10 @@ class RegisterController extends Controller* @throws FireflyException* @throws NotFoundExceptionInterface*/- public function showRegistrationForm(?Request $request = null): Factory|\Illuminate\Contracts\View\View+ public function showRegistrationForm(?Request $request = null): Factory | \Illuminate\Contracts\View\View{$isDemoSite = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;- $pageTitle = (string) trans('firefly.register_page_title');+ $pageTitle = (string)trans('firefly.register_page_title');$allowRegistration = $this->allowedToRegister();if (false === $allowRegistration) {@@ -193,7 +193,7 @@ class RegisterController extends Controllerreturn view('errors.error', ['message' => $message]);}- $email = $request?->old('email');+ $email = $request?->old('email');return view('auth.register', ['isDemoSite' => $isDemoSite, 'email' => $email, 'pageTitle' => $pageTitle]);}diff --git a/app/Listeners/Security/System/HandlesNewUserRegistration.php b/app/Listeners/Security/System/HandlesNewUserRegistration.phpnew file mode 100644index 0000000000..7cb712243a--- /dev/null+++ b/app/Listeners/Security/System/HandlesNewUserRegistration.php@@ -0,0 +1,168 @@+<?php+/*+ * ProcessesNewUserRegistration.php+ * Copyright (c) 2026 [email protected]+ *+ * This file is part of Firefly III (https://github.com/firefly-iii).+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as+ * published by the Free Software Foundation, either version 3 of the+ * License, or (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ */++namespace FireflyIII\Listeners\Security\System;++use Database\Seeders\ExchangeRateSeeder;+use Exception;+use FireflyIII\Enums\UserRoleEnum;+use FireflyIII\Events\Security\System\NewUserRegistered;+use FireflyIII\Exceptions\FireflyException;+use FireflyIII\Models\GroupMembership;+use FireflyIII\Models\UserGroup;+use FireflyIII\Models\UserRole;+use FireflyIII\Notifications\Admin\UserRegistration as AdminRegistrationNotification;+use FireflyIII\Notifications\Notifiables\OwnerNotifiable;+use FireflyIII\Notifications\User\UserRegistration as UserRegistrationNotification;+use FireflyIII\Repositories\User\UserRepositoryInterface;+use FireflyIII\Support\Facades\FireflyConfig;+use FireflyIII\User;+use Illuminate\Support\Facades\Log;+use Illuminate\Support\Facades\Notification;++class HandlesNewUserRegistration+{+ public function handle(NewUserRegistered $event): void+ {+ $this->sendRegistrationMail($event->user);+ $this->sendAdminRegistrationNotification($event->user, $event->owner);+ $this->attachUserRole($event->user);+ $this->createGroupMembership($event->user);+ $this->createExchangeRates();+ }+++ private function attachUserRole(User $user): void+ {+ /** @var UserRepositoryInterface $repository */+ $repository = app(UserRepositoryInterface::class);++ // first user ever?+ if (1 === $repository->count()) {+ Log::debug('User count is one, attach role.');+ $repository->attachRole($user, 'owner');+ }+ }++ /**+ * @throws FireflyException+ */+ private function createGroupMembership(User $user): void+ {+ $groupExists = true;+ $groupTitle = $user->email;+ $index = 1;++ /** @var null|UserGroup $group */+ $group = null;++ // create a new group.+ while ($groupExists) { // @phpstan-ignore-line+ $groupExists = UserGroup::where('title', $groupTitle)->count() > 0;+ if (false === $groupExists) {+ $group = UserGroup::create(['title' => $groupTitle]);++ break;+ }+ $groupTitle = sprintf('%s-%d', $user->email, $index);+ ++$index;+ if ($index > 99) {+ throw new FireflyException('Email address can no longer be used for registrations.');+ }+ }++ /** @var null|UserRole $role */+ $role = UserRole::where('title', UserRoleEnum::OWNER->value)->first();+ if (null === $role) {+ throw new FireflyException('The user role is unexpectedly empty. Did you run all migrations?');+ }+ GroupMembership::create(+ [+ 'user_id' => $user->id,+ 'user_group_id' => $group->id,+ 'user_role_id' => $role->id,+ ]+ );+ $user->user_group_id = $group->id;+ $user->save();+ }+++ /**+ * @SuppressWarnings("PHPMD.UnusedFormalParameter")+ */+ private function createExchangeRates(): void+ {+ $seeder = new ExchangeRateSeeder();+ $seeder->run();+ }++ private function sendAdminRegistrationNotification(User $user, OwnerNotifiable $owner): void+ {+ $sendMail = (bool)FireflyConfig::get('notification_admin_new_reg', true)->data;+ if (!$sendMail) {+ return;+ }+ try {+ Notification::send($owner, new AdminRegistrationNotification($user));+ } catch (Exception $e) {+ $message = $e->getMessage();+ if (str_contains($message, 'Bcc')) {+ Log::warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');++ return;+ }+ if (str_contains($message, 'RFC 2822')) {+ Log::warning('[RFC] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');++ return;+ }+ Log::error($e->getMessage());+ Log::error($e->getTraceAsString());+ }+ }+++ private function sendRegistrationMail(User $user): void+ {+ $sendMail = (bool)FireflyConfig::get('notification_user_new_reg', true)->data;+ if (!$sendMail) {+ return;+ }+ try {+ Notification::send($user, new UserRegistrationNotification());+ } catch (Exception $e) {+ $message = $e->getMessage();+ if (str_contains($message, 'Bcc')) {+ Log::warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');++ return;+ }+ if (str_contains($message, 'RFC 2822')) {+ Log::warning('[RFC] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');++ return;+ }+ Log::error($e->getMessage());+ Log::error($e->getTraceAsString());+ }+ }+}diff --git a/app/Listeners/Security/System/NotifiesOwnerAboutNewVersion.php b/app/Listeners/Security/System/NotifiesOwnerAboutNewVersion.phpnew file mode 100644index 0000000000..4ed34bfbd3--- /dev/null+++ b/app/Listeners/Security/System/NotifiesOwnerAboutNewVersion.php@@ -0,0 +1,61 @@+<?php+/*+ * NotifiesOwnerAboutNewVersion.php+ * Copyright (c) 2026 [email protected]+ *+ * This file is part of Firefly III (https://github.com/firefly-iii).+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as+ * published by the Free Software Foundation, either version 3 of the+ * License, or (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ */++namespace FireflyIII\Listeners\Security\System;++use Exception;+use FireflyIII\Events\Security\System\SystemFoundNewVersionOnline;+use FireflyIII\Notifications\Admin\VersionCheckResult;+use FireflyIII\Notifications\Notifiables\OwnerNotifiable;+use FireflyIII\Support\Facades\FireflyConfig;+use Illuminate\Support\Facades\Log;+use Illuminate\Support\Facades\Notification;++class NotifiesOwnerAboutNewVersion+{+ public function handle(SystemFoundNewVersionOnline $event): void+ {+ $sendMail = FireflyConfig::get('notification_new_version', true)->data;+ if (false === $sendMail) {+ return;+ }++ try {+ $owner = new OwnerNotifiable();+ Notification::send($owner, new VersionCheckResult($event->message));+ } catch (Exception $e) {+ $message = $e->getMessage();+ if (str_contains($message, 'Bcc')) {+ Log::warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');++ return;+ }+ if (str_contains($message, 'RFC 2822')) {+ Log::warning('[RFC] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');++ return;+ }+ Log::error($e->getMessage());+ Log::error($e->getTraceAsString());+ }+ }++}diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.phpindex f76cd874d0..c60669e2de 100644--- a/app/Providers/EventServiceProvider.php+++ b/app/Providers/EventServiceProvider.php@@ -26,9 +26,7 @@ namespace FireflyIII\Providers;use FireflyIII\Events\Admin\InvitationCreated;use FireflyIII\Events\DestroyedTransactionGroup;use FireflyIII\Events\Model\TransactionGroup\TriggeredStoredTransactionGroup;-use FireflyIII\Events\NewVersionAvailable;use FireflyIII\Events\Preferences\UserGroupChangedPrimaryCurrency;-use FireflyIII\Events\RegisteredUser;use FireflyIII\Events\RequestedNewPassword;use FireflyIII\Events\RequestedReportOnJournals;use FireflyIII\Events\RequestedSendWebhookMessages;@@ -54,13 +52,9 @@ class EventServiceProvider extends ServiceProviderprotected $listen= [// is a User related event.- RegisteredUser::class => [- 'FireflyIII\Handlers\Events\UserEventHandler@sendRegistrationMail',- 'FireflyIII\Handlers\Events\UserEventHandler@sendAdminRegistrationNotification',- 'FireflyIII\Handlers\Events\UserEventHandler@attachUserRole',- 'FireflyIII\Handlers\Events\UserEventHandler@createGroupMembership',- 'FireflyIII\Handlers\Events\UserEventHandler@createExchangeRates',- ],+// RegisteredUser::class => [+// 'FireflyIII\Handlers\Events\UserEventHandler@createExchangeRates',+// ],// UserAttemptedLogin::class => [// 'FireflyIII\Handlers\Events\UserEventHandler@sendLoginAttemptNotification',// ],@@ -91,20 +85,10 @@ class EventServiceProvider extends ServiceProvider'FireflyIII\Handlers\Events\UserEventHandler@sendEmailChangeConfirmMail','FireflyIII\Handlers\Events\UserEventHandler@sendEmailChangeUndoMail',],- // admin related- // OwnerTestsNotificationChannel::class => [- // 'FireflyIII\Handlers\Events\AdminEventHandler@sendTestNotification',- // ],- NewVersionAvailable::class => [- 'FireflyIII\Handlers\Events\AdminEventHandler@sendNewVersion',- ],InvitationCreated::class => ['FireflyIII\Handlers\Events\AdminEventHandler@sendInvitationNotification','FireflyIII\Handlers\Events\UserEventHandler@sendRegistrationInvite',],- // UnknownUserAttemptedLogin::class => [- // 'FireflyIII\Handlers\Events\AdminEventHandler@sendLoginAttemptNotification',- // ],// is a Transaction Journal related event.StoredTransactionGroup::class => [diff --git a/app/Services/FireflyIIIOrg/Update/UpdateRequest.php b/app/Services/FireflyIIIOrg/Update/UpdateRequest.phpindex a3433dc02c..24a9f55ba6 100644--- a/app/Services/FireflyIIIOrg/Update/UpdateRequest.php+++ b/app/Services/FireflyIIIOrg/Update/UpdateRequest.php@@ -25,7 +25,7 @@ declare(strict_types=1);namespace FireflyIII\Services\FireflyIIIOrg\Update;use Carbon\Carbon;-use FireflyIII\Events\NewVersionAvailable;+use FireflyIII\Events\Security\System\SystemFoundNewVersionOnline;use FireflyIII\Support\System\IsOldVersion;use GuzzleHttp\Client;use GuzzleHttp\Exception\GuzzleException;@@ -271,7 +271,7 @@ class UpdateRequest implements UpdateRequestInterface]);Log::debug('New release is here!', [$message]);- event(new NewVersionAvailable($message));+ event(new SystemFoundNewVersionOnline($message));return ['level' => 'success',