Skip to content

Commit b116727

Browse files
committed
Fixed modules service providers
1 parent 97dcadc commit b116727

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@
118118
"extra": {
119119
"laravel": {
120120
"dont-discover": [
121-
"laravel/telescope"
121+
"laravel/telescope",
122+
"nwidart/laravel-modules"
122123
]
123124
}
124125
},

config/app.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use App\Enums\TimeFormat;
1010
use Illuminate\Support\Facades\Facade;
1111
use Illuminate\Support\ServiceProvider;
12+
use Nwidart\Modules\LaravelModulesServiceProvider;
1213

1314
return [
1415

@@ -197,6 +198,7 @@
197198
App\Providers\FortifyServiceProvider::class,
198199
App\Providers\JetstreamServiceProvider::class,
199200
// Warning: Do not add TelescopeServiceProvider here since it is already conditionally registered in AppServiceProvider
201+
LaravelModulesServiceProvider::class,
200202
])->toArray(),
201203

202204
/*

tests/TestCase.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ abstract class TestCase extends BaseTestCase
2121
{
2222
use CreatesApplication;
2323

24+
protected bool $mockBillingContract = true;
25+
2426
protected function setUp(): void
2527
{
2628
parent::setUp();
2729
Mail::fake();
2830
LogFake::bind();
2931
Http::preventStrayRequests();
30-
$this->actAsOrganizationWithoutSubscriptionAndWithoutTrial();
32+
if ($this->mockBillingContract) {
33+
$this->actAsOrganizationWithoutSubscriptionAndWithoutTrial();
34+
}
3135
// Note: The following line can be used to test timezone edge cases.
3236
// $this->travelTo(Carbon::now()->timezone('Europe/Vienna')->setHour(0)->setMinute(59)->setSecond(0));
3337
}

0 commit comments

Comments
 (0)