Skip to content

Commit 8d6c5f7

Browse files
authored
Merge branch 'main' into bump-meilisearch-v0.12.0
2 parents 8254856 + e642288 commit 8d6c5f7

File tree

6 files changed

+21
-14
lines changed

6 files changed

+21
-14
lines changed

.github/workflows/meilisearch-beta-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
MEILI_NO_ANALYTICS: true
3939
strategy:
4040
matrix:
41-
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3']
41+
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
4242
http-client: ['Guzzle-7', 'Guzzle-7-Adapter', 'Symfony-HttpClient', 'PHP-HTTP-CurlClient', 'Kriswallsmith-Buzz']
4343
exclude:
4444
- php-version: '7.4'

.github/workflows/pre-release-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
MEILI_NO_ANALYTICS: true
3939
strategy:
4040
matrix:
41-
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3']
41+
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
4242
http-client: ['Guzzle-7', 'Guzzle-7-Adapter', 'Symfony-HttpClient', 'PHP-HTTP-CurlClient', 'Kriswallsmith-Buzz']
4343
exclude:
4444
- php-version: '7.4'

.github/workflows/tests.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@ jobs:
2626
lint:
2727
runs-on: ubuntu-latest
2828
name: linter-check
29+
env:
30+
PHP_CS_FIXER_IGNORE_ENV: 1
2931
steps:
3032
- name: Checkout code
3133
uses: actions/checkout@v4
3234

3335
- name: Install PHP
3436
uses: shivammathur/setup-php@v2
3537
with:
36-
php-version: 8.3
38+
php-version: 8.4
3739
coverage: none
3840

3941
- name: Install dependencies
@@ -52,7 +54,7 @@ jobs:
5254
- name: Install PHP
5355
uses: shivammathur/setup-php@v2
5456
with:
55-
php-version: 8.2
57+
php-version: 8.4
5658
coverage: none
5759

5860
- name: Install dependencies
@@ -77,7 +79,7 @@ jobs:
7779
MEILI_NO_ANALYTICS: true
7880
strategy:
7981
matrix:
80-
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3']
82+
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
8183
http-client: ['Guzzle-7', 'Guzzle-7-Adapter', 'Symfony-HttpClient', 'PHP-HTTP-CurlClient', 'Kriswallsmith-Buzz']
8284
exclude:
8385
- php-version: '7.4'

bors.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ status = [
2828
'integration-tests (PHP 8.3) (Symfony-HttpClient)',
2929
'integration-tests (PHP 8.3) (PHP-HTTP-CurlClient)',
3030
'integration-tests (PHP 8.3) (Kriswallsmith-Buzz)',
31+
32+
'integration-tests (PHP 8.4) (Guzzle-7)',
33+
'integration-tests (PHP 8.4) (Guzzle-7-Adapter)',
34+
'integration-tests (PHP 8.4) (Symfony-HttpClient)',
35+
'integration-tests (PHP 8.4) (PHP-HTTP-CurlClient)',
36+
'integration-tests (PHP 8.4) (Kriswallsmith-Buzz)',
3137
]
3238
# 1 hour timeout
3339
timeout-sec = 3600

src/Search/SearchResult.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,18 @@ public function __construct(array $body)
5858
$this->offset = $body['offset'];
5959
$this->limit = $body['limit'];
6060
$this->estimatedTotalHits = $body['estimatedTotalHits'];
61-
$this->hitsCount = \count($body['hits']);
6261
} else {
6362
$this->numberedPagination = true;
6463

6564
$this->hitsPerPage = $body['hitsPerPage'];
6665
$this->page = $body['page'];
6766
$this->totalPages = $body['totalPages'];
6867
$this->totalHits = $body['totalHits'];
69-
$this->hitsCount = $body['totalHits'];
7068
}
7169

7270
$this->semanticHitCount = $body['semanticHitCount'] ?? 0;
7371
$this->hits = $body['hits'] ?? [];
72+
$this->hitsCount = \count($body['hits']);
7473
$this->processingTimeMs = $body['processingTimeMs'];
7574
$this->query = $body['query'];
7675
$this->facetDistribution = $body['facetDistribution'] ?? [];

tests/Endpoints/SearchTestNestedFields.php renamed to tests/Endpoints/SearchNestedFieldsTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Meilisearch\Endpoints\Indexes;
88
use Tests\TestCase;
99

10-
final class SearchTestNestedFields extends TestCase
10+
final class SearchNestedFieldsTest extends TestCase
1111
{
1212
private Indexes $index;
1313

@@ -16,7 +16,7 @@ protected function setUp(): void
1616
parent::setUp();
1717
$this->index = $this->createEmptyIndex($this->safeIndexName('nestedIndex'));
1818
$promise = $this->index->updateDocuments(self::NESTED_DOCUMENTS);
19-
$this->index->waitForTask($promise['uid']);
19+
$this->index->waitForTask($promise['taskUid']);
2020
}
2121

2222
public function testBasicSearchOnNestedFields(): void
@@ -48,7 +48,7 @@ public function testSearchOnNestedFieldWithMultiplesResultsOnNestedFields(): voi
4848

4949
self::assertArrayHasKey('hits', $response);
5050
self::assertSame(6, $response['estimatedTotalHits']);
51-
self::assertSame(4, $response['hits'][0]['id']);
51+
self::assertSame(1, $response['hits'][0]['id']);
5252
}
5353

5454
public function testSearchOnNestedFieldWithOptions(): void
@@ -62,13 +62,13 @@ public function testSearchOnNestedFieldWithOptions(): void
6262
]);
6363

6464
self::assertCount(1, $response['hits']);
65-
self::assertSame(4, $response['hits'][0]['id']);
65+
self::assertSame(1, $response['hits'][0]['id']);
6666
}
6767

6868
public function testSearchOnNestedFieldWithSearchableAtributes(): void
6969
{
7070
$response = $this->index->updateSearchableAttributes(['title', 'info.comment']);
71-
$this->index->waitForTask($response['uid']);
71+
$this->index->waitForTask($response['taskUid']);
7272

7373
$response = $this->index->search('An awesome');
7474

@@ -87,7 +87,7 @@ public function testSearchOnNestedFieldWithSearchableAtributes(): void
8787
public function testSearchOnNestedFieldWithSortableAtributes(): void
8888
{
8989
$response = $this->index->updateSortableAttributes(['info.reviewNb']);
90-
$this->index->waitForTask($response['uid']);
90+
$this->index->waitForTask($response['taskUid']);
9191

9292
$response = $this->index->search('An awesome');
9393

@@ -111,7 +111,7 @@ public function testSearchOnNestedFieldWithSortableAtributesAndSearchableAttribu
111111
'searchableAttributes' => ['title', 'info.comment'],
112112
'sortableAttributes' => ['info.reviewNb'],
113113
]);
114-
$this->index->waitForTask($response['uid']);
114+
$this->index->waitForTask($response['taskUid']);
115115

116116
$response = $this->index->search('An awesome');
117117

0 commit comments

Comments
 (0)