|
1 | 1 | # 8.0
|
2 | 2 |
|
3 | 3 | This major release is a complete new PHP client for Elasticsearch. We build it from scratch!
|
4 |
| -We tried to reduce the BC breaks as much as possible but there are some big differences :rage: |
| 4 | +We tried to reduce the BC breaks as much as possible but there are some (big) differences: |
5 | 5 |
|
6 | 6 | ## Architectural changes:
|
7 | 7 |
|
8 | 8 | - we changed the namespace, now everything is under `Elastic\Elasticsearch`;
|
9 |
| -- we used the [elastic-transport-php](https://github.com/elastic/elastic-transport-php) library |
10 |
| - to manage the HTTP requests and responses; This library allows the usage of any [PSR-18](https://www.php-fig.org/psr/psr-18/) |
11 |
| - client. |
12 |
| -- we changed the response type of each endpoints using a wrapper class of a [PSR-7](https://www.php-fig.org/psr/psr-7/) |
13 |
| - response. This class allows the access of the body response as array or object. This means |
14 |
| - you can access the API response as in 7.x, no BC break here! :angel: |
| 9 | +- we used the [elastic-transport-php](https://github.com/elastic/elastic-transport-php) library for HTTP communications; |
| 10 | +- we changed the `Exception` model, using the namespace `Elastic\Elasticsearch\Exception`. All the exceptions extends the |
| 11 | + `ElasticsearchException` interface, as in 7.x; |
| 12 | +- we changed the response type of each endpoints using an [Elasticsearch](src/Response/Elasticsearch.php) response class. |
| 13 | + This class wraps a a [PSR-7](https://www.php-fig.org/psr/psr-7/) response allowing the access of the body response |
| 14 | + as array or object. This means you can access the API response as in 7.x, no BC break here! :angel: |
15 | 15 |
|
16 | 16 | ## Specific changes:
|
17 | 17 |
|
18 |
| -- to be completed |
| 18 | +The following functions has been removed: |
| 19 | + |
| 20 | +- `ClientBuilder::getEndpoint()` |
| 21 | +- `ClientBuilder::getRegisteredNamespacesBuilders()` |
| 22 | +- `ClientBuilder::getRegisteredNamespacesBuilders()` |
| 23 | +- `ClientBuilder::defaultHandler()` |
| 24 | +- `ClientBuilder::multiHandler()` |
| 25 | +- `ClientBuilder::singleHandler()` |
| 26 | +- `ClientBuilder::setConnectionFactory()` |
| 27 | +- `ClientBuilder::setConnectionPool()` |
| 28 | +- `ClientBuilder::setEndpoint()` |
| 29 | +- `ClientBuilder::registerNamespace()` |
| 30 | +- `ClientBuilder::setTransport()`, you can specify an HTTP PSR-18 client using `ClientBuilder::setHttpClient()` |
| 31 | +- `ClientBuilder::setHandler()` |
| 32 | +- `ClientBuilder::setTracer()`, you can only set a Logger using `ClientBuilder::setLogger()` |
| 33 | +- `ClientBuilder::setSerializer()` |
| 34 | +- `ClientBuilder::setConnectionParams()`, you can use `ClientBuilder::setHttpClientOptions()` instead |
| 35 | +- `ClientBuilder::setSelector()` |
| 36 | +- `ClientBuilder::setSniffOnStart()` |
| 37 | +- `ClientBuilder::includePortInHostHeader()` |
| 38 | + |
19 | 39 | # 7.17
|
20 | 40 |
|
21 | 41 | - We changed the signature of `Elasticsearch\Common\EmptyLogger::log` adding the `void` return type.
|
|
0 commit comments