matchish / laravel-scout-elasticsearch

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

Change if conditions order in soft deletes check for compatibility #282

Closed rafaucau closed 2 months ago

rafaucau commented 2 months ago

I am integrating this package with Flarum, which is based on Laravel, but not everything is the same. E.g. models do not have the usesSoftDelete method, which causes errors. A simple swap of the order of the checks solves this problem. Context: https://github.com/clarkwinkelmann/flarum-ext-scout/pull/3#issuecomment-2184266623

This should not change the behavior of this package, and it will help in my case.

codecov-commenter commented 2 months ago

Codecov Report

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

Project coverage is 95.99%. Comparing base (3a05178) to head (666addd).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #282 +/- ## ========================================= Coverage 95.99% 95.99% Complexity 194 194 ========================================= Files 36 36 Lines 624 624 ========================================= Hits 599 599 Misses 25 25 ```

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

matchish commented 2 months ago

Hi, thanks for the PR! Could you update the changelog.md? suggested version is 7.6.2

rafaucau commented 2 months ago

@matchish done