Skip to content
This repository was archived by the owner on May 13, 2021. It is now read-only.

Commit 99301f6

Browse files
authored
Merge pull request #66 from shokme/php8-support
add php 8 support
2 parents 37833ef + d8063c9 commit 99301f6

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,6 @@ jobs:
3232
- name: Install dependencies
3333
run: composer install --prefer-dist --no-progress --no-suggest
3434
- name: Run linter
35+
env:
36+
PHP_CS_FIXER_IGNORE_ENV: 1
3537
run: composer lint

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
]
2323
},
2424
"require": {
25-
"php": "^7.2.5",
25+
"php": "^7.2|^8.0",
2626
"laravel/scout": "^8.0",
2727
"meilisearch/meilisearch-php": "^0.15",
2828
"http-interop/http-factory-guzzle": "^1.0"

tests/MeilisearchEngineTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ protected function tearDown(): void
1919
}
2020

2121
/** @test */
22-
public function update_adds_objects_to_index()
22+
public function updateAddsObjectsToIndex()
2323
{
2424
$client = m::mock(Client::class);
2525
$client->shouldReceive('getOrCreateIndex')->with('table', ['primaryKey' => 'id'])->andReturn($index = m::mock(Indexes::class));
@@ -34,7 +34,7 @@ public function update_adds_objects_to_index()
3434
}
3535

3636
/** @test */
37-
public function delete_removes_objects_to_index()
37+
public function deleteRemovesObjectsToIndex()
3838
{
3939
$client = m::mock(Client::class);
4040
$client->shouldReceive('getIndex')->with('table')->andReturn($index = m::mock(Indexes::class));
@@ -45,7 +45,7 @@ public function delete_removes_objects_to_index()
4545
}
4646

4747
/** @test */
48-
public function search_sends_correct_parameters_to_meilisearch()
48+
public function searchSendsCorrectParametersToMeilisearch()
4949
{
5050
$client = m::mock(Client::class);
5151
$client->shouldReceive('getIndex')->with('table')->andReturn($index = m::mock(Indexes::class));
@@ -63,7 +63,7 @@ public function search_sends_correct_parameters_to_meilisearch()
6363
}
6464

6565
/** @test */
66-
public function mapIds_returns_empty_collection_if_no_hits()
66+
public function mapIdsReturnsEmptyCollectionIfNoHits()
6767
{
6868
$client = m::mock(Client::class);
6969
$engine = new MeilisearchEngine($client);
@@ -76,7 +76,7 @@ public function mapIds_returns_empty_collection_if_no_hits()
7676
}
7777

7878
/** @test */
79-
public function map_correctly_maps_results_to_models()
79+
public function mapCorrectlyMapsResultsToModels()
8080
{
8181
$client = m::mock(Client::class);
8282
$engine = new MeilisearchEngine($client);
@@ -96,7 +96,7 @@ public function map_correctly_maps_results_to_models()
9696
}
9797

9898
/** @test */
99-
public function map_method_respects_order()
99+
public function mapMethodRespectsOrder()
100100
{
101101
$client = m::mock(Client::class);
102102
$engine = new MeilisearchEngine($client);
@@ -131,7 +131,7 @@ public function map_method_respects_order()
131131
}
132132

133133
/** @test */
134-
public function a_model_is_indexed_with_a_custom_meilisearch_key()
134+
public function aModelIsIndexedWithACustomMeilisearchKey()
135135
{
136136
$client = m::mock(Client::class);
137137
$client->shouldReceive('getOrCreateIndex')->with('table', ['primaryKey' => 'id'])->andReturn($index = m::mock(Indexes::class));
@@ -142,7 +142,7 @@ public function a_model_is_indexed_with_a_custom_meilisearch_key()
142142
}
143143

144144
/** @test */
145-
public function flush_a_model_with_a_custom_meilisearch_key()
145+
public function flushAModelWithACustomMeilisearchKey()
146146
{
147147
$client = m::mock(Client::class);
148148
$client->shouldReceive('getIndex')->with('table')->andReturn($index = m::mock(Indexes::class));
@@ -153,7 +153,7 @@ public function flush_a_model_with_a_custom_meilisearch_key()
153153
}
154154

155155
/** @test */
156-
public function update_empty_searchable_array_does_not_add_objects_to_index()
156+
public function updateEmptySearchableArrayDoesNotAddObjectsToIndex()
157157
{
158158
$client = m::mock(Client::class);
159159
$client->shouldReceive('getOrCreateIndex')->with('table', ['primaryKey' => 'id'])->andReturn($index = m::mock(Indexes::class));
@@ -164,7 +164,7 @@ public function update_empty_searchable_array_does_not_add_objects_to_index()
164164
}
165165

166166
/** @test */
167-
public function pagination_correct_parameters()
167+
public function paginationCorrectParameters()
168168
{
169169
$perPage = 5;
170170
$page = 2;

0 commit comments

Comments
 (0)