From f585a815b0a92f674d5afba8c3c5574129443764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rube=CC=81n=20Robles?= Date: Fri, 16 Aug 2024 18:53:23 +0200 Subject: [PATCH] missing singleton override for classes --- src/ServiceProvider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index 33f824a..f7af7c8 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -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); } }); });