From aedb9a016dd7025d00d36b03b5fa3e065b965d72 Mon Sep 17 00:00:00 2001 From: Constantin Graf Date: Wed, 23 Jul 2025 15:52:31 +0200 Subject: [PATCH] Fixed modules service providers --- composer.json | 3 ++- config/app.php | 2 ++ tests/TestCase.php | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 10af10bf..53c40842 100644 --- a/composer.json +++ b/composer.json @@ -118,7 +118,8 @@ "extra": { "laravel": { "dont-discover": [ - "laravel/telescope" + "laravel/telescope", + "nwidart/laravel-modules" ] } }, diff --git a/config/app.php b/config/app.php index 8acf6252..a15c3759 100644 --- a/config/app.php +++ b/config/app.php @@ -9,6 +9,7 @@ use App\Enums\NumberFormat; use App\Enums\TimeFormat; use Illuminate\Support\Facades\Facade; use Illuminate\Support\ServiceProvider; +use Nwidart\Modules\LaravelModulesServiceProvider; return [ @@ -197,6 +198,7 @@ return [ App\Providers\FortifyServiceProvider::class, App\Providers\JetstreamServiceProvider::class, // Warning: Do not add TelescopeServiceProvider here since it is already conditionally registered in AppServiceProvider + LaravelModulesServiceProvider::class, ])->toArray(), /* diff --git a/tests/TestCase.php b/tests/TestCase.php index cc158eca..95b21835 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -21,13 +21,17 @@ abstract class TestCase extends BaseTestCase { use CreatesApplication; + protected bool $mockBillingContract = true; + protected function setUp(): void { parent::setUp(); Mail::fake(); LogFake::bind(); Http::preventStrayRequests(); - $this->actAsOrganizationWithoutSubscriptionAndWithoutTrial(); + if ($this->mockBillingContract) { + $this->actAsOrganizationWithoutSubscriptionAndWithoutTrial(); + } // Note: The following line can be used to test timezone edge cases. // $this->travelTo(Carbon::now()->timezone('Europe/Vienna')->setHour(0)->setMinute(59)->setSecond(0)); }