Skip to content

Commit dbc31c0

Browse files
bors[bot]dependabot-preview[bot]curquiza
authored
Merge #45
45: Update meilisearch/meilisearch-php requirement from ^0.15 to ^0.16 r=curquiza a=dependabot-preview[bot] Updates the requirements on meilisearch/meilisearch-php to permit the latest version. You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) </details> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Clémentine Urquizar <[email protected]>
2 parents 450735e + ce0af08 commit dbc31c0

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"require": {
2121
"php": "^7.2",
2222
"ext-json": "*",
23-
"meilisearch/meilisearch-php": "^0.15",
23+
"meilisearch/meilisearch-php": "^0.16",
2424
"symfony/filesystem": "^4.0 || ^5.0",
2525
"symfony/property-access": "^4.0 || ^5.0",
2626
"symfony/serializer": "^4.0 || ^5.0"

src/Command/MeiliSearchImportCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ private function formatIndexingResponse(array $batch): array
182182
$formattedResponse[$indexName] = 0;
183183
}
184184

185-
$indexInstance = $this->searchClient->getIndex($indexName);
185+
$indexInstance = $this->searchClient->index($indexName);
186186

187187
// Get Update status from updateID
188188
$indexInstance->waitForPendingUpdate($apiResponse['updateId']);

src/Engine.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function remove($searchableEntities): array
106106
$result = [];
107107
foreach ($data as $indexName => $objects) {
108108
$result[$indexName] = $this->client
109-
->getIndex($indexName)
109+
->index($indexName)
110110
->deleteDocument(reset($objects));
111111
}
112112

@@ -148,17 +148,17 @@ public function delete(string $indexName): ?array
148148
*
149149
* @param string $query
150150
* @param string $indexName
151-
* @param array $requestOptions
151+
* @param array $searchParams
152152
*
153153
* @return array
154154
*/
155-
public function search(string $query, string $indexName, array $requestOptions): array
155+
public function search(string $query, string $indexName, array $searchParams): array
156156
{
157157
if ('' === $query) {
158158
$query = null;
159159
}
160160

161-
return $this->client->getIndex($indexName)->search($query, $requestOptions);
161+
return $this->client->index($indexName)->rawSearch($query, $searchParams);
162162
}
163163

164164
/**
@@ -172,6 +172,6 @@ public function search(string $query, string $indexName, array $requestOptions):
172172
*/
173173
public function count(string $query, string $indexName, array $requestOptions): int
174174
{
175-
return (int) $this->client->getIndex($indexName)->search($query, $requestOptions)['nbHits'];
175+
return (int) $this->client->index($indexName)->search($query, $requestOptions)['nbHits'];
176176
}
177177
}

tests/TestCase/SettingsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function testUpdateSettings()
9393
]
9494
);
9595

96-
$settings = $this->client->getIndex('sf_phpunit__posts')->getSettings();
96+
$settings = $this->client->index('sf_phpunit__posts')->getSettings();
9797

9898
$this->assertNotEmpty($settings['stopWords']);
9999
$this->assertEquals(['a', 'an', 'the'], $settings['stopWords']);

0 commit comments

Comments
 (0)