IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Release notes
editRelease notes
edit8.1.0
edit- updated APIs for Elasticsearch 8.1
8.0.1
edit-
use of
NoNodeAvailableException
exception in endpoints, fixing #1209
8.0.0
editThis new major version of elasticsearch-php contains a brand new implementation compared with 7.x. It supports PSR-7 for HTTP messages and PSR-18 for HTTP client communications. We used the elastic-transport-php library for HTTP communications.
We tried to reduce the BC breaks as much as possible with 7.x but there are some (big) differences:
-
we changed the namespace, now everything is under
Elastic\Elasticsearch
; -
we changed the Exception model, using the namespace
Elastic\Elasticsearch\Exception
. All the exceptions extends theElasticsearchException
interface, as in 7.x; - we changed the response type of each endpoints using an Elasticsearch response class. This class wraps a a PSR-7 response allowing the access of the body response as array or object. This means you can access the API response as in 7.x, no BC break here!
You can have a look at the BREAKING_CHANGES online document for more information.
7.17.0
edit- Allow psr/log v3 #1184
7.16.0
edit7.15.0
edit- Updated endpoints for Elasticsearch 7.15.0 995f6d4
7.14.0
edit7.13.1
edit- Added port in url for trace and logger messages #1126
7.13.0
edit7.12.0
edit7.11.0
edit-
Added the
X-Elastic-Client-Meta
header which is used by Elastic Cloud and can be disabled withClientBuilder::setElasticMetaHeader(false)
#1089 -
Replaced
array_walk
witharray_map
inConnection::getURI
for PHP 8 compatibility #1075 -
Remove unnecessary
InvalidArgumentExceptions
#1069 - Introducing PHP 8 compatibility #1063
-
Replace Sami by Doctum and fix
.gitignore
#1062
7.10.0
edit- Updated endpoints and namespaces for Elasticsearch 7.10 3ceb748
-
Fixed ClientBuilder::fromConfig allowing multiple function parameters (for
example,
setApiKey
) #1076 - Refactored the YAML tests using generated PHPUnit code [85fadc2](https://github.com/elastic/elasticsearch-php/commit/85fadc2bd4b2b309b19761a50ff13010d43a524d)
7.9.1
edit7.9.0
edit7.8.0
edit7.7.0
edit7.6.1
edit-
Fixed issue with
guzzlehttp/ringphp
andguzzle/streams
using forksezimuel/ringphp
andezimuel/guzzlestreams
92a6a4a
7.6.0
edit- Generated the new endpoints for Elasticsearch 7.6.0 be31f31
7.5.1
edit- Fixes port missing in log #925 75e0888
-
Added
ClientBuilder::includePortInHostHeader()
to add theport
in theHost
header. This fixes #993. By default theport
is not included in theHost
header. #997 - Replace abandoned packages: ringphp, streams and phpstan-shim #996
- Fixed gzip compression when setting Cloud Id #986
7.5.0
edit7.4.1
edit-
We added the suppress operator
@
for the deprecation messages@trigger_error()
. With this approach, we don’t break existing application that convert PHP errors in Exception (for example, using Laravel with issue 297) Using the@
operator is still possible to intercept the deprecation message using a custom error handler. #973 - Add missing leading slash in the URL of put mapping endpoint #970
- Fix pre 7.2 endpoint class name with aliases + reapply fix #947. This PR solved the unexpected BC break introduce in 7.4.0 with the code generation tool #968
7.4.0
edit-
Added the code generation for endpoints and namespaces based on the
REST API specification
of Elasticsearch. This tool is available in
util/GenerateEndpoints.php
. #966 - Fixed the asciidoc endpoints documentation based on the code generation using Sami project #966
-
All the
experimental
andbeta
APIs are now signed with a@note
tag in the phpdoc section (for example, $client→rankEval()). For more information read the experimental and beta APIs section in the documentation. #966 -
Removed
AlreadyExpiredException
since it has been removed from Elasticsearch with #24857 #954
7.3.0
edit7.2.2
edit-
Reintroduced the optional parameter in
Elasticsearch\Namespaces\IndicesNamespace::getAliases()
. This fixes the BC break introduced in 7.2.0 and 7.2.1. #947
7.2.1
edit-
Reintroduced
Elasticsearch\Namespaces\IndicesNamespace::getAliases()
as proxy toIndicesNamespace::getAlias()
to prevent BC breaks. ThegetAliases()
is marked as deprecated and it will be removed fromelasticsearch-php 8.0
#943
Docs
edit- Fixed missing put mapping code snippet in code examples #938
7.2.0
edit- Updated the API endpoints for working with Elasticsearch 7.2.0:
-
added
wait_for_active_shards
parameter toindices.close
API; -
added
expand_wildcards
parameter tocluster.health
API; -
added include_unloaded_segments`,
expand_wildcards
,forbid_closed_indices
parameters toindices.stats
API. 27d721b - Updated the phpdoc parameters for all the API endpoints 27d721b
- Improved the Travis CI speed using cache feature with composer #929
-
Fixed
php_uname()
usage checking if it is disabled #927 - Added support of Elastic Cloud ID and API key authentication #923
7.1.1
edit7.1.0
edit-
Added warning log for Elasticsearch response containing the
Warning
header #911 -
Fixed #838 hosting company is blocking ports because of
YamlRunnerTest.php
#844 -
Specialized inheritance of
NoNodesAvailableException
to extendServerErrorResponseException
instead of the generic\Exception
#607 - Fixed scroll TTL is extracted but not set as a body param #907
Testing
editDocs
edit- Documentation updated for Elasticsearch 7 #904
7.0.2
edit- Fixed incorrect return type hint when using async requests/futures #905
7.0.1
edit- Fixed SniffingConnectionPool removing the return type of Connection::sniff() #899
7.0.0
edit- Requirement of PHP 7.1 instead of 7.0 that is not supported since 1 Jan 2019. #897
- Code refactoring using type hints and return type declarations where possible #897
- Update vendor libraries (PHPUnit 7.5, Symfony YAML 4.3, and so on) #897
- Updated all the API endpoints using the latest 7.0.0 specs of Elasticsearch #897
-
Added the
User-Agent
in each HTTP request #898 -
Simplified the logging methods
logRequestFail($request, $response, $exception)
andlogRequestSuccess($request, $response)
inElasticsearch\Connections\Connection
#876 -
Fix
json_encode
for unicode(emoji) characters #856 - Fix HTTP port specification using CURLOPT_PORT, not anymore in the host #782