Skip to content

Commit

Permalink
Merge branch '7.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
ezimuel committed Apr 21, 2021
2 parents da7dc1a + f0bc440 commit f72dcb3
Show file tree
Hide file tree
Showing 443 changed files with 7,310 additions and 979 deletions.
14 changes: 0 additions & 14 deletions .ci/jobs/elastic+elasticsearch-php+7.11.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ composer.phar

#editor related
.idea
.vscode
.vscode/

# OS generated files
.DS_Store
Expand All @@ -26,9 +26,11 @@ util/elasticsearch/
util/cache/
util/*.zip
util/output/
util/rest-spec

# Doctum docs generator
/doctum.phar
util/doctum.phar

# PHPUnit
/phpunit.xml
Expand All @@ -44,5 +46,3 @@ tests/*-junit.xml

# YAML tests
tests/Elasticsearch/Tests/Yaml

.ci/output
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

27 changes: 21 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# Release 7.11.0
## Release 7.12.0

- Updated the endpoints for ES 7.12 + removed cpliakas/git-wrapper
in favor of symplify/git-wrapper
[136d5b9](https://github.com/elastic/elasticsearch-php/commit/136d5b9717b3806c6b34ef8a5076bfe7cee8b46e)
- Fixed warning header as array in YAML tests generator
[0d81be1](https://github.com/elastic/elasticsearch-php/commit/0d81be131bfc7eff6ef82468e61c16077a892aab)
- Refactored TEST_SUITE with free, platinum + removed old YamlRunnerTest
[f69d96f](https://github.com/elastic/elasticsearch-php/commit/f69d96fc283580177002b4088c279c3d0c07befe)

## Release 7.11.0

- [#1089](https://github.com/elastic/elasticsearch-php/pull/1089) Added the `X-Elastic-Client-Meta` header which is used by Elastic Cloud
- Added the `X-Elastic-Client-Meta` header which is used by Elastic Cloud
and can be disabled with `ClientBuilder::setElasticMetaHeader(false)`
- [#1075](https://github.com/elastic/elasticsearch-php/pull/1075) Replaced `array_walk` with `array_map` in `Connection::getURI` for PHP 8
[#1089](https://github.com/elastic/elasticsearch-php/pull/1089)
- Replaced `array_walk` with `array_map` in `Connection::getURI` for PHP 8
compatibility
- [#1069](https://github.com/elastic/elasticsearch-php/pull/1069) Remove unnecessary `InvalidArgumentExceptions`
- [#1063](https://github.com/elastic/elasticsearch-php/pull/1063) Introducing PHP 8 compatibility
- [#1062](https://github.com/elastic/elasticsearch-php/pull/1062) Replace Sami by Doctum and fix `.gitignore`
[#1075](https://github.com/elastic/elasticsearch-php/pull/1075)
- Remove unnecessary `InvalidArgumentExceptions`
[#1069](https://github.com/elastic/elasticsearch-php/pull/1069)
- Introducing PHP 8 compatibility
[#1063](https://github.com/elastic/elasticsearch-php/pull/1063)
- Replace Sami by Doctum and fix `.gitignore`
[#1062](https://github.com/elastic/elasticsearch-php/pull/1062)

## Release 7.10.0

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Version Matrix
| >= 1.0, < 2.0 | 1.0 or 2.0 |
| <= 0.90.x | 0.4 |

- If you are using Elasticsearch 7.x you can use use Elasticsearch-PHP 7.x branch
- If you are using Elasticsearch 7.x you can use Elasticsearch-PHP 7.x branch
- If you are using Elasticsearch 6.6 to 6.7, use Elasticsearch-PHP 6.7.x branch.
- If you are using Elasticsearch 6.0 to 6.5, use Elasticsearch-PHP 6.5.x branch.
- If you are using Elasticsearch 5.x, use Elasticsearch-PHP 5.0 branch.
Expand All @@ -91,7 +91,7 @@ Documentation
--------------
[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!

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.
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.
The examples are stored in asciidoc format under `docs/examples` folder.

Installation via Composer
Expand Down Expand Up @@ -434,7 +434,7 @@ $client = $builder->build();
Contributing
============

If you want to contribute to this project you need to subscribe a [Contributor Agreement](https://www.elastic.co/contributor-agreement).
If you want to contribute to this project you need to subscribe to a [Contributor Agreement](https://www.elastic.co/contributor-agreement).
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.

Never send PR to `master` unless you want to contribute to the development version of the client (`master` represents the next major version).
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"require-dev": {
"ext-yaml": "*",
"ext-zip": "*",
"cpliakas/git-wrapper": "~2.0 || ~3.0",
"doctrine/inflector": "^1.3",
"mockery/mockery": "^1.2",
"phpstan/phpstan": "^0.12",
Expand Down
1 change: 1 addition & 0 deletions docs/build/DOCTUM_VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.1.0
111 changes: 111 additions & 0 deletions docs/build/Elasticsearch/Namespaces/AsyncSearchNamespace.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@

[discrete]
[[Elasticsearch_Namespaces_AsyncSearchNamespace]]
=== Elasticsearch\Namespaces\AsyncSearchNamespace



Class AsyncSearchNamespace
Generated running $ php util/GenerateEndpoints.php 7.9


*Methods*

The class defines the following methods:

* <<Elasticsearch_Namespaces_AsyncSearchNamespacedelete_delete,`delete()`>>
* <<Elasticsearch_Namespaces_AsyncSearchNamespaceget_get,`get()`>>
* <<Elasticsearch_Namespaces_AsyncSearchNamespacesubmit_submit,`submit()`>>



[[Elasticsearch_Namespaces_AsyncSearchNamespacedelete_delete]]
.`delete()`
****
[source,php]
----
/*
$params['id'] = (string) The async search ID
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->asyncsearch()->delete($params);
----
****



[[Elasticsearch_Namespaces_AsyncSearchNamespaceget_get]]
.`get()`
****
[source,php]
----
/*
$params['id'] = (string) The async search ID
$params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response
$params['keep_alive'] = (time) Specify the time interval in which the results (partial or final) for this search will be available
$params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->asyncsearch()->get($params);
----
****



[[Elasticsearch_Namespaces_AsyncSearchNamespacesubmit_submit]]
.`submit()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
$params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response (Default = 1s)
$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)
$params['keep_alive'] = (time) Update the time interval in which the results (partial or final) for this search will be available (Default = 5d)
$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)
$params['request_cache'] = (boolean) Specify if request cache should be used for this request or not, defaults to true
$params['analyzer'] = (string) The analyzer to use for the query string
$params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false)
$params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR)
$params['df'] = (string) The field to use as default where no field prefix is given in the query string
$params['explain'] = (boolean) Specify whether to return detailed information about score computation as part of a hit
$params['stored_fields'] = (list) A comma-separated list of stored fields to return as part of a hit
$params['docvalue_fields'] = (list) A comma-separated list of fields to return as the docvalue representation of a field for each hit
$params['from'] = (number) Starting offset (default: 0)
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['ignore_throttled'] = (boolean) Whether specified concrete, expanded or aliased indices should be ignored when throttled
$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)
$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)
$params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
$params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
$params['q'] = (string) Query in the Lucene query string syntax
$params['routing'] = (list) A comma-separated list of specific routing values
$params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch)
$params['size'] = (number) Number of hits to return (default: 10)
$params['sort'] = (list) A comma-separated list of <field>:<direction> pairs
$params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
$params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
$params['_source_includes'] = (list) A list of fields to extract and return from the _source field
$params['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->asyncsearch()->submit($params);
----
****


104 changes: 104 additions & 0 deletions docs/build/Elasticsearch/Namespaces/AutoscalingNamespace.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@

[discrete]
[[Elasticsearch_Namespaces_AutoscalingNamespace]]
=== Elasticsearch\Namespaces\AutoscalingNamespace



Class AutoscalingNamespace
Generated running $ php util/GenerateEndpoints.php 7.9


*Methods*

The class defines the following methods:

* <<Elasticsearch_Namespaces_AutoscalingNamespacedeleteAutoscalingPolicy_deleteAutoscalingPolicy,`deleteAutoscalingPolicy()`>>
* <<Elasticsearch_Namespaces_AutoscalingNamespacegetAutoscalingDecision_getAutoscalingDecision,`getAutoscalingDecision()`>>
* <<Elasticsearch_Namespaces_AutoscalingNamespacegetAutoscalingPolicy_getAutoscalingPolicy,`getAutoscalingPolicy()`>>
* <<Elasticsearch_Namespaces_AutoscalingNamespaceputAutoscalingPolicy_putAutoscalingPolicy,`putAutoscalingPolicy()`>>



[[Elasticsearch_Namespaces_AutoscalingNamespacedeleteAutoscalingPolicy_deleteAutoscalingPolicy]]
.`deleteAutoscalingPolicy()`
*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release
****
[source,php]
----
/*
$params['name'] = (string) the name of the autoscaling policy
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->autoscaling()->deleteAutoscalingPolicy($params);
----
****



[[Elasticsearch_Namespaces_AutoscalingNamespacegetAutoscalingDecision_getAutoscalingDecision]]
.`getAutoscalingDecision()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->autoscaling()->getAutoscalingDecision($params);
----
****



[[Elasticsearch_Namespaces_AutoscalingNamespacegetAutoscalingPolicy_getAutoscalingPolicy]]
.`getAutoscalingPolicy()`
*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release
****
[source,php]
----
/*
$params['name'] = (string) the name of the autoscaling policy
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->autoscaling()->getAutoscalingPolicy($params);
----
****



[[Elasticsearch_Namespaces_AutoscalingNamespaceputAutoscalingPolicy_putAutoscalingPolicy]]
.`putAutoscalingPolicy()`
*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release
****
[source,php]
----
/*
$params['name'] = (string) the name of the autoscaling policy
$params['body'] = (array) the specification of the autoscaling policy (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->autoscaling()->putAutoscalingPolicy($params);
----
****


Loading

0 comments on commit f72dcb3

Please sign in to comment.