matchish / laravel-scout-elasticsearch

Search among multiple models with ElasticSearch and Laravel Scout
MIT License
702 stars 113 forks source link

[feat] change extend method name to elasticsearch #276

Open Aryalav opened 4 months ago

Aryalav commented 4 months ago

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

hkulekci commented 3 months ago

Hello @Aryalav, thank you for your contribution. Will it also work with class names to avoid backwards compatibility issues?

matchish commented 3 months ago

Also other drivers could have the same name elasticsearch. And I agree with @hkulekci that it's better to keep backward compatibility. as you can see now the tests are failed. To summarise I'm ok if we could have shorter name as alternative but class name should work as well. And the string should be less generic to differentiate from other drivers

matchish commented 3 months ago

maybe an option is a config parameter, to specify alternative driver name

Aryalav commented 3 months ago

maybe an option is a config parameter, to specify alternative driver name

Thanks for your reply. Sounds fair; I will add this as a key in the config.

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.99%. Comparing base (9b675df) to head (be7f9e1). Report is 9 commits behind head on master.

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.