meilisearch / meilisearch-php

PHP wrapper for the Meilisearch API

Home Page:https://meilisearch.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swap Index method is not defined

traed opened this issue · comments

Description
The documentation states that there should be a swap index function, yet there is none.

Expected behavior
A function called swapIndexes should exists on the client.

Current behavior
The function swapIndexes is not defined.

Environment (please complete the following information):

  • OS: MacOS 12.5.1
  • Meilisearch version: v1.0.0
  • meilisearch-php version: v0.21.0

It exists, see the test:

public function testSwapIndexes(): void
{
$promise = $this->client->swapIndexes([['indexA', 'indexB'], ['indexC', 'indexD']]);
$response = $this->client->waitForTask($promise['taskUid']);
$this->assertSame($response['details']['swaps'], [['indexes' => ['indexA', 'indexB']], ['indexes' => ['indexC', 'indexD']]]);
}

Oh, I see. It exists in v1.0 but I got v0.21. Probably because we have some dependency on PHP 7.3 which you dropped in v0.22.