Skip to content

Commit

Permalink
Move registering events to "booted" rather than "registered" so they …
Browse files Browse the repository at this point in the history
…are registered.
  • Loading branch information
modstore authored and freekmurze committed Sep 18, 2023
1 parent 31eba44 commit c79ec56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/BackupServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ public function configurePackage(Package $package): void

public function packageBooted()
{
$this->app['events']->subscribe(EventHandler::class);

if (EncryptBackupArchive::shouldEncrypt()) {
Event::listen(BackupZipWasCreated::class, EncryptBackupArchive::class);
}
}

public function packageRegistered()
{
$this->app['events']->subscribe(EventHandler::class);

$this->app->singleton(ConsoleOutput::class);

$this->app->bind(CleanupStrategy::class, config('backup.cleanup.strategy'));
Expand Down

0 comments on commit c79ec56

Please sign in to comment.