-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Scout import overrides scout driver in config when package is installed #119
Comments
@matchish |
Cool, a pull requests for that would being highly appreciated. 🎉 Here I set a driver for tests. You have to override it in your tests
|
@matchish Since what we want to accomplish here is that when I guess that could happen in one of the following 2 providers, but I'm not sure:
What would you suggest? |
I believe the solution is to not register commands if driver isn't
|
Does it solve the issue if you add this package to dev section of composer file?Then you can install without dev dependencies on production |
@matchish Well since we try our staging environment to be 100% identical to the production environment (for greater debugging) it won't solve the issue. I believe a check for the |
Also you can try to make providers deffered https://laravel.com/docs/7.x/providers#deferred-providers |
Describe the bug
We are using multiple scout drivers in our app and more specifically elasticsearch in staging server and algolia in production server. It seems that while algolia is set in production as default scout engine the php artisan scout:import uses the elasticsearch import of your package instead of that of algolia. Funny thing is that php artisan scout:flush on the other hand works great and flushes data in algolia as expected.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Correct Expected Behaviour: Either to import to algolia (if credentials are set correctly) or show an algolia related error message
What actually happens: An elasticsearch error will occur
Version
"laravel/framework": "^6.18",
"laravel/scout": "^8.0",
"matchish/laravel-scout-elasticsearch": "4.0.x",
The text was updated successfully, but these errors were encountered: