Skip to content

Commit f72dcb3

Browse files
committed
Merge branch '7.x'
2 parents da7dc1a + f0bc440 commit f72dcb3

File tree

443 files changed

+7310
-979
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

443 files changed

+7310
-979
lines changed

.ci/jobs/elastic+elasticsearch-php+7.11.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ composer.phar
66

77
#editor related
88
.idea
9-
.vscode
9+
.vscode/
1010

1111
# OS generated files
1212
.DS_Store
@@ -26,9 +26,11 @@ util/elasticsearch/
2626
util/cache/
2727
util/*.zip
2828
util/output/
29+
util/rest-spec
2930

3031
# Doctum docs generator
3132
/doctum.phar
33+
util/doctum.phar
3234

3335
# PHPUnit
3436
/phpunit.xml
@@ -44,5 +46,3 @@ tests/*-junit.xml
4446

4547
# YAML tests
4648
tests/Elasticsearch/Tests/Yaml
47-
48-
.ci/output

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
1-
# Release 7.11.0
1+
## Release 7.12.0
2+
3+
- Updated the endpoints for ES 7.12 + removed cpliakas/git-wrapper
4+
in favor of symplify/git-wrapper
5+
[136d5b9](https://github.com/elastic/elasticsearch-php/commit/136d5b9717b3806c6b34ef8a5076bfe7cee8b46e)
6+
- Fixed warning header as array in YAML tests generator
7+
[0d81be1](https://github.com/elastic/elasticsearch-php/commit/0d81be131bfc7eff6ef82468e61c16077a892aab)
8+
- Refactored TEST_SUITE with free, platinum + removed old YamlRunnerTest
9+
[f69d96f](https://github.com/elastic/elasticsearch-php/commit/f69d96fc283580177002b4088c279c3d0c07befe)
10+
11+
## Release 7.11.0
212

3-
- [#1089](https://github.com/elastic/elasticsearch-php/pull/1089) Added the `X-Elastic-Client-Meta` header which is used by Elastic Cloud
13+
- Added the `X-Elastic-Client-Meta` header which is used by Elastic Cloud
414
and can be disabled with `ClientBuilder::setElasticMetaHeader(false)`
5-
- [#1075](https://github.com/elastic/elasticsearch-php/pull/1075) Replaced `array_walk` with `array_map` in `Connection::getURI` for PHP 8
15+
[#1089](https://github.com/elastic/elasticsearch-php/pull/1089)
16+
- Replaced `array_walk` with `array_map` in `Connection::getURI` for PHP 8
617
compatibility
7-
- [#1069](https://github.com/elastic/elasticsearch-php/pull/1069) Remove unnecessary `InvalidArgumentExceptions`
8-
- [#1063](https://github.com/elastic/elasticsearch-php/pull/1063) Introducing PHP 8 compatibility
9-
- [#1062](https://github.com/elastic/elasticsearch-php/pull/1062) Replace Sami by Doctum and fix `.gitignore`
18+
[#1075](https://github.com/elastic/elasticsearch-php/pull/1075)
19+
- Remove unnecessary `InvalidArgumentExceptions`
20+
[#1069](https://github.com/elastic/elasticsearch-php/pull/1069)
21+
- Introducing PHP 8 compatibility
22+
[#1063](https://github.com/elastic/elasticsearch-php/pull/1063)
23+
- Replace Sami by Doctum and fix `.gitignore`
24+
[#1062](https://github.com/elastic/elasticsearch-php/pull/1062)
1025

1126
## Release 7.10.0
1227

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Version Matrix
7979
| >= 1.0, < 2.0 | 1.0 or 2.0 |
8080
| <= 0.90.x | 0.4 |
8181

82-
- If you are using Elasticsearch 7.x you can use use Elasticsearch-PHP 7.x branch
82+
- If you are using Elasticsearch 7.x you can use Elasticsearch-PHP 7.x branch
8383
- If you are using Elasticsearch 6.6 to 6.7, use Elasticsearch-PHP 6.7.x branch.
8484
- If you are using Elasticsearch 6.0 to 6.5, use Elasticsearch-PHP 6.5.x branch.
8585
- If you are using Elasticsearch 5.x, use Elasticsearch-PHP 5.0 branch.
@@ -91,7 +91,7 @@ Documentation
9191
--------------
9292
[Full documentation can be found here.](https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html) Docs are stored within the repo under /docs/, so if you see a typo or problem, please submit a PR to fix it!
9393

94-
We also provide a code examples generator for PHP using the `util/GenerateDocExamples.php` script. This command parse the `util/alternative_report.spec.json` file produced from this [JSON specification](https://raw.githubusercontent.com/elastic/built-docs/master/raw/en/elasticsearch/reference/master/alternatives_report.json) and it generates the PHP examples foreach digest value.
94+
We also provide a code examples generator for PHP using the `util/GenerateDocExamples.php` script. This command parses the `util/alternative_report.spec.json` file produced from this [JSON specification](https://raw.githubusercontent.com/elastic/built-docs/master/raw/en/elasticsearch/reference/master/alternatives_report.json) and it generates the PHP examples for each digest value.
9595
The examples are stored in asciidoc format under `docs/examples` folder.
9696

9797
Installation via Composer
@@ -434,7 +434,7 @@ $client = $builder->build();
434434
Contributing
435435
============
436436

437-
If you want to contribute to this project you need to subscribe a [Contributor Agreement](https://www.elastic.co/contributor-agreement).
437+
If you want to contribute to this project you need to subscribe to a [Contributor Agreement](https://www.elastic.co/contributor-agreement).
438438
If you want to send a PR for version `Y` please use the `Y.x` branch. For instance if you want to send a PR for **elasticsearch-php 7** use the `7.x` branch.
439439

440440
Never send PR to `master` unless you want to contribute to the development version of the client (`master` represents the next major version).

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"require-dev": {
2222
"ext-yaml": "*",
2323
"ext-zip": "*",
24-
"cpliakas/git-wrapper": "~2.0 || ~3.0",
2524
"doctrine/inflector": "^1.3",
2625
"mockery/mockery": "^1.2",
2726
"phpstan/phpstan": "^0.12",

docs/build/DOCTUM_VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5.1.0
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
2+
[discrete]
3+
[[Elasticsearch_Namespaces_AsyncSearchNamespace]]
4+
=== Elasticsearch\Namespaces\AsyncSearchNamespace
5+
6+
7+
8+
Class AsyncSearchNamespace
9+
Generated running $ php util/GenerateEndpoints.php 7.9
10+
11+
12+
*Methods*
13+
14+
The class defines the following methods:
15+
16+
* <<Elasticsearch_Namespaces_AsyncSearchNamespacedelete_delete,`delete()`>>
17+
* <<Elasticsearch_Namespaces_AsyncSearchNamespaceget_get,`get()`>>
18+
* <<Elasticsearch_Namespaces_AsyncSearchNamespacesubmit_submit,`submit()`>>
19+
20+
21+
22+
[[Elasticsearch_Namespaces_AsyncSearchNamespacedelete_delete]]
23+
.`delete()`
24+
****
25+
[source,php]
26+
----
27+
/*
28+
$params['id'] = (string) The async search ID
29+
*/
30+
31+
$params = [
32+
// ...
33+
];
34+
35+
$client = ClientBuilder::create()->build();
36+
$response = $client->asyncsearch()->delete($params);
37+
----
38+
****
39+
40+
41+
42+
[[Elasticsearch_Namespaces_AsyncSearchNamespaceget_get]]
43+
.`get()`
44+
****
45+
[source,php]
46+
----
47+
/*
48+
$params['id'] = (string) The async search ID
49+
$params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response
50+
$params['keep_alive'] = (time) Specify the time interval in which the results (partial or final) for this search will be available
51+
$params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response
52+
*/
53+
54+
$params = [
55+
// ...
56+
];
57+
58+
$client = ClientBuilder::create()->build();
59+
$response = $client->asyncsearch()->get($params);
60+
----
61+
****
62+
63+
64+
65+
[[Elasticsearch_Namespaces_AsyncSearchNamespacesubmit_submit]]
66+
.`submit()`
67+
****
68+
[source,php]
69+
----
70+
/*
71+
$params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
72+
$params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response (Default = 1s)
73+
$params['keep_on_completion'] = (boolean) Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false) (Default = false)
74+
$params['keep_alive'] = (time) Update the time interval in which the results (partial or final) for this search will be available (Default = 5d)
75+
$params['batched_reduce_size'] = (number) The number of shard results that should be reduced at once on the coordinating node. This value should be used as the granularity at which progress results will be made available. (Default = 5)
76+
$params['request_cache'] = (boolean) Specify if request cache should be used for this request or not, defaults to true
77+
$params['analyzer'] = (string) The analyzer to use for the query string
78+
$params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false)
79+
$params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR)
80+
$params['df'] = (string) The field to use as default where no field prefix is given in the query string
81+
$params['explain'] = (boolean) Specify whether to return detailed information about score computation as part of a hit
82+
$params['stored_fields'] = (list) A comma-separated list of stored fields to return as part of a hit
83+
$params['docvalue_fields'] = (list) A comma-separated list of fields to return as the docvalue representation of a field for each hit
84+
$params['from'] = (number) Starting offset (default: 0)
85+
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
86+
$params['ignore_throttled'] = (boolean) Whether specified concrete, expanded or aliased indices should be ignored when throttled
87+
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
88+
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
89+
$params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
90+
$params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
91+
$params['q'] = (string) Query in the Lucene query string syntax
92+
$params['routing'] = (list) A comma-separated list of specific routing values
93+
$params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch)
94+
$params['size'] = (number) Number of hits to return (default: 10)
95+
$params['sort'] = (list) A comma-separated list of <field>:<direction> pairs
96+
$params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
97+
$params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
98+
$params['_source_includes'] = (list) A list of fields to extract and return from the _source field
99+
$params['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
100+
*/
101+
102+
$params = [
103+
// ...
104+
];
105+
106+
$client = ClientBuilder::create()->build();
107+
$response = $client->asyncsearch()->submit($params);
108+
----
109+
****
110+
111+
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
2+
[discrete]
3+
[[Elasticsearch_Namespaces_AutoscalingNamespace]]
4+
=== Elasticsearch\Namespaces\AutoscalingNamespace
5+
6+
7+
8+
Class AutoscalingNamespace
9+
Generated running $ php util/GenerateEndpoints.php 7.9
10+
11+
12+
*Methods*
13+
14+
The class defines the following methods:
15+
16+
* <<Elasticsearch_Namespaces_AutoscalingNamespacedeleteAutoscalingPolicy_deleteAutoscalingPolicy,`deleteAutoscalingPolicy()`>>
17+
* <<Elasticsearch_Namespaces_AutoscalingNamespacegetAutoscalingDecision_getAutoscalingDecision,`getAutoscalingDecision()`>>
18+
* <<Elasticsearch_Namespaces_AutoscalingNamespacegetAutoscalingPolicy_getAutoscalingPolicy,`getAutoscalingPolicy()`>>
19+
* <<Elasticsearch_Namespaces_AutoscalingNamespaceputAutoscalingPolicy_putAutoscalingPolicy,`putAutoscalingPolicy()`>>
20+
21+
22+
23+
[[Elasticsearch_Namespaces_AutoscalingNamespacedeleteAutoscalingPolicy_deleteAutoscalingPolicy]]
24+
.`deleteAutoscalingPolicy()`
25+
*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release
26+
****
27+
[source,php]
28+
----
29+
/*
30+
$params['name'] = (string) the name of the autoscaling policy
31+
*/
32+
33+
$params = [
34+
// ...
35+
];
36+
37+
$client = ClientBuilder::create()->build();
38+
$response = $client->autoscaling()->deleteAutoscalingPolicy($params);
39+
----
40+
****
41+
42+
43+
44+
[[Elasticsearch_Namespaces_AutoscalingNamespacegetAutoscalingDecision_getAutoscalingDecision]]
45+
.`getAutoscalingDecision()`
46+
****
47+
[source,php]
48+
----
49+
/*
50+
*/
51+
52+
$params = [
53+
// ...
54+
];
55+
56+
$client = ClientBuilder::create()->build();
57+
$response = $client->autoscaling()->getAutoscalingDecision($params);
58+
----
59+
****
60+
61+
62+
63+
[[Elasticsearch_Namespaces_AutoscalingNamespacegetAutoscalingPolicy_getAutoscalingPolicy]]
64+
.`getAutoscalingPolicy()`
65+
*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release
66+
****
67+
[source,php]
68+
----
69+
/*
70+
$params['name'] = (string) the name of the autoscaling policy
71+
*/
72+
73+
$params = [
74+
// ...
75+
];
76+
77+
$client = ClientBuilder::create()->build();
78+
$response = $client->autoscaling()->getAutoscalingPolicy($params);
79+
----
80+
****
81+
82+
83+
84+
[[Elasticsearch_Namespaces_AutoscalingNamespaceputAutoscalingPolicy_putAutoscalingPolicy]]
85+
.`putAutoscalingPolicy()`
86+
*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release
87+
****
88+
[source,php]
89+
----
90+
/*
91+
$params['name'] = (string) the name of the autoscaling policy
92+
$params['body'] = (array) the specification of the autoscaling policy (Required)
93+
*/
94+
95+
$params = [
96+
// ...
97+
];
98+
99+
$client = ClientBuilder::create()->build();
100+
$response = $client->autoscaling()->putAutoscalingPolicy($params);
101+
----
102+
****
103+
104+

0 commit comments

Comments
 (0)