File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
tests/Elasticsearch/Tests Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ matrix:
25
25
include :
26
26
- php : 7.1
27
27
env : ES_VERSION="5.0" TEST_BUILD_REF="origin/5.0"
28
+ - php : 7.1
29
+ env : ES_VERSION="5.1" TEST_BUILD_REF="origin/5.1"
30
+ - php : 7.1
31
+ env : ES_VERSION="5.2" TEST_BUILD_REF="origin/5.2"
28
32
allow_failures :
29
33
- php : hhvm
30
34
36
40
- JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre"
37
41
38
42
before_install :
39
- - if [ $TRAVIS_PHP_VERSION = '5.6' ]; then pecl uninstall json && pecl install json-1.3.7; fi
40
43
- sudo update-java-alternatives -s java-8-oracle
41
44
- ./travis/download_and_run_es.sh
42
45
Original file line number Diff line number Diff line change @@ -103,7 +103,11 @@ public static function setUpBeforeClass()
103
103
public function setUp ()
104
104
{
105
105
$ this ->clean ();
106
- $ this ->client = Elasticsearch \ClientBuilder::create ()->setHosts ([self ::getHost ()])->build ();
106
+ $ builder = Elasticsearch \ClientBuilder::create ()->setHosts ([self ::getHost ()]);
107
+ if (version_compare (phpversion (), '5.6.6 ' , '< ' ) || ! defined ('JSON_PRESERVE_ZERO_FRACTION ' )) {
108
+ $ builder ->allowBadJSONSerialization ();
109
+ }
110
+ $ this ->client = $ builder ->build ();
107
111
}
108
112
109
113
/**
You can’t perform that action at this time.
0 commit comments