From 08a1476aa4213ba131118174f3ec0bf3315d6a99 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Tue, 25 Jun 2024 16:26:08 +0200 Subject: [PATCH] Laravel10 Compatibility (#5) * Laravel 10 / PHP8.2 compatibility --- composer.json | 19 ++++++++++++------- src/ElasticEngine.php | 15 +++++++++++++++ 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 68e8ad0..8a5868c 100644 --- a/composer.json +++ b/composer.json @@ -12,15 +12,15 @@ ], "license": "MIT", "require": { - "php": "^7.4|^8.0", - "elasticsearch/elasticsearch": "^7.13", - "laravel/framework": "^7.25|^8.0", - "laravel/scout": "^7.0|^8.0" + "php": "^8.2", + "elasticsearch/elasticsearch": "^7.17", + "laravel/framework": "^10.0", + "laravel/scout": "^10.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.19.0", - "phpunit/phpunit": "^8.0", - "orchestra/testbench": "^6.3" + "friendsofphp/php-cs-fixer": "^3.14", + "phpunit/phpunit": "^9.0", + "orchestra/testbench": "^8.0" }, "autoload": { "psr-4": { @@ -44,5 +44,10 @@ "php-cs-fixer fix --config .php-cs-fixer.php -vv --diff --allow-risky=yes --dry-run" ], "test": "phpunit" + }, + "config": { + "allow-plugins": { + "php-http/discovery": true + } } } diff --git a/src/ElasticEngine.php b/src/ElasticEngine.php index e721036..00c092d 100644 --- a/src/ElasticEngine.php +++ b/src/ElasticEngine.php @@ -330,4 +330,19 @@ protected function getModelIDFromHit($hit) { return str_replace($hit['_source']['type'].'_', '', $hit['_id']); } + + public function lazyMap(Builder $builder, $results, $model) + { + // TODO: Implement lazyMap() method. + } + + public function createIndex($name, array $options = []) + { + // TODO: Implement createIndex() method. + } + + public function deleteIndex($name) + { + // TODO: Implement deleteIndex() method. + } }