Skip to content

Commit e8d035b

Browse files
committed
Updated docs + README for 7.0.0
1 parent 5a01a2b commit e8d035b

File tree

7 files changed

+62
-25
lines changed

7 files changed

+62
-25
lines changed

BREAKING_CHANGES.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# 7.0
2+
3+
- Requirement of PHP 7.1 instead of 7.0 that is not supported since 1 Jan 2019.
4+
See [PHP supported version](https://www.php.net/supported-versions.php) for
5+
more information.
6+
7+
- Elasticsearch 7.0 deprecated APIs that accept types, introduced new typeless
8+
APIs, and removed support for the _default_ mapping. Read [this](https://www.elastic.co/blog/moving-from-types-to-typeless-apis-in-elasticsearch-7-0)
9+
blog post for more information.
10+
11+
- Added type hints and return type declarations where possible
12+
[#897](https://github.com/elastic/elasticsearch-php/pull/897)
13+
114
# 6.7
215

316
- `{type}` part in `indices.put_mapping` API is not required anymore, see new specification [here](https://github.com/elastic/elasticsearch/blob/v6.7.0/rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_mapping.json)

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
## Release 7.0.0
2+
3+
- Requirement of PHP 7.1 instead of 7.0 that is not supported since 1 Jan 2019.
4+
[#897](https://github.com/elastic/elasticsearch-php/pull/897)
5+
- Code refactoring using type hints and return type declarations where possible
6+
[#897](https://github.com/elastic/elasticsearch-php/pull/897)
7+
- Update vendor libraries (PHPUnit 7.5, Symfony YAML 4.3, etc)
8+
[#897](https://github.com/elastic/elasticsearch-php/pull/897)
9+
- Updated all the API endpoints using the [latest 7.0.0 specs](https://github.com/elastic/elasticsearch/tree/v7.0.0/rest-api-spec/src/main/resources/rest-api-spec/api) of Elasticsearch [#897](https://github.com/elastic/elasticsearch-php/pull/897)
10+
- Added the `User-Agent` in each HTTP request [#898](https://github.com/elastic/elasticsearch-php/pull/898)
11+
- Simplified the logging methods `logRequestFail($request, $response, $exception)`
12+
and `logRequestSuccess($request, $response)` in `Elasticsearch\Connections\Connection`
13+
[#876](https://github.com/elastic/elasticsearch-php/pull/876)
14+
- Fix `json_encode` for unicode(emoji) characters [856](https://github.com/elastic/elasticsearch-php/pull/856)
15+
- Fix HTTP port specification using CURLOPT_PORT, not anymore in the host [782](https://github.com/elastic/elasticsearch-php/pull/782)
16+
17+
### Testing
18+
19+
120
## Release 6.7.1
221

322
- Added `track_total_hits` in `search` endpoint [0c9ff47](https://github.com/elastic/elasticsearch-php/commit/9f4f0dfa331c4f50d2c88c0068afd3062e6ea353)

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@ Version Matrix
2929

3030
| Elasticsearch Version | Elasticsearch-PHP Branch |
3131
| --------------------- | ------------------------ |
32+
| >= 7.0, < 8.0 | 7.0 |
3233
| >= 6.6, < 7.0 | 6.7.x |
3334
| >= 6.0, < 6.6 | 6.5.x |
3435
| >= 5.0, < 6.0 | 5.0 |
3536
| >= 2.0, < 5.0 | 1.0 or 2.0 |
3637
| >= 1.0, < 2.0 | 1.0 or 2.0 |
3738
| <= 0.90.x | 0.4 |
3839

40+
- If you are using Elasticsearch 7.x, use Elasticsearch-PHP 7.0 branch.
3941
- If you are using Elasticsearch 6.6 to 6.7, use Elasticsearch-PHP 6.7.x branch.
4042
- If you are using Elasticsearch 6.0 to 6.5, use Elasticsearch-PHP 6.5.x branch.
4143
- If you are using Elasticsearch 5.x, use Elasticsearch-PHP 5.0 branch.
@@ -51,12 +53,12 @@ Installation via Composer
5153
-------------------------
5254
The recommended method to install _Elasticsearch-PHP_ is through [Composer](http://getcomposer.org).
5355

54-
1. Add `elasticsearch/elasticsearch` as a dependency in your project's `composer.json` file (change version to suit your version of Elasticsearch, for instance for ES 6.7):
56+
1. Add `elasticsearch/elasticsearch` as a dependency in your project's `composer.json` file (change version to suit your version of Elasticsearch, for instance for ES 7.0):
5557

5658
```json
5759
{
5860
"require": {
59-
"elasticsearch/elasticsearch": "^6.7"
61+
"elasticsearch/elasticsearch": "^7.0"
6062
}
6163
}
6264
```
@@ -90,11 +92,12 @@ You can find out more on how to install Composer, configure autoloading, and oth
9092

9193
PHP Version Requirement
9294
----
93-
Version 6.0 of this library requires at least PHP version 7.0.0 to function. In addition, it requires the native JSON
95+
Version 7.0 of this library requires at least PHP version 7.1 to function. In addition, it requires the native JSON
9496
extension to be version 1.3.7 or higher.
9597

9698
| Elasticsearch-PHP Branch | PHP Version |
9799
| ----------- | ------------------------ |
100+
| 7.0 | >= 7.1.0 |
98101
| 6.0 | >= 7.0.0 |
99102
| 5.0 | >= 5.6.6 |
100103
| 2.0 | >= 5.4.0 |

docs/breaking-changes.asciidoc

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
[[breaking_changes]]
2-
== Breaking changes from 5.x
2+
== Breaking changes from 6.x
33

4-
### Removal of ClientBuilder::defaultLogger()
4+
### Moving from types to typeless APIs in Elasticsearch 7.0
55

6-
In 5.x there is the ability to create a default Logger object, which has been removed. It is now required to explicitly make a Logger object.
6+
Elasticsearch 7.0 deprecated APIs that accept types, introduced new typeless
7+
APIs, and removed support for the _default_ mapping. Read [this](https://www.elastic.co/blog/moving-from-types-to-typeless-apis-in-elasticsearch-7-0)
8+
blog post for more information.
79

8-
5.x
9-
```
10-
$logger = ClientBuilder::defaultLogger('path_to_log_file');
11-
```
10+
### Type hint and return type
1211

13-
6.5
14-
```
15-
$logger = new Logger('name');
16-
$logger->pushHandler(new StreamHandler('path_to_log_file', Logger::WARNING);
17-
```
12+
Added type hints and return type declarations in all the code base, where possible.
13+
See PR [#897](https://github.com/elastic/elasticsearch-php/pull/897).
14+
15+
### PHP 7.1+ Requirement
16+
17+
We require using PHP 7.1+ for elasticsearch-php. PHP 7.0 is not supported since
18+
1st Jan 2019. See [PHP supported version](https://www.php.net/supported-versions.php) for
19+
more information.

docs/installation.asciidoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ The master branch will always track Elasticsearch master, but it is not recommen
2727
[width="40%",options="header",frame="topbot"]
2828
|============================
2929
|Elasticsearch Version | Elasticsearch-PHP Branch
30-
| >= 6.6, <= 6.7 | `6.7`
31-
| >= 6.0, <= 6.5 | `6.5`
32-
| >= 5.0, <= 6.0 | `5.0`
33-
| >= 1.0, <= 5.0 | `1.0`, `2.0`
34-
| <= 0.90.* | `0.4`
30+
| >= 7.0, < 8.0 | `7.0`
31+
| >= 6.6, <= 6.7 | `6.7.x`
32+
| >= 6.0, <= 6.5 | `6.5.c`
33+
| >= 5.0, < 6.0 | `5.0`
34+
| >= 1.0, < 5.0 | `1.0`, `2.0`
35+
| <= 0.90.* | `0.4`
3536
|============================
3637

3738
=== Composer Installation
@@ -42,7 +43,7 @@ The master branch will always track Elasticsearch master, but it is not recommen
4243
--------------------------
4344
{
4445
"require": {
45-
"elasticsearch/elasticsearch": "~6.7.0"
46+
"elasticsearch/elasticsearch": "~7.0"
4647
}
4748
}
4849
--------------------------

docs/php-version-requirement.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[php_version_requirement]]
22
== PHP Version Requirement
33

4-
Version 6.0 of Elasticsearch-PHP requires PHP version 7.0.0 or higher. In addition, it requires the native JSON
5-
extension to be version 1.3.7 or higher.
4+
Version 7.0 of Elasticsearch-PHP requires PHP version 7.1.0 or higher.
5+
In addition, it requires the native JSON extension to be version 1.3.7 or higher.

docs/quickstart.asciidoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This section will give you a quick overview of the client and how the major func
1111
----------------------------
1212
{
1313
"require": {
14-
"elasticsearch/elasticsearch": "~5.0"
14+
"elasticsearch/elasticsearch": "~7.0"
1515
}
1616
}
1717
----------------------------
@@ -266,4 +266,3 @@ actions are available under the `$client` object (indexing, searching, getting,
266266
are located under the `$client->indices()` and `$client->cluster()` objects, respectively.
267267

268268
Check out the rest of the Documentation to see how the entire client works.
269-

0 commit comments

Comments
 (0)