From 45655839fa3bd6f4560157fc95095654e488a51a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ca=C5=82ka?= Date: Sun, 23 Jun 2024 12:52:49 +0200 Subject: [PATCH 1/2] fix: change if conditions order in soft deletes check for compatibility --- src/ElasticSearch/Params/Bulk.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ElasticSearch/Params/Bulk.php b/src/ElasticSearch/Params/Bulk.php index 475ece0..8d4c562 100644 --- a/src/ElasticSearch/Params/Bulk.php +++ b/src/ElasticSearch/Params/Bulk.php @@ -41,7 +41,7 @@ public function toArray(): array $payload = ['body' => []]; $payload = collect($this->indexDocs)->reduce( function ($payload, $model) { - if ($model::usesSoftDelete() && config('scout.soft_delete', false)) { + if (config('scout.soft_delete', false) && $model::usesSoftDelete()) { $model->pushSoftDeleteMetadata(); } From 666addde0dd6ce7542c7312f58b3db74608e3f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ca=C5=82ka?= Date: Mon, 24 Jun 2024 13:12:38 +0200 Subject: [PATCH 2/2] docs: update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c78b23b..c5e73f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/) ## [Unreleased] +## [7.6.2] - 2024-06-24 +### Fixed +- [Change if conditions order in soft deletes check for compatibility](https://github.com/matchish/laravel-scout-elasticsearch/pull/282). + ## [7.6.1] - 2024-05-14 ### Fixed - fix for [parser incompatibility](https://github.com/matchish/laravel-scout-elasticsearch/issues/273)