From c5163814ac92915302dde9f4c4415edb763dc7de Mon Sep 17 00:00:00 2001 From: kuodster Date: Thu, 25 Jan 2024 19:59:48 +0500 Subject: [PATCH] Fix dependency injection to support lumen --- src/Services/Migrator.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Services/Migrator.php b/src/Services/Migrator.php index f1680c9e..02069eea 100644 --- a/src/Services/Migrator.php +++ b/src/Services/Migrator.php @@ -14,7 +14,7 @@ use DragonCode\Support\Facades\Helpers\Str; use DragonCode\Support\Filesystem\File; use Illuminate\Console\OutputStyle; -use Illuminate\Contracts\Foundation\Application; +use Illuminate\Contracts\Container\Container; use Illuminate\Support\Facades\DB; use Throwable; @@ -25,7 +25,7 @@ public function __construct( protected Notification $notification, protected ActionRepository $repository, protected Config $config, - protected Application $laravel + protected Container $container ) {} public function setConnection(?string $connection): self @@ -111,7 +111,7 @@ protected function hasAsync(Action $action, Options $options): bool protected function runMethod(Action $action, string $method, bool $transactions, int $attempts): void { - $callback = fn () => $this->laravel->call([$action, $method]); + $callback = fn () => $this->container->call([$action, $method]); $transactions ? DB::transaction($callback, $attempts) : $callback(); }