Skip to content

Commit f6b27bd

Browse files
committed
Merge from 8.0
2 parents 3cab97a + 27e46b0 commit f6b27bd

File tree

219 files changed

+20378
-176268
lines changed

Some content is hidden

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

219 files changed

+20378
-176268
lines changed

.ci/Dockerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
ARG PHP_VERSION=7.4-cli
1+
ARG PHP_VERSION=8.0-cli
22
FROM php:${PHP_VERSION}
33

44
WORKDIR /usr/src/app
55

66
# Install git
7-
RUN apt-get update && \
8-
apt-get install -y --no-install-recommends git
7+
RUN apt-get update -qq > /dev/null && \
8+
apt-get install -y --no-install-recommends git -qq > /dev/null
99

1010
# Install zip extension for PHP
1111
RUN apt-get install -y \
1212
libzip-dev \
1313
zip \
1414
libyaml-dev \
15-
&& docker-php-ext-install zip
15+
-qq > /dev/null \
16+
&& docker-php-ext-install zip > /dev/null
1617

1718
# Install yaml extension for PHP
18-
RUN pecl channel-update pecl.php.net
19-
RUN pecl install yaml && docker-php-ext-enable yaml
19+
RUN pecl channel-update pecl.php.net > /dev/null
20+
RUN pecl install yaml > /dev/null
21+
RUN docker-php-ext-enable yaml > /dev/null
2022

2123
# Print PHP version
2224
RUN php -v
@@ -30,7 +32,7 @@ RUN composer --version
3032
COPY composer.json .
3133

3234
# Install dependencies with composer
33-
RUN composer install
35+
RUN composer install --no-progress > /dev/null
3436

3537
COPY . .
3638

.ci/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PHP_VERSION=7.4-cli
1+
ARG PHP_VERSION=8.0-cli
22
FROM php:${PHP_VERSION}
33

44
# Create app directory

.ci/run-elasticsearch.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'.
88
# Export the NUMBER_OF_NODES variable to start more than 1 node
99

10-
# Version 1.6.0
10+
# Version 1.6.1
1111
# - Initial version of the run-elasticsearch.sh script
1212
# - Deleting the volume should not dependent on the container still running
1313
# - Fixed `ES_JAVA_OPTS` config
@@ -20,6 +20,7 @@
2020
# - Added ingest.geoip.downloader.enabled=false as it causes false positives in testing
2121
# - Moved ELASTIC_PASSWORD and xpack.security.enabled to the base arguments for "Security On by default"
2222
# - Use https only when TEST_SUITE is "platinum", when "free" use http
23+
# - Set xpack.security.enabled=false for "free" and xpack.security.enabled=true for "platinum"
2324

2425
script_path=$(dirname $(realpath -s $0))
2526
source $script_path/functions/imports.sh
@@ -34,7 +35,6 @@ cluster_name=${moniker}${suffix}
3435
declare -a volumes
3536
environment=($(cat <<-END
3637
--env ELASTIC_PASSWORD=$elastic_password
37-
--env xpack.security.enabled=false
3838
--env node.name=$es_node_name
3939
--env cluster.name=$cluster_name
4040
--env cluster.initial_master_nodes=$master_node_name
@@ -73,6 +73,7 @@ END
7373
))
7474
else
7575
environment+=($(cat <<-END
76+
--env xpack.security.enabled=false
7677
--env xpack.security.http.ssl.enabled=false
7778
END
7879
))
@@ -88,7 +89,7 @@ fi
8889
docker_pull_attempts=0
8990
until [ "$docker_pull_attempts" -ge 5 ]
9091
do
91-
docker pull docker.elastic.co/elasticsearch/"$elasticsearch_container" && break
92+
docker pull -q docker.elastic.co/elasticsearch/"$elasticsearch_container" && break
9293
docker_pull_attempts=$((docker_pull_attempts+1))
9394
echo "Failed to pull image, retrying in 10 seconds (retry $docker_pull_attempts/5)..."
9495
sleep 10
@@ -127,7 +128,7 @@ END
127128
--ulimit memlock=-1:-1 \
128129
--detach="$local_detach" \
129130
--health-cmd="curl $cert_validation_flags --fail $elasticsearch_url/_cluster/health || exit 1" \
130-
--health-interval=2s \
131+
--health-interval=5s \
131132
--health-retries=20 \
132133
--health-timeout=2s \
133134
--rm \

.ci/run-repository.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ script_path=$(dirname $(realpath -s $0))
99
source $script_path/functions/imports.sh
1010
set -euo pipefail
1111

12-
PHP_VERSION=${PHP_VERSION-7.4-cli}
12+
PHP_VERSION=${PHP_VERSION-8.0-cli}
1313
ELASTICSEARCH_URL=${ELASTICSEARCH_URL-"$elasticsearch_url"}
1414
elasticsearch_container=${elasticsearch_container-}
1515

.ci/test-matrix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
STACK_VERSION:
3-
- 8.0.0-SNAPSHOT
3+
- 8.0-SNAPSHOT
44

55
PHP_VERSION:
6+
- 8.1-cli
67
- 8.0-cli
78
- 7.4-cli
8-
- 7.3-cli
99

1010
TEST_SUITE:
1111
- free

.gitattributes

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
/util export-ignore
66
/.gitattributes export-ignore
77
/.gitignore export-ignore
8-
/.gitmodules export-ignore
9-
/.php_cs export-ignore
108
/phpstan.neon export-ignore
119
/phpunit-integration-tests.xml export-ignore
1210
/phpunit-yaml-free-tests.xml export-ignore
1311
/phpunit-yaml-platinum-tests.xml export-ignore
1412
/phpunit.xml.dist export-ignore
15-
/ruleset.xml export-ignore

.github/license-header.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
/**
2-
* Elasticsearch PHP client
2+
* Elasticsearch PHP Client
33
*
4-
* @link https://github.com/elastic/elasticsearch-php/
4+
* @link https://github.com/elastic/elasticsearch-php
55
* @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co)
6-
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7-
* @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License, Version 2.1
6+
* @license https://opensource.org/licenses/MIT MIT License
87
*
98
* Licensed to Elasticsearch B.V under one or more agreements.
10-
* Elasticsearch B.V licenses this file to you under the Apache 2.0 License or
11-
* the GNU Lesser General Public License, Version 2.1, at your option.
9+
* Elasticsearch B.V licenses this file to you under the MIT License.
1210
* See the LICENSE file in the project root for more information.
1311
*/

.github/workflows/test.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
php-version: [7.3, 7.4, 8.0]
12+
php-version: [7.4, 8.0, 8.1]
1313
os: [ubuntu-latest]
14-
es-version: [8.0.0-SNAPSHOT]
14+
es-version: [8.0-SNAPSHOT]
1515

1616
steps:
1717
- name: Checkout
@@ -40,19 +40,13 @@ jobs:
4040
run: |
4141
composer install --prefer-dist
4242
43-
- name: PHP Coding Standards
44-
run: |
45-
composer run-script phpcs
46-
4743
- name: PHP Static Analysis Tool
4844
run: |
4945
composer run-script phpstan
5046
5147
- name: Unit tests
5248
run: |
53-
vendor/bin/phpunit -c phpunit.xml.dist
54-
env:
55-
TEST_SUITE: free
49+
composer run-script test
5650
5751
- name: Configure sysctl limits
5852
run: |
@@ -68,7 +62,6 @@ jobs:
6862

6963
- name: Integration tests
7064
run: |
71-
vendor/bin/phpunit -c phpunit-integration-tests.xml
65+
composer run-script integration-test
7266
env:
73-
ELASTICSEARCH_URL: http://localhost:9200
74-
67+
TEST_SUITE: free

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ build
4545
tests/*-junit.xml
4646

4747
# YAML tests
48-
tests/Elasticsearch/Tests/Yaml
48+
tests/Yaml
4949

5050
# Exclude .ci/make.sh artifcats
5151
.ci/output

.php_cs

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

0 commit comments

Comments
 (0)