From b53a6c2613fc5b68cb87182c1635b14140e8b788 Mon Sep 17 00:00:00 2001 From: "mark.whitney" Date: Fri, 15 Sep 2023 15:53:46 +1000 Subject: [PATCH] Move registering events to "booted" rather than "registered" so they are registered. --- src/BackupServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BackupServiceProvider.php b/src/BackupServiceProvider.php index 148fe943..64e4c663 100644 --- a/src/BackupServiceProvider.php +++ b/src/BackupServiceProvider.php @@ -36,6 +36,8 @@ public function configurePackage(Package $package): void public function packageBooted() { + $this->app['events']->subscribe(EventHandler::class); + if (EncryptBackupArchive::shouldEncrypt()) { Event::listen(BackupZipWasCreated::class, EncryptBackupArchive::class); } @@ -43,8 +45,6 @@ public function packageBooted() public function packageRegistered() { - $this->app['events']->subscribe(EventHandler::class); - $this->app->singleton(ConsoleOutput::class); $this->app->bind(CleanupStrategy::class, config('backup.cleanup.strategy'));