Skip to content

Commit 753f499

Browse files
authored
Merge pull request #966 from ezimuel/prep/7.4.0
Prep/7.4.0
2 parents 20f5b26 + 6bf35b0 commit 753f499

File tree

205 files changed

+7784
-8965
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+7784
-8965
lines changed

.travis.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,14 @@ matrix:
1717
fast_finish: true
1818
include:
1919
- php: 7.1
20-
env: ES_VERSION="7.3.2"
20+
env: ES_VERSION="7.4.2"
2121
- php: 7.2
22-
env: ES_VERSION="7.3.2"
22+
env: ES_VERSION="7.4.2"
2323
- php: 7.3
24-
env: ES_VERSION="7.3.2"
25-
- php: 7.3
26-
env: ES_VERSION="7.2.1"
24+
env: ES_VERSION="7.4.2"
2725
- php: 7.3
2826
env: ES_VERSION="8.0.0-SNAPSHOT"
2927
allow_failures:
30-
- php: 7.3
31-
env: ES_VERSION="7.2.1"
3228
- php: 7.3
3329
env: ES_VERSION="8.0.0-SNAPSHOT"
3430

BREAKING_CHANGES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# 7.4
2+
3+
- Using a deprecated parameter is notified triggering a [E_USER_DEPRECATED](https://www.php.net/manual/en/errorfunc.constants.php)
4+
error (e.g. using the `type` parameter will generate a `Specifying types in urls has been deprecated`
5+
deprecation message).
6+
- When `delete` with an empty `id` an `Elasticsearch\Common\Exceptions\RuntimeException\Missing404Exception`
7+
exception is thrown. Previously it was a `Elasticsearch\Common\Exceptions\RuntimeException\InvalidArgumentException`.
8+
9+
10+
111
# 7.0
212

313
- Requirement of PHP 7.1 instead of 7.0 that is not supported since 1 Jan 2019.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## Release 7.4.0
2+
3+
4+
15
## Release 7.3.0
26

37
- Added support for simplified access to the `X-Opaque-Id` header

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Official low-level client for Elasticsearch. Its goal is to provide common groun
88

99
To maintain consistency across all the low-level clients (Ruby, Python, etc.), clients accept simple associative arrays as parameters. All parameters, from the URI to the document body, are defined in the associative array.
1010

11+
Starting from version 7.4.0, all the endpoints (and namespaces) are autogenerated using the [util/GenerateEndpoints.php](https://github.com/elastic/elasticsearch-php/blob/master/util/GenerateEndpoints.php) script. This script reads the [Elasticsearch API specs](https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/api) and generated the PHP classes for all the endpoints.
1112

1213
Features
1314
--------
@@ -21,15 +22,16 @@ Features
2122
- Option to use asynchronous future, which enables parallel execution of curl requests to multiple nodes
2223

2324

24-
**Note:** If you want to use X-Pack API, you need to install an optional extension [elasticsearch/xpack](https://github.com/elastic/elasticsearch-x-pack-php).
25+
**Note:** If you want to use [X-Pack](https://www.elastic.co/what-is/open-x-pack) API, you need to install an optional extension [elasticsearch/xpack](https://github.com/elastic/elasticsearch-x-pack-php).
2526

2627

2728
Version Matrix
2829
--------------
2930

3031
| Elasticsearch Version | Elasticsearch-PHP Branch |
3132
| --------------------- | ------------------------ |
32-
| >= 7.2, < 8.0 | 7.2 |
33+
| >= 7.4 | 7.4 |
34+
| >= 7.2, < 7.4 | 7.2 |
3335
| >= 7.0, < 7.2 | 7.0 |
3436
| >= 6.6, < 7.0 | 6.7.x |
3537
| >= 6.0, < 6.6 | 6.5.x |
@@ -38,7 +40,8 @@ Version Matrix
3840
| >= 1.0, < 2.0 | 1.0 or 2.0 |
3941
| <= 0.90.x | 0.4 |
4042

41-
- If you are using Elasticsearch 7.2+, use Elasticsearch-PHP 7.2 branch.
43+
- If you are using Elasticsearch 7.4+ use Elasticsearch-PHP 7.4 branch.
44+
- If you are using Elasticsearch 7.2 to 7.3, use Elasticsearch-PHP 7.2 branch.
4245
- If you are using Elasticsearch 7.0 to 7.1, use Elasticsearch-PHP 7.0 branch.
4346
- If you are using Elasticsearch 6.6 to 6.7, use Elasticsearch-PHP 6.7.x branch.
4447
- If you are using Elasticsearch 6.0 to 6.5, use Elasticsearch-PHP 6.5.x branch.
@@ -122,8 +125,8 @@ corresponding to the data in your document:
122125
```php
123126
$params = [
124127
'index' => 'my_index',
125-
'id' => 'my_id',
126-
'body' => ['testField' => 'abc']
128+
'id' => 'my_id',
129+
'body' => ['testField' => 'abc']
127130
];
128131

129132
$response = $client->index($params);
@@ -160,7 +163,7 @@ Let's get the document that we just indexed. This will simply return the docume
160163
```php
161164
$params = [
162165
'index' => 'my_index',
163-
'id' => 'my_id'
166+
'id' => 'my_id'
164167
];
165168

166169
$response = $client->get($params);
@@ -193,7 +196,7 @@ If you want to retrieve the `_source` field directly, there is the `getSource` m
193196
```php
194197
$params = [
195198
'index' => 'my_index',
196-
'id' => 'my_id'
199+
'id' => 'my_id'
197200
];
198201

199202
$source = $client->getSource($params);
@@ -216,7 +219,7 @@ Searching is a hallmark of Elasticsearch, so let's perform a search. We are goi
216219
```php
217220
$params = [
218221
'index' => 'my_index',
219-
'body' => [
222+
'body' => [
220223
'query' => [
221224
'match' => [
222225
'testField' => 'abc'
@@ -284,7 +287,7 @@ Alright, let's go ahead and delete the document that we added previously:
284287
```php
285288
$params = [
286289
'index' => 'my_index',
287-
'id' => 'my_id'
290+
'id' => 'my_id'
288291
];
289292

290293
$response = $client->delete($params);
@@ -344,7 +347,7 @@ Now that we are starting fresh (no data or index), let's add a new index with so
344347
```php
345348
$params = [
346349
'index' => 'my_index',
347-
'body' => [
350+
'body' => [
348351
'settings' => [
349352
'number_of_shards' => 2,
350353
'number_of_replicas' => 0

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"autoload-dev": {
4141
"psr-4": {
4242
"Elasticsearch\\Tests\\": "tests/Elasticsearch/Tests/",
43-
"Elasticsearch\\IntegrationTests\\": "tests/Elasticsearch/IntegrationTests/"
43+
"Elasticsearch\\IntegrationTests\\": "tests/Elasticsearch/IntegrationTests/",
44+
"Elasticsearch\\Util\\": "util/"
4445
}
4546
},
4647
"config": {

0 commit comments

Comments
 (0)