Skip to content

Commit e0e81d6

Browse files
committed
Merge from 8.0
2 parents da42727 + 27e46b0 commit e0e81d6

File tree

219 files changed

+20386
-176287
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

+20386
-176287
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: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
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+
<<<<<<< HEAD
1011
# Version 1.6.0
12+
=======
13+
# Version 1.6.1
14+
>>>>>>> elasticsearch-php/8.0
1115
# - Initial version of the run-elasticsearch.sh script
1216
# - Deleting the volume should not dependent on the container still running
1317
# - Fixed `ES_JAVA_OPTS` config
@@ -20,6 +24,10 @@
2024
# - Added ingest.geoip.downloader.enabled=false as it causes false positives in testing
2125
# - Moved ELASTIC_PASSWORD and xpack.security.enabled to the base arguments for "Security On by default"
2226
# - Use https only when TEST_SUITE is "platinum", when "free" use http
27+
<<<<<<< HEAD
28+
=======
29+
# - Set xpack.security.enabled=false for "free" and xpack.security.enabled=true for "platinum"
30+
>>>>>>> elasticsearch-php/8.0
2331

2432
script_path=$(dirname $(realpath -s $0))
2533
source $script_path/functions/imports.sh
@@ -34,7 +42,10 @@ cluster_name=${moniker}${suffix}
3442
declare -a volumes
3543
environment=($(cat <<-END
3644
--env ELASTIC_PASSWORD=$elastic_password
45+
<<<<<<< HEAD
3746
--env xpack.security.enabled=false
47+
=======
48+
>>>>>>> elasticsearch-php/8.0
3849
--env node.name=$es_node_name
3950
--env cluster.name=$cluster_name
4051
--env cluster.initial_master_nodes=$master_node_name
@@ -73,6 +84,10 @@ END
7384
))
7485
else
7586
environment+=($(cat <<-END
87+
<<<<<<< HEAD
88+
=======
89+
--env xpack.security.enabled=false
90+
>>>>>>> elasticsearch-php/8.0
7691
--env xpack.security.http.ssl.enabled=false
7792
END
7893
))
@@ -88,7 +103,7 @@ fi
88103
docker_pull_attempts=0
89104
until [ "$docker_pull_attempts" -ge 5 ]
90105
do
91-
docker pull docker.elastic.co/elasticsearch/"$elasticsearch_container" && break
106+
docker pull -q docker.elastic.co/elasticsearch/"$elasticsearch_container" && break
92107
docker_pull_attempts=$((docker_pull_attempts+1))
93108
echo "Failed to pull image, retrying in 10 seconds (retry $docker_pull_attempts/5)..."
94109
sleep 10
@@ -127,7 +142,7 @@ END
127142
--ulimit memlock=-1:-1 \
128143
--detach="$local_detach" \
129144
--health-cmd="curl $cert_validation_flags --fail $elasticsearch_url/_cluster/health || exit 1" \
130-
--health-interval=2s \
145+
--health-interval=5s \
131146
--health-retries=20 \
132147
--health-timeout=2s \
133148
--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: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
22
STACK_VERSION:
3-
- 8.0.0-SNAPSHOT
3+
- 8.x-SNAPSHOT
44

55
PHP_VERSION:
66
- 8.1-cli
77
- 8.0-cli
88
- 7.4-cli
9-
- 7.3-cli
109

1110
TEST_SUITE:
1211
- 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, 8.1]
12+
php-version: [7.4, 8.0, 8.1]
1313
os: [ubuntu-latest]
14-
es-version: [8.0.0-SNAPSHOT]
14+
es-version: [8.x-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)