Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 830a6f6

Browse files
committedNov 19, 2019
Updated the Client version to 7.4.0 + updated docs
1 parent 753f499 commit 830a6f6

File tree

7 files changed

+182
-73
lines changed

7 files changed

+182
-73
lines changed
 

‎BREAKING_CHANGES.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
- When `delete` with an empty `id` an `Elasticsearch\Common\Exceptions\RuntimeException\Missing404Exception`
77
exception is thrown. Previously it was a `Elasticsearch\Common\Exceptions\RuntimeException\InvalidArgumentException`.
88

9-
10-
119
# 7.0
1210

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

‎CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
## Release 7.4.0
22

3-
3+
- Added the code generation for endpoints and namespaces based on
4+
the [REST API specification](https://github.com/elastic/elasticsearch/tree/v7.4.2/rest-api-spec/src/main/resources/rest-api-spec/api)
5+
of Elasticsearch. This tool is available in `util/GenerateEndpoints.php`.
6+
[#966](https://github.com/elastic/elasticsearch-php/pull/966)
7+
- Fixed the asciidoc [endpoints documentation](https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/ElasticsearchPHP_Endpoints.html) based on the code generation
8+
using [Sami](https://github.com/FriendsOfPHP/Sami) project
9+
[#966](https://github.com/elastic/elasticsearch-php/pull/966)
10+
- All the `experimental` and `beta` APIs are now signed with
11+
a `@note` tag in the phpdoc section (e.g. [$client->rankEval()](https://github.com/elastic/elasticsearch-php/blob/master/src/Elasticsearch/Client.php)). For more information read the [experimental and beta APIs](docs/experimental-beta-apis.asciidoc)
12+
section in the documentation.
13+
[#966](https://github.com/elastic/elasticsearch-php/pull/966)
14+
- Removed `AlreadyExpiredException` since it has been removed
15+
from Elasticsearch with https://github.com/elastic/elasticsearch/pull/24857
16+
[#954](https://github.com/elastic/elasticsearch-php/pull/954)
417

518
## Release 7.3.0
619

‎README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ To maintain consistency across all the low-level clients (Ruby, Python, etc.), c
1010

1111
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.
1212

13+
Moreover from version 7.4.0, we added a `E_USER_DEPRECATED` notice if you use deprecated parameters for Elasticsearch.
14+
1315
Features
1416
--------
1517

‎docs/breaking-changes.asciidoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
[[breaking_changes]]
22
== Breaking changes from 6.x
33

4+
### E_USER_DEPRECATED notice when using deprecated parameters
5+
6+
Starting from elasticsearch-php 7.4.0, we generate a PHP [E_USER_DEPRECATED](https://www.php.net/manual/en/errorfunc.constants.php)
7+
notice every time you use a deprecated parameters for Elasticsearch.
8+
We decided to add this notice to facilitate the code refactoring with the
9+
new API specification of Elasticsearch (e.g. the usage of typeless APIs, see below).
10+
411
### Moving from types to typeless APIs in Elasticsearch 7.0
512

613
Elasticsearch 7.0 deprecated APIs that accept types, introduced new typeless

‎docs/experimental-beta-apis.asciidoc

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[[experimental_and_beta_apis]]
2+
== Experimental and beta APIs
3+
4+
The PHP client offers also `experimental` and `beta` APIs for Elasticsearch.
5+
6+
The Elasticsearch API are marked using the following convention:
7+
8+
- **Stable** APIs should be safe to use extensively in production.
9+
Any breaking changes to these APIs should only occur in major versions and
10+
will be clearly documented in the breaking changes documentation for that
11+
release.
12+
- **Beta** APIs are on track to become stable and permanent features.
13+
Caution should be exercised in their use since it is possible we’d have to make
14+
a breaking change to these APIs in a minor version, but we’ll avoid this
15+
wherever possible.
16+
- **Experimental** APIs are just that - an experiment. An experimental API might
17+
have breaking changes in any future version, or it might even be removed
18+
entirely.
19+
20+
All the `experimental` and `beta` APIs are marked with a `@note` tag in the
21+
phpdoc section of the code.
22+
23+
=== Experimental
24+
25+
The experimental APIs included in the current version of `elasticsearch-php` are:
26+
27+
- [Ranking Evaluation](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/search-rank-eval.html)
28+
29+
[source,php]
30+
----
31+
$client = ClientBuilder::create()->build();
32+
$params = [
33+
// ...
34+
];
35+
$result = $client->rankEval($params);
36+
----
37+
38+
- [Painless Execute](https://www.elastic.co/guide/en/elasticsearch/painless/7.4/painless-execute-api.html)
39+
40+
[source,php]
41+
----
42+
$client = ClientBuilder::create()->build();
43+
$params = [
44+
// ...
45+
];
46+
$result = $client->scriptsPainlessExecute($params);
47+
----
48+
49+
=== Beta
50+
51+
There are no beta APIs in the current version of `elasticsearch-php`.

‎docs/index.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,6 @@ include::breaking-changes.asciidoc[]
3737

3838
include::community.asciidoc[]
3939

40+
include::experimental-beta-apis.asciidoc[]
41+
4042
include::build/classes.asciidoc[]

‎src/Elasticsearch/Client.php

Lines changed: 106 additions & 70 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.