Closed ibrahim-mubarak closed 5 years ago
@ibrahim-mubarak can you provide a step by step guide how to reproduce the issue?
I haven't been able to reproduce it in a new project. RIght now I don't have access to a machine with working xdebug. I'll try updating the PR with relevant test cases
This is the stacktrace, I haven't been able to reproduce it on a test project yet
/home/ibrahim/Projects/Web/myproject/vendor/laravel/framework/src/Illuminate/Support/Manager.php:118
/home/ibrahim/Projects/Web/myproject/vendor/laravel/framework/src/Illuminate/Support/Manager.php:90
/home/ibrahim/Projects/Web/myproject/vendor/laravel/scout/src/EngineManager.php:22
/home/ibrahim/Projects/Web/myproject/vendor/laravel/scout/src/Searchable.php:249
/home/ibrahim/Projects/Web/myproject/vendor/laravel/scout/src/Searchable.php:83
/home/ibrahim/Projects/Web/myproject/vendor/laravel/scout/src/Searchable.php:46
/home/ibrahim/Projects/Web/myproject/vendor/laravel/framework/src/Illuminate/Support/Traits/Macroable.php:112
/home/ibrahim/Projects/Web/myproject/vendor/laravel/scout/src/Searchable.php:161
/home/ibrahim/Projects/Web/myproject/vendor/laravel/scout/src/ModelObserver.php:64
/home/ibrahim/Projects/Web/myproject/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:366
/home/ibrahim/Projects/Web/myproject/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:196
/home/ibrahim/Projects/Web/myproject/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php:188
/home/ibrahim/Projects/Web/myproject/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:708
/home/ibrahim/Projects/Web/myproject/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:679
/home/ibrahim/Projects/Web/myproject/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php:206
/home/ibrahim/Projects/Web/myproject/vendor/laravel/framework/src/Illuminate/Support/Traits/EnumeratesValues.php:176
/home/ibrahim/Projects/Web/myproject/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php:207
/home/ibrahim/Projects/Web/myproject/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php:181
/home/ibrahim/Projects/Web/myproject/tests/Feature/CanSeeBookingInvoiceApiTest.php:37
This fixes an issue where the ScoutArrayEngineServiceProvider is called after the ScoutServiceProvider and the array driver in effect is not registered.
By following the ServiceProvider Documentation and only registering the singleton and bindings in the register method and extending Scout EngineManager in the boot method, this can be fixed.