From f3b0bdfbb79b892cc751e2122ffee6600b685049 Mon Sep 17 00:00:00 2001 From: Richan Fongdasen Date: Mon, 15 Apr 2024 14:57:04 +0700 Subject: [PATCH] Quick Fix: weird testbench package discovery error --- composer.json | 1 - src/TursoHttpClient.php | 2 +- src/TursoLaravelServiceProvider.php | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 67455c8..1b91e18 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,6 @@ } }, "scripts": { - "post-autoload-dump": "@composer run prepare", "clear": "@php vendor/bin/testbench package:purge-turso-laravel --ansi", "prepare": "@php vendor/bin/testbench package:discover --ansi", "build": [ diff --git a/src/TursoHttpClient.php b/src/TursoHttpClient.php index 6e7956d..8878867 100755 --- a/src/TursoHttpClient.php +++ b/src/TursoHttpClient.php @@ -177,7 +177,7 @@ public function request(): PendingRequest public function resetClientState(): void { $this->baton = null; - $this->baseUrl = data_get($this->config, 'db_url'); + $this->baseUrl = data_get($this->config, 'db_url', ''); $this->isOpen = false; } } diff --git a/src/TursoLaravelServiceProvider.php b/src/TursoLaravelServiceProvider.php index efab9f8..3114fdd 100644 --- a/src/TursoLaravelServiceProvider.php +++ b/src/TursoLaravelServiceProvider.php @@ -57,7 +57,7 @@ public function register(): void parent::register(); $this->app->scoped(TursoManager::class, function () { - return new TursoManager(config('database.connections.turso')); + return new TursoManager(config('database.connections.turso', [])); }); $this->app->extend(DatabaseManager::class, function (DatabaseManager $manager) {