Skip to content

Commit

Permalink
Updated the Client version to 7.4.0 + updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ezimuel committed Nov 19, 2019
1 parent 753f499 commit 830a6f6
Show file tree
Hide file tree
Showing 7 changed files with 182 additions and 73 deletions.
2 changes: 0 additions & 2 deletions BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
- When `delete` with an empty `id` an `Elasticsearch\Common\Exceptions\RuntimeException\Missing404Exception`
exception is thrown. Previously it was a `Elasticsearch\Common\Exceptions\RuntimeException\InvalidArgumentException`.



# 7.0

- Requirement of PHP 7.1 instead of 7.0 that is not supported since 1 Jan 2019.
Expand Down
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
## Release 7.4.0


- Added the code generation for endpoints and namespaces based on
the [REST API specification](https://github.com/elastic/elasticsearch/tree/v7.4.2/rest-api-spec/src/main/resources/rest-api-spec/api)
of Elasticsearch. This tool is available in `util/GenerateEndpoints.php`.
[#966](https://github.com/elastic/elasticsearch-php/pull/966)
- Fixed the asciidoc [endpoints documentation](https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/ElasticsearchPHP_Endpoints.html) based on the code generation
using [Sami](https://github.com/FriendsOfPHP/Sami) project
[#966](https://github.com/elastic/elasticsearch-php/pull/966)
- All the `experimental` and `beta` APIs are now signed with
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)
section in the documentation.
[#966](https://github.com/elastic/elasticsearch-php/pull/966)
- Removed `AlreadyExpiredException` since it has been removed
from Elasticsearch with https://github.com/elastic/elasticsearch/pull/24857
[#954](https://github.com/elastic/elasticsearch-php/pull/954)

## Release 7.3.0

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ To maintain consistency across all the low-level clients (Ruby, Python, etc.), c

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.

Moreover from version 7.4.0, we added a `E_USER_DEPRECATED` notice if you use deprecated parameters for Elasticsearch.

Features
--------

Expand Down
7 changes: 7 additions & 0 deletions docs/breaking-changes.asciidoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
[[breaking_changes]]
== Breaking changes from 6.x

### E_USER_DEPRECATED notice when using deprecated parameters

Starting from elasticsearch-php 7.4.0, we generate a PHP [E_USER_DEPRECATED](https://www.php.net/manual/en/errorfunc.constants.php)
notice every time you use a deprecated parameters for Elasticsearch.
We decided to add this notice to facilitate the code refactoring with the
new API specification of Elasticsearch (e.g. the usage of typeless APIs, see below).

### Moving from types to typeless APIs in Elasticsearch 7.0

Elasticsearch 7.0 deprecated APIs that accept types, introduced new typeless
Expand Down
51 changes: 51 additions & 0 deletions docs/experimental-beta-apis.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[[experimental_and_beta_apis]]
== Experimental and beta APIs

The PHP client offers also `experimental` and `beta` APIs for Elasticsearch.

The Elasticsearch API are marked using the following convention:

- **Stable** APIs should be safe to use extensively in production.
Any breaking changes to these APIs should only occur in major versions and
will be clearly documented in the breaking changes documentation for that
release.
- **Beta** APIs are on track to become stable and permanent features.
Caution should be exercised in their use since it is possible we’d have to make
a breaking change to these APIs in a minor version, but we’ll avoid this
wherever possible.
- **Experimental** APIs are just that - an experiment. An experimental API might
have breaking changes in any future version, or it might even be removed
entirely.

All the `experimental` and `beta` APIs are marked with a `@note` tag in the
phpdoc section of the code.

=== Experimental

The experimental APIs included in the current version of `elasticsearch-php` are:

- [Ranking Evaluation](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/search-rank-eval.html)

[source,php]
----
$client = ClientBuilder::create()->build();
$params = [
// ...
];
$result = $client->rankEval($params);
----

- [Painless Execute](https://www.elastic.co/guide/en/elasticsearch/painless/7.4/painless-execute-api.html)

[source,php]
----
$client = ClientBuilder::create()->build();
$params = [
// ...
];
$result = $client->scriptsPainlessExecute($params);
----

=== Beta

There are no beta APIs in the current version of `elasticsearch-php`.
2 changes: 2 additions & 0 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ include::breaking-changes.asciidoc[]

include::community.asciidoc[]

include::experimental-beta-apis.asciidoc[]

include::build/classes.asciidoc[]
Loading

0 comments on commit 830a6f6

Please sign in to comment.