diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index f3884efd..084c2808 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -17,7 +17,7 @@ 'import_constants' => false, ], ] - ) +) ->setRiskyAllowed(true) ->setFinder($finder) ; diff --git a/README.md b/README.md index 44a5bd9e..c4ca23cd 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/composer.json b/composer.json index 953116f1..3ab58cae 100644 --- a/composer.json +++ b/composer.json @@ -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" diff --git a/src/Command/MeiliSearchCreateCommand.php b/src/Command/MeiliSearchCreateCommand.php index 16517838..0afc6a81 100644 --- a/src/Command/MeiliSearchCreateCommand.php +++ b/src/Command/MeiliSearchCreateCommand.php @@ -73,7 +73,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $output->writeln('Creating index '.$index['name'].' for '.$entityClassName.''); $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'])) { @@ -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']); diff --git a/src/Command/MeiliSearchImportCommand.php b/src/Command/MeiliSearchImportCommand.php index ab28a079..30b23af3 100644 --- a/src/Command/MeiliSearchImportCommand.php +++ b/src/Command/MeiliSearchImportCommand.php @@ -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']); @@ -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']); diff --git a/tests/Integration/CommandsTest.php b/tests/Integration/CommandsTest.php index e75d349c..e912e63d 100644 --- a/tests/Integration/CommandsTest.php +++ b/tests/Integration/CommandsTest.php @@ -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'); } } diff --git a/tests/Integration/EventListener/DoctrineEventSubscriberTest.php b/tests/Integration/EventListener/DoctrineEventSubscriberTest.php index 8db8f799..bf69542b 100644 --- a/tests/Integration/EventListener/DoctrineEventSubscriberTest.php +++ b/tests/Integration/EventListener/DoctrineEventSubscriberTest.php @@ -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']); } }