Skip to content

Commit df9ac22

Browse files
committed
docs(php): Pierre's review
1 parent aafa4d5 commit df9ac22

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

clients/algoliasearch-client-php/lib/Support/AlgoliaAgent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public static function get($clientName)
1919
return self::$value[$clientName];
2020
}
2121

22-
public static function addCustomAlgoliaAgent(
22+
public static function addAlgoliaAgent(
2323
$clientName,
2424
$segment,
2525
$version

website/docs/clients/guides/copy-or-move-index.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ const client = algoliasearch('<YOUR_APP_ID>', '<YOUR_API_KEY>');
2626
const { taskID } = await client.operationIndex({
2727
indexName: '<SOURCE_INDEX_NAME>',
2828
operationIndexParams: {
29-
destination: '<DESTINATION_INDEX_NAME>',
3029
operation: 'copy',
30+
destination: '<DESTINATION_INDEX_NAME>',
3131
},
3232
});
3333

@@ -65,8 +65,8 @@ import com.algolia.model.search.*;
6565
UpdatedAtResponse response = client.operationIndex(
6666
"<SOURCE_INDEX_NAME>",
6767
new OperationIndexParams()
68-
.setDestination("<DESTINATION_INDEX_NAME>")
6968
.setOperation(OperationType.COPY)
69+
.setDestination("<DESTINATION_INDEX_NAME>")
7070
);
7171

7272
// Poll the task status until it's done
@@ -91,8 +91,8 @@ const client = algoliasearch('<YOUR_APP_ID>', '<YOUR_API_KEY>');
9191
const { taskID } = await client.operationIndex({
9292
indexName: '<SOURCE_INDEX_NAME>',
9393
operationIndexParams: {
94-
destination: '<DESTINATION_INDEX_NAME>',
9594
operation: 'move',
95+
destination: '<DESTINATION_INDEX_NAME>',
9696
},
9797
});
9898

@@ -130,8 +130,8 @@ import com.algolia.model.search.*;
130130
UpdatedAtResponse response = client.operationIndex(
131131
"<SOURCE_INDEX_NAME>",
132132
new OperationIndexParams()
133-
.setDestination("<DESTINATION_INDEX_NAME>")
134133
.setOperation(OperationType.MOVE)
134+
.setDestination("<DESTINATION_INDEX_NAME>")
135135
);
136136

137137
// Poll the task status until it's done
@@ -158,8 +158,8 @@ const client = algoliasearch('<YOUR_APP_ID>', '<YOUR_API_KEY>');
158158
const { taskID } = await client.operationIndex({
159159
indexName: '<SOURCE_INDEX_NAME>',
160160
operationIndexParams: {
161-
destination: '<DESTINATION_INDEX_NAME>',
162161
operation: 'move',
162+
destination: '<DESTINATION_INDEX_NAME>',
163163
scope: ['rules'],
164164
},
165165
});
@@ -199,8 +199,8 @@ import com.algolia.model.search.*;
199199
UpdatedAtResponse response = client.operationIndex(
200200
"<SOURCE_INDEX_NAME>",
201201
new OperationIndexParams()
202-
.setDestination("<DESTINATION_INDEX_NAME>")
203202
.setOperation(OperationType.MOVE)
203+
.setDestination("<DESTINATION_INDEX_NAME>")
204204
.addScope(ScopeType.RULES)
205205
);
206206

website/docs/clients/guides/customized-client-usage.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ $client->search(
5050
[
5151
'indexName' => '<YOUR_INDEX_NAME>',
5252
'query' => '<YOUR_QUERY>',
53-
'facets' => ['author', 'genre'],
53+
'hitsPerPage' => 50,
5454
],
5555
]
5656
],
@@ -118,7 +118,7 @@ $client = SearchClient::create(
118118
);
119119

120120
// This will append `; my user agent (optional version)` to the current value of `x-algolia-agent` for every requests
121-
Algolia\AlgoliaSearch\Support\AlgoliaAgent::addCustomAlgoliaAgent(
121+
Algolia\AlgoliaSearch\Support\AlgoliaAgent::addAlgoliaAgent(
122122
$client->getClientConfig()->getClientName(),
123123
"my user agent",
124124
"optional version"

website/docs/clients/migration-guides/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ const client = algoliasearch('<YOUR_APP_ID>', '<YOUR_API_KEY>');
198198
const { taskID } = await client.operationIndex({
199199
indexName: '<SOURCE_INDEX_NAME>',
200200
operationIndexParams: {
201-
destination: '<DESTINATION_INDEX_NAME>',
202201
// Enum for either `copy` or `move`
203202
operation: 'copy', // 'move'
203+
destination: '<DESTINATION_INDEX_NAME>',
204204
},
205205
});
206206

@@ -238,8 +238,8 @@ import com.algolia.model.search.*;
238238
UpdatedAtResponse response = client.operationIndex(
239239
"<SOURCE_INDEX_NAME>",
240240
new OperationIndexParams()
241-
.setDestination("<DESTINATION_INDEX_NAME>")
242241
.setOperation(OperationType.COPY) // or MOVE
242+
.setDestination("<DESTINATION_INDEX_NAME>")
243243
);
244244

245245
// Poll the task status until it's done

website/docs/clients/migration-guides/php.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: PHP
44

55
| Previous | Latest | Description |
66
| -------------------- | :------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
7-
| `"algolia/algoliasearch-client-php": "^3.2"` | `"algolia/algoliasearch-client-php": "^4.0"` | **During the beta phase**, the clients are available under the package 4.x.x-alpha , you can find a full list [here](https://packagist.org/packages/algolia/algoliasearch-client-php). |
7+
| `"algolia/algoliasearch-client-php": "^3.2"` | `"algolia/algoliasearch-client-php": "^4.0@alpha"` | **During the beta phase**, the clients are available under the package 4.x.x-alpha , you can find a full list [here](https://packagist.org/packages/algolia/algoliasearch-client-php). |
88
| `Algolia\AlgoliaSearch` | `Algolia\AlgoliaSearch\Api` | Exported clients have now the name suffixed by `Api`. |
99

1010
### Usage
@@ -18,7 +18,7 @@ composer remove algolia/algoliasearch-client-php
1818
You can now install the `Algoliasearch` clients.
1919

2020
```bash
21-
composer require algolia/algoliasearch-client-php "^4.0"
21+
composer require algolia/algoliasearch-client-php "^4.0@alpha"
2222
```
2323

2424
You can continue this guide on [our installation page](/docs/clients/installation).

0 commit comments

Comments
 (0)