Skip to content

Commit

Permalink
Fixed php 7.3 compatibility for elasticsearch 6 (#827)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz authored and polyfractal committed Jan 7, 2019
1 parent 043ad4f commit 77916b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ matrix:
- php: 7.2
env: ES_VERSION="6.0"

- php: 7.3
env: ES_VERSION="6.0"

allow_failures:
- env: ES_VERSION="6.x"

Expand All @@ -43,18 +46,18 @@ before_install:
- ./travis/download_and_run_es.sh

install:
- composer install --prefer-source
- composer install --prefer-dist

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

script:
- composer run-script phpcs
- if [ $TRAVIS_PHP_VERSION != '7.3' ]; then composer run-script phpcs; fi
- composer run-script phpstan
- vendor/bin/phpunit $PHPUNIT_FLAGS
- vendor/bin/phpunit -c phpunit-integration.xml --group sync $PHPUNIT_FLAGS

after_script:
- if [ $TRAVIS_PHP_VERSION = '7.0' ]; then php vendor/bin/coveralls; fi
- if [ $TRAVIS_PHP_VERSION = '7.3' ]; then php vendor/bin/coveralls; fi
2 changes: 1 addition & 1 deletion src/Elasticsearch/ClientBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ private function extractURIParts($host)
*/
private function prependMissingScheme($host)
{
if (!filter_var($host, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED)) {
if (!filter_var($host, FILTER_VALIDATE_URL)) {
$host = 'http://' . $host;
}

Expand Down

0 comments on commit 77916b2

Please sign in to comment.