Skip to content

Commit bed7bc1

Browse files
committed
Merge branch '7.x' of github.com:elastic/elasticsearch-php into 7.x
2 parents 4a3f741 + 359aa98 commit bed7bc1

File tree

3 files changed

+90
-49
lines changed

3 files changed

+90
-49
lines changed

docs/breaking-changes.asciidoc

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,44 @@
33

44
### E_USER_DEPRECATED notice when using deprecated parameters
55

6-
Starting from elasticsearch-php 7.4.0, we generate a PHP [E_USER_DEPRECATED](https://www.php.net/manual/en/errorfunc.constants.php)
7-
notice every time you use a deprecated parameters for Elasticsearch.
8-
We decided to add this notice to facilitate the code refactoring with the
9-
new API specification of Elasticsearch (e.g. the usage of typeless APIs, see below).
6+
Starting from elasticsearch-php 7.4.0, we generate a PHP
7+
https://www.php.net/manual/en/errorfunc.constants.php[E_USER_DEPRECATED] notice
8+
every time you use a deprecated parameters for {es}. We decided to add this
9+
notice to facilitate the code refactoring with the new API specification of {es}
10+
(for example the usage of typeless APIs, see below).
1011

11-
### Moving from types to typeless APIs in Elasticsearch 7.0
12+
From 7.4.1, we mitigated the usage of E_USER_DEPRICATED warning by using the `@`
13+
https://www.php.net/manual/en/language.operators.errorcontrol.php[operator]. The
14+
operator suppresses the error message, however, it is still possible to catch it
15+
by using a custom error handler:
1216

13-
Elasticsearch 7.0 deprecated APIs that accept types, introduced new typeless
14-
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)
17+
[source,php]
18+
----
19+
set_error_handler(function ($errno, $errstr) {
20+
var_dump($errstr);
21+
}, E_USER_DEPRECATED);
22+
23+
@trigger_error('Deprecation message here', E_USER_DEPRECATED);
24+
----
25+
26+
27+
### Moving from types to typeless APIs in {es} 7.0
28+
29+
{es} 7.0 deprecated APIs that accept types, introduced new typeless APIs, and
30+
removed support for the _default_ mapping. Read
31+
https://www.elastic.co/blog/moving-from-types-to-typeless-apis-in-elasticsearch-7-0[this]
1532
blog post for more information.
1633

34+
1735
### Type hint and return type
1836

19-
Added type hints and return type declarations in all the code base, where possible.
20-
See PR [#897](https://github.com/elastic/elasticsearch-php/pull/897).
37+
Added type hints and return type declarations in all the code base where
38+
possible. See PR https://github.com/elastic/elasticsearch-php/pull/897[#897].
39+
2140

2241
### PHP 7.1+ Requirement
2342

2443
We require using PHP 7.1+ for elasticsearch-php. PHP 7.0 is not supported since
25-
1st Jan 2019. See [PHP supported version](https://www.php.net/supported-versions.php) for
26-
more information.
44+
1st Jan 2019. Refer
45+
https://www.php.net/supported-versions.php[PHP supported version] for more
46+
information.

docs/community.asciidoc

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,48 @@
66
https://github.com/ongr-io/ElasticsearchDSL[Link: ElasticsearchDSL]
77
[quote, ElasticsearchDSL]
88
__________________________
9-
Introducing Elasticsearch DSL library to provide objective query builder for Elasticsearch bundle and elasticsearch-php client. You can easily build any Elasticsearch query and transform it to an array.
9+
Introducing {es} DSL library to provide objective query builder for {es} bundle
10+
and elasticsearch-php client. You can easily build any {es} query and transform
11+
it to an array.
1012
__________________________
1113

14+
1215
=== elasticsearcher
1316

1417
https://github.com/madewithlove/elasticsearcher[Link: elasticsearcher]
1518

1619
[quote, elasticsearcher]
1720
__________________________
18-
This agnostic package is a lightweight wrapper on top of the Elasticsearch PHP client. Its main goal is to allow for easier structuring of queries and indices in your application. It does not want to hide or replace functionality of the Elasticsearch PHP client.
21+
This agnostic package is a lightweight wrapper on top of the {es} PHP client.
22+
Its main goal is to allow for easier structuring of queries and indices in your
23+
application. It does not want to hide or replace functionality of the {es} PHP
24+
client.
1925
__________________________
2026

27+
2128
=== ElasticSearchQueryDSL
2229

2330
https://github.com/gskema/elasticsearch-query-dsl-php[Link: ElasticSearchQueryDSL]
2431

2532
[quote, ElasticSearchQueryDSL]
2633
__________________________
27-
Feature complete, object oriented, composable, extendable ElasticSearch query DSL builder for PHP. Deliberately built to be as simple as possible, easily usable and with explicit naming.
34+
Feature complete, object oriented, composable, extendable {es} query DSL builder
35+
for PHP. Deliberately built to be as simple as possible, easily usable and with
36+
explicit naming.
2837
__________________________
2938

39+
3040
== Community Integrations
3141

3242
=== Symfony
3343

3444
==== ONGR Elasticsearch Bundle
3545

36-
https://github.com/ongr-io/ElasticsearchBundle[Link: ONGR Elasticsearch Bundle]
46+
https://github.com/ongr-io/ElasticsearchBundle[Link: ONGR {es} Bundle]
3747

38-
[quote, ONGR Elasticsearch Bundle]
48+
[quote, ONGR {es} Bundle]
3949
__________________________
40-
Elasticsearch Bundle was created in order to serve the need for professional elasticsearch
50+
{es} Bundle was created in order to serve the need for professional {es}
4151
integration with enterprise level Symfony 2 systems. This bundle is:
4252
4353
- Supported by ONGR.io development team.
@@ -46,10 +56,13 @@ integration with enterprise level Symfony 2 systems. This bundle is:
4656
4757
Technical goodies:
4858
49-
- Provides nestable and DSL query builder to be executed by type repository services.
50-
- Uses Doctrine-like document / entities document-object mapping using annotations.
59+
- Provides nestable and DSL query builder to be executed by type repository
60+
services.
61+
- Uses Doctrine-like document / entities document-object mapping using
62+
annotations.
5163
- Query results iterators are provided for your convenience.
52-
- Registers console commands for index and types management and data import / export.
64+
- Registers console commands for index and types management and data import /
65+
export.
5366
- Designed in an extensible way for all your custom needs.
5467
__________________________
5568

@@ -60,23 +73,26 @@ https://github.com/FriendsOfSymfony/FOSElasticaBundle[Link: FOS Elastica Bundle]
6073

6174
[quote, FOS Elastica Bundle]
6275
__________________________
63-
This bundle provides integration with https://github.com/ruflin/Elastica[Link: Elastica] for Symfony. Features include:
76+
This bundle provides integration with
77+
https://github.com/ruflin/Elastica[Link: Elastica] for Symfony. Features
78+
include:
6479
65-
- Integrates the Elastica library into a Symfony environment
66-
- Automatically generate mappings using a serializer
67-
- Listeners for Doctrine events for automatic indexing
80+
- Integrates the Elastica library into a Symfony environment.
81+
- Automatically generate mappings using a serializer.
82+
- Listeners for Doctrine events for automatic indexing.
6883
__________________________
6984

7085

7186
=== Drupal
7287

73-
==== Elasticsearch Connector
88+
==== {es} Connector
7489

75-
https://www.drupal.org/project/elasticsearch_connector[Link: Elasticsearch Connector]
90+
https://www.drupal.org/project/elasticsearch_connector[Link: {es} Connector]
7691

77-
[quote, Elasticsearch Connector]
92+
[quote, {es} Connector]
7893
__________________________
79-
Elasticsearch Connector is a set of modules designed to build a full Elasticsearch eco system in Drupal.
94+
{es} Connector is a set of modules designed to build a full {es} eco system in
95+
Drupal.
8096
__________________________
8197

8298
=== Laravel
@@ -87,7 +103,7 @@ https://github.com/shift31/laravel-elasticsearch[Link: shift31/Laravel-Elasticse
87103

88104
[quote, Laravel-Elasticsearch]
89105
__________________________
90-
This is a Laravel (4+) Service Provider for the official Elasticsearch low-level client.
106+
This is a Laravel (4+) Service Provider for the official {es} low-level client.
91107
__________________________
92108

93109

@@ -97,7 +113,7 @@ https://github.com/cviebrock/laravel-elasticsearch[Link: cviebrock/Laravel-Elast
97113

98114
[quote, Laravel-Elasticsearch]
99115
__________________________
100-
An easy way to use the official Elastic Search client in your Laravel applications.
116+
An easy way to use the official {es} client in your Laravel applications.
101117
__________________________
102118

103119

@@ -107,7 +123,9 @@ https://github.com/sleimanx2/plastic[Link: Plastic]
107123

108124
[quote, Plastic]
109125
__________________________
110-
Plastic is an Elasticsearch ODM and mapper for Laravel. It renders the developer experience more enjoyable while using Elasticsearch, by providing a fluent syntax for mapping, querying, and storing eloquent models.
126+
Plastic is an {es} ODM and mapper for Laravel. It renders the developer
127+
experience more enjoyable while using {es} by providing a fluent syntax for
128+
mapping, querying, and storing eloquent models.
111129
__________________________
112130

113131
=== Helper
@@ -118,7 +136,9 @@ https://github.com/Nexucis/es-php-index-helper[Link: nexucis/es-php-index-helper
118136

119137
[quote, Index Helper]
120138
_____________________
121-
This helper is a light library which wrap the official client elasticsearch-php. It will help you to manage your ES Indices with no downtime.
122-
This helper implements the philosophy described in the https://www.elastic.co/guide/en/elasticsearch/guide/master/index-aliases.html[official documentation]
123-
which can be summarized in a few words : *use alias instead of index directly*
139+
This helper is a light library which wrap the official client elasticsearch-php.
140+
It will help you to manage your ES Indices with no downtime. This helper
141+
implements the philosophy described in the
142+
https://www.elastic.co/guide/en/elasticsearch/guide/master/index-aliases.html[official documentation]
143+
which can be summarized in a few words : *use alias instead of index directly*.
124144
_____________________

docs/experimental-beta-apis.asciidoc

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
[[experimental_and_beta_apis]]
22
== Experimental and beta APIs
33

4-
The PHP client offers also `experimental` and `beta` APIs for Elasticsearch.
5-
6-
The Elasticsearch API are marked using the following convention:
7-
8-
- **Stable** APIs should be safe to use extensively in production.
9-
Any breaking changes to these APIs should only occur in major versions and
10-
will be clearly documented in the breaking changes documentation for that
11-
release.
12-
- **Beta** APIs are on track to become stable and permanent features.
13-
Caution should be exercised in their use since it is possible we’d have to make
14-
a breaking change to these APIs in a minor version, but we’ll avoid this
15-
wherever possible.
4+
The PHP client offers also `experimental` and `beta` APIs for {es}.
5+
6+
The {es} APIs are marked using the following convention:
7+
8+
- **Stable** APIs should be safe to use extensively in production. Any breaking
9+
changes to these APIs should only occur in major versions and will be
10+
documented in the breaking changes documentation for that release.
11+
- **Beta** APIs are on track to become stable and permanent features. Use them
12+
with caution because it is possible that breaking changes are made to these
13+
APIs in a minor version.
1614
- **Experimental** APIs are just that - an experiment. An experimental API might
1715
have breaking changes in any future version, or it might even be removed
1816
entirely.
1917

2018
All the `experimental` and `beta` APIs are marked with a `@note` tag in the
2119
phpdoc section of the code.
2220

21+
2322
=== Experimental
2423

25-
The experimental APIs included in the current version of `elasticsearch-php` are:
24+
The experimental APIs included in the current version of `elasticsearch-php`
25+
are:
2626

27-
- [Ranking Evaluation](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/search-rank-eval.html)
27+
- https://www.elastic.co/guide/en/elasticsearch/reference/7.4/search-rank-eval.html[Ranking Evaluation]
2828

2929
[source,php]
3030
----
@@ -35,7 +35,7 @@ $params = [
3535
$result = $client->rankEval($params);
3636
----
3737

38-
- [Painless Execute](https://www.elastic.co/guide/en/elasticsearch/painless/7.4/painless-execute-api.html)
38+
- https://www.elastic.co/guide/en/elasticsearch/painless/7.4/painless-execute-api.html[Painless Execute]
3939

4040
[source,php]
4141
----
@@ -68,6 +68,7 @@ $client = ClientBuilder::create()->build();
6868
$result = $client->getScriptLanguages();
6969
----
7070

71+
7172
=== Beta
7273

7374
There are no beta APIs in the current version of `elasticsearch-php`.

0 commit comments

Comments
 (0)