Skip to content

Commit

Permalink
missing singleton override for classes
Browse files Browse the repository at this point in the history
  • Loading branch information
d8vjork committed Aug 16, 2024
1 parent 84475d0 commit f585a81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ public function register()
\Illuminate\Events\Dispatcher::mixin(new \OpenSoutheners\ExtendedLaravel\Events\Dispatcher);
\Illuminate\Validation\Rule::mixin(new \OpenSoutheners\ExtendedLaravel\Validation\Rule);

// Laravel replacements to get the modified with OpensGeneratedFiles trait
$this->app->booted(function() {
Artisan::starting(function() {
// Laravel replacements to get them the OpensFile class
foreach ($this->overrides as $abstract => $override) {
$this->app->singleton($abstract, $override);
$this->app->singleton(get_parent_class($override), $override);
}
});
});
Expand Down

0 comments on commit f585a81

Please sign in to comment.