Skip to content

Changes related to the next Meilisearch release (v0.28.0) #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'import_constants' => false,
],
]
)
)
->setRiskyAllowed(true)
->setFinder($finder)
;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Also, see our [Documentation](https://docs.meilisearch.com/learn/tutorials/getti

## 🤖 Compatibility with Meilisearch

This package only guarantees the compatibility with the [version v0.27.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.27.0).
This package only guarantees the compatibility with the [version v0.28.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.28.0).

## 💡 Learn More

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"ext-json": "*",
"doctrine/doctrine-bundle": "^2.4",
"illuminate/collections": "^8.47",
"meilisearch/meilisearch-php": "^0.23.0",
"meilisearch/meilisearch-php": "^0.24.0",
"symfony/filesystem": "^4.4 || ^5.0 || ^6.0",
"symfony/property-access": "^4.4 || ^5.0 || ^6.0",
"symfony/serializer": "^4.4 || ^5.0 || ^6.0"
Expand Down
4 changes: 2 additions & 2 deletions src/Command/MeiliSearchCreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$output->writeln('<info>Creating index '.$index['name'].' for '.$entityClassName.'</info>');

$task = $this->searchClient->createIndex($index['name']);
$this->searchClient->waitForTask($task['uid']);
$this->searchClient->waitForTask($task['taskUid']);
$indexInstance = $this->searchClient->index($index['name']);

if (isset($index['settings']) && is_array($index['settings'])) {
Expand All @@ -85,7 +85,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}

$task = $indexInstance->{$method}($value);
$task = $indexInstance->getTask($task['uid']);
$task = $indexInstance->getTask($task['taskUid']);

if ('failed' === $task['status']) {
throw new TaskException($task['error']);
Expand Down
8 changes: 4 additions & 4 deletions src/Command/MeiliSearchImportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$task = $indexInstance->{$method}($value);

// Get task information using uid
$indexInstance->waitForTask($task['uid'], $responseTimeout);
$task = $indexInstance->getTask($task['uid']);
$indexInstance->waitForTask($task['taskUid'], $responseTimeout);
$task = $indexInstance->getTask($task['taskUid']);

if ('failed' === $task['status']) {
throw new TaskException($task['error']);
Expand Down Expand Up @@ -175,8 +175,8 @@ private function formatIndexingResponse(array $batch, int $responseTimeout): arr
$indexInstance = $this->searchClient->index($indexName);

// Get task information using uid
$indexInstance->waitForTask($apiResponse['uid'], $responseTimeout);
$task = $indexInstance->getTask($apiResponse['uid']);
$indexInstance->waitForTask($apiResponse['taskUid'], $responseTimeout);
$task = $indexInstance->getTask($apiResponse['taskUid']);

if ('failed' === $task['status']) {
throw new TaskException($task['error']);
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/CommandsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,6 @@ public function testCreateExecuteIndexCreation(): void
$createCommandTester = new CommandTester($createCommand);
$createCommandTester->execute([]);

$this->assertEquals($this->client->getTasks()['results'][0]['type'], 'indexCreation');
$this->assertEquals($this->client->getTasks()->getResults()[0]['type'], 'indexCreation');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function testPreRemoveWithObjectId(): void
*/
private function waitForAllTasks(): void
{
$firstTask = $this->client->getTasks()['results'][0];
$firstTask = $this->client->getTasks()->getResults()[0];
$this->client->waitForTask($firstTask['uid']);
}
}