Skip to content

Commit

Permalink
Merge 8d0f10f into db7e4c3
Browse files Browse the repository at this point in the history
  • Loading branch information
deguif committed Oct 26, 2020
2 parents db7e4c3 + 8d0f10f commit 7d14563
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Replaced deprecated `exceptions` request option by `http_errors` request option in Guzzle transport [#1817](https://github.com/ruflin/Elastica/pull/1817)
* Used `GuzzleHttp\RequestOptions` constants for configuring request options [#1820](https://github.com/ruflin/Elastica/pull/1820)
### Deprecated
* Deprecated `Elastica\Exception\ResponseException::getElasticsearchException()`, use `getResponse()::getFullError()` instead [#1829](https://github.com/ruflin/Elastica/pull/1829)
* Deprecated `Elastica\QueryBuilder\DSL\Aggregation::global_agg()`, use `global()` instead [#1826](https://github.com/ruflin/Elastica/pull/1826)
* Deprecated Match query class and introduced MatchQuery instead for PHP 8.0 compatibility reason [#1799](https://github.com/ruflin/Elastica/pull/1799)
* Deprecated `version`/`version_type` options [(deprecated in `6.7.0`)](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-update.html) and added `if_seq_no` / `if_primary_term` that replaced it
Expand Down
2 changes: 2 additions & 0 deletions src/Exception/ResponseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public function getResponse(): Response
*/
public function getElasticsearchException(): ElasticsearchException
{
@\trigger_error(\sprintf('The "%s()" method is deprecated since Elastica 7.1.0, use "%s::getResponse()::getFullError()" instead. It will be removed in 8.0.', __METHOD__, __CLASS__), E_USER_DEPRECATED);

$response = $this->getResponse();

return new ElasticsearchException($response->getStatus(), $response->getErrorMessage());
Expand Down

0 comments on commit 7d14563

Please sign in to comment.