Skip to content

Commit 377ac76

Browse files
committed
Scout 8.x & elastic search 6.x.
1 parent be23fb4 commit 377ac76

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ php:
44
- 7.0
55
- 7.1
66
- 7.2
7+
- 7.3
8+
- 7.4
79

810
sudo: false
911

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
44
[![Build Status](https://travis-ci.com/boxed-code/laravel-scout-elasticsearch.svg?branch=master)](https://travis-ci.com/boxed-code/laravel-scout-elasticsearch)
55

6-
A basic [elastic](https://www.elastic.co/products/elasticsearch) search backed driver [for Laravel Scout](https://laravel.com/docs/5.8/scout).
6+
A basic [elastic](https://www.elastic.co/products/elasticsearch) search backed driver [for Laravel Scout](https://laravel.com/docs/6.0/scout).
77

88
This driver has a simple configuration, requiring you to set the hostname of your elasticsearch node.
99

1010
Note that this driver uses a separate index for each model type as elasticsearch mapping types have been deprecated in elasticsearch 6.0 and will be removed in 8.0, for more information see https://bit.ly/2TZVZvq.
1111

1212
By default, the driver uses the `simple_query_string` full text parser with `and` as the default operator. More information on the functionality & syntax of this query format can be found [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html).
1313

14-
**Requires Scout ^5.0, ^6.0 or ^7.0, Laravel >=5.4 & PHP >=7.0**. Based on the original work of [ErickTamayo](https://github.com/ErickTamayo/laravel-scout-elastic)
14+
**Requires Scout ^7.0 or ^8.0, Laravel >=5.4 & PHP >=7.0**. Based on the original work of [ErickTamayo](https://github.com/ErickTamayo/laravel-scout-elastic)
1515

1616
## Contents
1717

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
],
1212
"require": {
1313
"php": ">=7.0",
14-
"laravel/scout": "^5.0|^6.0|^7.0",
15-
"elasticsearch/elasticsearch": "^5.0"
14+
"laravel/scout": "^7.0|^8.0",
15+
"elasticsearch/elasticsearch": "^5.0|^6.0"
1616
},
1717
"require-dev": {
1818
"mockery/mockery": "~1.0",
19-
"phpunit/phpunit": "~6.0"
19+
"phpunit/phpunit": "~7.5"
2020
},
2121
"autoload": {
2222
"psr-4": {
@@ -25,11 +25,11 @@
2525
},
2626
"autoload-dev": {
2727
"psr-4": {
28-
"Tests\\": "tests"
28+
"Tests\\": ",tests"
2929
}
3030
},
3131
"suggest": {
32-
"elasticsearch/elasticsearch": "Required to use the Elasticsearch engine (^5.0)."
32+
"elasticsearch/elasticsearch": "Required to use, the Elasticsearch engine (^5.0)."
3333
},
3434
"extra": {
3535
"laravel": {

phpunit.xml.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
convertWarningsToExceptions="true"
99
processIsolation="false"
1010
stopOnFailure="false"
11-
syntaxCheck="false"
1211
>
1312
<testsuites>
1413
<testsuite name="Package Test Suite">

tests/ElasticsearchEngineTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function test_update_adds_objects_to_index()
3030
]);
3131

3232
$engine = new ElasticsearchEngine($client);
33-
$engine->update(Collection::make([new TestModel]));
33+
$this->assertNull($engine->update(Collection::make([new TestModel])));
3434
}
3535

3636
public function test_delete_removes_objects_to_index()
@@ -49,7 +49,7 @@ public function test_delete_removes_objects_to_index()
4949
]);
5050

5151
$engine = new ElasticsearchEngine($client);
52-
$engine->delete(Collection::make([new TestModel]));
52+
$this->assertNull($engine->delete(Collection::make([new TestModel])));
5353
}
5454

5555
public function test_search_sends_correct_parameters_to_elasticsearch()
@@ -74,14 +74,14 @@ public function test_search_sends_correct_parameters_to_elasticsearch()
7474
['id' => 'desc']
7575
]
7676
]
77-
]);
77+
])->andReturn($return = [1, 2, 3]);
7878

7979
$engine = new ElasticsearchEngine($client);
8080
$builder = new \Laravel\Scout\Builder(new TestModel, 'zonda');
8181
$builder->where('foo', 1);
8282
$builder->where('bar', [1, 3]);
8383
$builder->orderBy('id', 'desc');
84-
$engine->search($builder);
84+
$this->assertSame($return, $engine->search($builder));
8585
}
8686

8787
public function test_builder_callback_can_manipulate_search_parameters_to_elasticsearch()

0 commit comments

Comments
 (0)