Skip to content

Commit

Permalink
Handle providers only when true in config
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspertey committed Nov 14, 2024
1 parent 52c7bee commit a5aa30d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions src/LaravelDDDServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ public function packageBooted()
);
}

// dump([
// 'package booted' => config('ddd')
// ]);

DDD::autoloader()->boot();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Support/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function boot(): void
}

$this
->handleProviders()
->when(config('ddd.autoload.providers') === true, fn ($autoloader) => $autoloader->handleProviders())
->when(app()->runningInConsole() && config('ddd.autoload.commands') === true, fn ($autoloader) => $autoloader->handleCommands())
->when(config('ddd.autoload.policies') === true, fn ($autoloader) => $autoloader->handlePolicies())
->when(config('ddd.autoload.factories') === true, fn ($autoloader) => $autoloader->handleFactories());
Expand Down

0 comments on commit a5aa30d

Please sign in to comment.