From 8a32966866f81be52c45071a59b1fd2fd197c073 Mon Sep 17 00:00:00 2001 From: Tomasz Tryka Date: Tue, 15 Mar 2022 14:17:21 +0100 Subject: [PATCH 1/4] Update scout version --- composer.json | 2 +- composer.lock | 39 +++++++++++++++++++++------------------ 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index b5e4ea1..c419403 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "require": { "php": ">=7.1.3", "elasticsearch/elasticsearch": "6.*", - "laravel/scout": "8.*" + "laravel/scout": "9.*" }, "require-dev": { "phpunit/phpunit": "7.*", diff --git a/composer.lock b/composer.lock index 0de5978..105174a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a04499c8feca697308acc55c53038158", + "content-hash": "e9bbb8229e7044bff2012033e9da8cd6", "packages": [ { "name": "brick/math", @@ -1124,39 +1124,42 @@ }, { "name": "laravel/scout", - "version": "v8.6.1", + "version": "v9.4.5", "source": { "type": "git", "url": "https://github.com/laravel/scout.git", - "reference": "7fb1c860a2fd904f0e084a7cc3641eb1448ba278" + "reference": "ac962d2e052e90ca271e9bb1b30229ed870c4963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/scout/zipball/7fb1c860a2fd904f0e084a7cc3641eb1448ba278", - "reference": "7fb1c860a2fd904f0e084a7cc3641eb1448ba278", + "url": "https://api.github.com/repos/laravel/scout/zipball/ac962d2e052e90ca271e9bb1b30229ed870c4963", + "reference": "ac962d2e052e90ca271e9bb1b30229ed870c4963", "shasum": "" }, "require": { - "illuminate/bus": "^6.0|^7.0|^8.0", - "illuminate/contracts": "^6.0|^7.0|^8.0", - "illuminate/database": "^6.0|^7.0|^8.0", - "illuminate/http": "^6.0|^7.0|^8.0", - "illuminate/pagination": "^6.0|^7.0|^8.0", - "illuminate/queue": "^6.0|^7.0|^8.0", - "illuminate/support": "^6.0|^7.0|^8.0", - "php": "^7.2|^8.0" + "illuminate/bus": "^8.0|^9.0", + "illuminate/contracts": "^8.0|^9.0", + "illuminate/database": "^8.0|^9.0", + "illuminate/http": "^8.0|^9.0", + "illuminate/pagination": "^8.0|^9.0", + "illuminate/queue": "^8.0|^9.0", + "illuminate/support": "^8.0|^9.0", + "php": "^7.3|^8.0" }, "require-dev": { + "meilisearch/meilisearch-php": "^0.19", "mockery/mockery": "^1.0", - "phpunit/phpunit": "^8.0|^9.3" + "orchestra/testbench": "^6.17|^7.0", + "phpunit/phpunit": "^9.3" }, "suggest": { - "algolia/algoliasearch-client-php": "Required to use the Algolia engine (^2.2)." + "algolia/algoliasearch-client-php": "Required to use the Algolia engine (^2.2).", + "meilisearch/meilisearch-php": "Required to use the MeiliSearch engine (^0.17)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "8.x-dev" + "dev-master": "9.x-dev" }, "laravel": { "providers": [ @@ -1189,7 +1192,7 @@ "issues": "https://github.com/laravel/scout/issues", "source": "https://github.com/laravel/scout" }, - "time": "2021-04-06T14:35:41+00:00" + "time": "2022-02-22T16:20:15+00:00" }, { "name": "laravel/serializable-closure", @@ -5613,5 +5616,5 @@ "php": ">=7.1.3" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.2.0" } From 720a1d724fd5921be6d75a2d7877766942cf139e Mon Sep 17 00:00:00 2001 From: Tomasz Tryka Date: Wed, 16 Mar 2022 15:01:53 +0100 Subject: [PATCH 2/4] Update scout version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c419403..73260ab 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "require": { "php": ">=7.1.3", "elasticsearch/elasticsearch": "6.*", - "laravel/scout": "9.*" + "laravel/scout": "8.*||9.*" }, "require-dev": { "phpunit/phpunit": "7.*", From ce0c2f1d555352f6ec3ea490952d5c0a147f185d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Szyma=C5=84ski?= Date: Thu, 14 Apr 2022 12:25:12 +0200 Subject: [PATCH 3/4] Update ElasticEngine.php Add 3 abstract methids --- src/ElasticEngine.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ElasticEngine.php b/src/ElasticEngine.php index 25b0306..1ee4f11 100644 --- a/src/ElasticEngine.php +++ b/src/ElasticEngine.php @@ -344,4 +344,19 @@ public function flush($model) { } + + public function lazyMap(Builder $builder, $results, $model) + { + + } + + public function createIndex($name, array $options = []) + { + + } + + public function deleteIndex($name) + { + + } } From 0e1fc51af809d6f594ead17680815e95ca7b148a Mon Sep 17 00:00:00 2001 From: Tomasz Tryka Date: Mon, 16 May 2022 14:30:08 +0200 Subject: [PATCH 4/4] fix(): get() method within FilterBuilder --- src/Builders/FilterBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Builders/FilterBuilder.php b/src/Builders/FilterBuilder.php index bd169a0..e8f0889 100644 --- a/src/Builders/FilterBuilder.php +++ b/src/Builders/FilterBuilder.php @@ -823,7 +823,7 @@ public function get() { $collection = parent::get(); - if (isset($this->with) && $collection->count() > 0) { + if (isset($this->with) && !empty($this->with) && $collection->count() > 0) { $collection->load($this->with); }