Skip to content

Commit

Permalink
Updated docs + README for 7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ezimuel committed Jun 13, 2019
1 parent 5a01a2b commit e8d035b
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 25 deletions.
13 changes: 13 additions & 0 deletions BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# 7.0

- Requirement of PHP 7.1 instead of 7.0 that is not supported since 1 Jan 2019.
See [PHP supported version](https://www.php.net/supported-versions.php) for
more information.

- Elasticsearch 7.0 deprecated APIs that accept types, introduced new typeless
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)
blog post for more information.

- Added type hints and return type declarations where possible
[#897](https://github.com/elastic/elasticsearch-php/pull/897)

# 6.7

- `{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)
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## Release 7.0.0

- Requirement of PHP 7.1 instead of 7.0 that is not supported since 1 Jan 2019.
[#897](https://github.com/elastic/elasticsearch-php/pull/897)
- Code refactoring using type hints and return type declarations where possible
[#897](https://github.com/elastic/elasticsearch-php/pull/897)
- Update vendor libraries (PHPUnit 7.5, Symfony YAML 4.3, etc)
[#897](https://github.com/elastic/elasticsearch-php/pull/897)
- 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)
- Added the `User-Agent` in each HTTP request [#898](https://github.com/elastic/elasticsearch-php/pull/898)
- Simplified the logging methods `logRequestFail($request, $response, $exception)`
and `logRequestSuccess($request, $response)` in `Elasticsearch\Connections\Connection`
[#876](https://github.com/elastic/elasticsearch-php/pull/876)
- Fix `json_encode` for unicode(emoji) characters [856](https://github.com/elastic/elasticsearch-php/pull/856)
- Fix HTTP port specification using CURLOPT_PORT, not anymore in the host [782](https://github.com/elastic/elasticsearch-php/pull/782)

### Testing


## Release 6.7.1

- Added `track_total_hits` in `search` endpoint [0c9ff47](https://github.com/elastic/elasticsearch-php/commit/9f4f0dfa331c4f50d2c88c0068afd3062e6ea353)
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ Version Matrix

| Elasticsearch Version | Elasticsearch-PHP Branch |
| --------------------- | ------------------------ |
| >= 7.0, < 8.0 | 7.0 |
| >= 6.6, < 7.0 | 6.7.x |
| >= 6.0, < 6.6 | 6.5.x |
| >= 5.0, < 6.0 | 5.0 |
| >= 2.0, < 5.0 | 1.0 or 2.0 |
| >= 1.0, < 2.0 | 1.0 or 2.0 |
| <= 0.90.x | 0.4 |

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

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):
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):

```json
{
"require": {
"elasticsearch/elasticsearch": "^6.7"
"elasticsearch/elasticsearch": "^7.0"
}
}
```
Expand Down Expand Up @@ -90,11 +92,12 @@ You can find out more on how to install Composer, configure autoloading, and oth

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

| Elasticsearch-PHP Branch | PHP Version |
| ----------- | ------------------------ |
| 7.0 | >= 7.1.0 |
| 6.0 | >= 7.0.0 |
| 5.0 | >= 5.6.6 |
| 2.0 | >= 5.4.0 |
Expand Down
26 changes: 14 additions & 12 deletions docs/breaking-changes.asciidoc
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
[[breaking_changes]]
== Breaking changes from 5.x
== Breaking changes from 6.x

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

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.
Elasticsearch 7.0 deprecated APIs that accept types, introduced new typeless
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)
blog post for more information.

5.x
```
$logger = ClientBuilder::defaultLogger('path_to_log_file');
```
### Type hint and return type

6.5
```
$logger = new Logger('name');
$logger->pushHandler(new StreamHandler('path_to_log_file', Logger::WARNING);
```
Added type hints and return type declarations in all the code base, where possible.
See PR [#897](https://github.com/elastic/elasticsearch-php/pull/897).

### PHP 7.1+ Requirement

We require using PHP 7.1+ for elasticsearch-php. PHP 7.0 is not supported since
1st Jan 2019. See [PHP supported version](https://www.php.net/supported-versions.php) for
more information.
13 changes: 7 additions & 6 deletions docs/installation.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ The master branch will always track Elasticsearch master, but it is not recommen
[width="40%",options="header",frame="topbot"]
|============================
|Elasticsearch Version | Elasticsearch-PHP Branch
| >= 6.6, <= 6.7 | `6.7`
| >= 6.0, <= 6.5 | `6.5`
| >= 5.0, <= 6.0 | `5.0`
| >= 1.0, <= 5.0 | `1.0`, `2.0`
| <= 0.90.* | `0.4`
| >= 7.0, < 8.0 | `7.0`
| >= 6.6, <= 6.7 | `6.7.x`
| >= 6.0, <= 6.5 | `6.5.c`
| >= 5.0, < 6.0 | `5.0`
| >= 1.0, < 5.0 | `1.0`, `2.0`
| <= 0.90.* | `0.4`
|============================

=== Composer Installation
Expand All @@ -42,7 +43,7 @@ The master branch will always track Elasticsearch master, but it is not recommen
--------------------------
{
"require": {
"elasticsearch/elasticsearch": "~6.7.0"
"elasticsearch/elasticsearch": "~7.0"
}
}
--------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/php-version-requirement.asciidoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[[php_version_requirement]]
== PHP Version Requirement

Version 6.0 of Elasticsearch-PHP requires PHP version 7.0.0 or higher. In addition, it requires the native JSON
extension to be version 1.3.7 or higher.
Version 7.0 of Elasticsearch-PHP requires PHP version 7.1.0 or higher.
In addition, it requires the native JSON extension to be version 1.3.7 or higher.
3 changes: 1 addition & 2 deletions docs/quickstart.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This section will give you a quick overview of the client and how the major func
----------------------------
{
"require": {
"elasticsearch/elasticsearch": "~5.0"
"elasticsearch/elasticsearch": "~7.0"
}
}
----------------------------
Expand Down Expand Up @@ -266,4 +266,3 @@ actions are available under the `$client` object (indexing, searching, getting,
are located under the `$client->indices()` and `$client->cluster()` objects, respectively.

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

0 comments on commit e8d035b

Please sign in to comment.