-
-
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
[feat] change extend method name to elasticsearch #276
base: master
Are you sure you want to change the base?
Conversation
Hello @Aryalav, thank you for your contribution. Will it also work with class names to avoid backwards compatibility issues? |
Also other drivers could have the same name |
maybe an option is a config parameter, to specify alternative driver name |
Thanks for your reply. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #276 +/- ##
============================================
- Coverage 96.08% 95.99% -0.10%
Complexity 194 194
============================================
Files 36 36
Lines 639 624 -15
============================================
- Hits 614 599 -15
Misses 25 25 ☔ View full report in Codecov by Sentry. |
@@ -23,7 +23,7 @@ public function boot(): void | |||
{ | |||
$this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'scout'); | |||
|
|||
$this->app->make(EngineManager::class)->extend(config('elasticsearch.extended_as'), function () { | |||
$this->app->make(EngineManager::class)->extend(config('elasticsearch.driver_name',ElasticSearchEngine::class), function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space needed 'elasticsearch.driver_name', ElasticSearchEngine::class
Quality Gate passedIssues Measures |
This PR changes the extended name to simply "elasticsearch". So, in the environment, instead of:
SCOUT_DRIVER=Matchish\ScoutElasticSearch\Engines\ElasticSearchEngine
we can simply write:
SCOUT_DRIVER=elasticsearch