Skip to content

Commit 14a19ba

Browse files
alexander-schranzpolyfractal
authored andcommitted
fixed php 7.3 compatibility for elasticsearch 5 (#826)
1 parent 13f248e commit 14a19ba

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.travis.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ matrix:
3232
- php: 7.1
3333
env: ES_VERSION="5.5" TEST_BUILD_REF="origin/5.5"
3434

35+
- php: 7.2
36+
env: ES_VERSION="5.0" TEST_BUILD_REF="origin/5.0"
37+
- php: 7.2
38+
env: ES_VERSION="5.5" TEST_BUILD_REF="origin/5.5"
39+
40+
- php: 7.3
41+
env: ES_VERSION="5.0" TEST_BUILD_REF="origin/5.0"
42+
- php: 7.3
43+
env: ES_VERSION="5.5" TEST_BUILD_REF="origin/5.5"
44+
3545
env:
3646
global:
3747
- ES_TEST_HOST=http://localhost:9200
@@ -42,10 +52,10 @@ before_install:
4252
- ./travis/download_and_run_es.sh
4353

4454
install:
45-
- composer install --prefer-source
55+
- composer install --prefer-dist
4656

4757
before_script:
48-
- if [ $TRAVIS_PHP_VERSION = '7.0' ]; then PHPUNIT_FLAGS="--coverage-clover ./build/logs/clover.xml"; fi
58+
- if [ $TRAVIS_PHP_VERSION = '7.3' ]; then PHPUNIT_FLAGS="--coverage-clover ./build/logs/clover.xml"; fi
4959
- php util/RestSpecRunner.php
5060
- php util/EnsureClusterAlive.php
5161

@@ -54,4 +64,4 @@ script:
5464
- vendor/bin/phpunit -c phpunit-integration.xml --group sync $PHPUNIT_FLAGS
5565

5666
after_script:
57-
- if [ $TRAVIS_PHP_VERSION = '7.0' ]; then php vendor/bin/coveralls; fi
67+
- if [ $TRAVIS_PHP_VERSION = '7.3' ]; then php vendor/bin/coveralls; fi

src/Elasticsearch/ClientBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ private function extractURIParts($host)
687687
*/
688688
private function prependMissingScheme($host)
689689
{
690-
if (!filter_var($host, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED)) {
690+
if (!filter_var($host, FILTER_VALIDATE_URL)) {
691691
$host = 'http://' . $host;
692692
}
693693

0 commit comments

Comments
 (0)