From 4bfcf784fa906f3ce7a9d86431da6b9cb3f72ac2 Mon Sep 17 00:00:00 2001 From: Ruflin Date: Sat, 17 Oct 2015 16:17:10 -0700 Subject: [PATCH 1/5] Update dependency to elasticsearch 1.7.3 --- env/elasticsearch/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/elasticsearch/Dockerfile b/env/elasticsearch/Dockerfile index 3b14557b3e..9104a0e67f 100644 --- a/env/elasticsearch/Dockerfile +++ b/env/elasticsearch/Dockerfile @@ -1,4 +1,4 @@ -FROM elasticsearch:1.7.2 +FROM elasticsearch:1.7.3 MAINTAINER Nicolas Ruflin # Dependencies From ba9c55c0b1161a151a173f81d9bb27de0a6c6738 Mon Sep 17 00:00:00 2001 From: Ruflin Date: Sat, 17 Oct 2015 16:22:45 -0700 Subject: [PATCH 2/5] Update CHANGELOG.md with most recent changes --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61ab1d83d7..dc7ad37a05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,13 +3,20 @@ All notable changes to this project will be documented in this file based on the ## [Unreleased](https://github.com/ruflin/Elastica/compare/2.3.0...HEAD) - Filters aggregation: empty name is named bucket #935 +- Update elasticsearch dependency to elasticsearch 1.7.3 #957 + ### Backward Compatibility Breaks ### Bugfixes - Filters aggregation: empty name is named bucket #935 +- Prevent mix keys in filters (#936) #939 +- Fix empty string is not anonymous filter #935 ### Added +- Support for field_value_factor #953 +- Added setMinDocCount and setExtendedBounds options #947 +- Avoid environment dependecies in tests #938 ### Improvements From 7cb7498c931ee39facac7d741e4979bf643e9190 Mon Sep 17 00:00:00 2001 From: Ruflin Date: Sat, 17 Oct 2015 16:27:01 -0700 Subject: [PATCH 3/5] Remove - in front of phpunit line to make sure tests are marked as fail when they fail. consequence is that the next command will not be run in the first tests failed. --- Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index b00e91149c..648f97f1fc 100644 --- a/Makefile +++ b/Makefile @@ -45,17 +45,17 @@ dependencies: ${SOURCE} .PHONY: phpunit phpunit: - -phpunit -c test/ --coverage-clover build/coverage/unit-coverage.xml --group unit - -phpunit -c test/ --coverage-clover build/coverage/functional-coverage.xml --group functional - -phpunit -c test/ --coverage-clover build/coverage/shutdown-coverage.xml --group shutdown - + phpunit -c test/ --coverage-clover build/coverage/unit-coverage.xml --group unit + phpunit -c test/ --coverage-clover build/coverage/functional-coverage.xml --group functional + phpunit -c test/ --coverage-clover build/coverage/shutdown-coverage.xml --group shutdown + .PHONY: tests tests: # Rebuild image to copy changes files to the image make elastica-image make setup docker-compose run elastica make phpunit - + # Makes it easy to run a single test file. Example to run IndexTest.php: make test TEST="IndexTest.php" .PHONY: test test: @@ -73,7 +73,7 @@ lint: ${RUN_ENV} php-cs-fixer fix .PHONY: loc -loc: +loc: ${RUN_ENV} cloc --by-file --xml --exclude-dir=build -out=build/cloc.xml . .PHONY: phploc @@ -115,7 +115,7 @@ destroy-environment: remove-containers: -docker stop $(shell docker ps -a -q) -docker rm -v $(shell docker ps -a -q) - + # Starts a shell inside the elastica image .PHONY: shell shell: @@ -172,4 +172,4 @@ push-images: build-images # google-setup: # docker-machine create --driver google --google-project elastica-1024 --google-machine-type n1-standard-8 elastica -# eval "$(docker-machine env elastica)" \ No newline at end of file +# eval "$(docker-machine env elastica)" From 304ea01b6b79888f7194c35d05f292e8e024b4ed Mon Sep 17 00:00:00 2001 From: Ruflin Date: Sat, 17 Oct 2015 16:58:23 -0700 Subject: [PATCH 4/5] Fix issue in SuggestTest for PHP7 --- test/lib/Elastica/Test/SuggestTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/lib/Elastica/Test/SuggestTest.php b/test/lib/Elastica/Test/SuggestTest.php index bc7e660ec6..a5943ede76 100644 --- a/test/lib/Elastica/Test/SuggestTest.php +++ b/test/lib/Elastica/Test/SuggestTest.php @@ -2,7 +2,7 @@ namespace Elastica\Test; use Elastica\Exception\NotImplementedException; -use Elastica\Filter\Bool; +use Elastica\Filter\BoolFilter; use Elastica\Suggest; use Elastica\Test\Base as BaseTest; @@ -44,7 +44,7 @@ public function testCreateWithSuggest() public function testCreateWithNonSuggest() { try { - Suggest::create(new Bool()); + Suggest::create(new BoolFilter()); $this->fail(); } catch (NotImplementedException $e) { } From 5b970e04c7340dd2e9ba18c120f84cb156099417 Mon Sep 17 00:00:00 2001 From: Ruflin Date: Sat, 17 Oct 2015 17:15:59 -0700 Subject: [PATCH 5/5] Fix php 5.3 incompatibility --- test/lib/Elastica/Test/Base.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/lib/Elastica/Test/Base.php b/test/lib/Elastica/Test/Base.php index 0035ce4afc..9f42a8f2f0 100644 --- a/test/lib/Elastica/Test/Base.php +++ b/test/lib/Elastica/Test/Base.php @@ -91,7 +91,8 @@ protected function _checkPlugin($plugin) protected function _checkVersion($version) { - $installedVersion = $this->_getClient()->request('/')->getData()['version']['number']; + $data = $this->_getClient()->request('/')->getData(); + $installedVersion = $data['version']['number']; if (version_compare($installedVersion, $version) < 0) { $this->markTestSkipped('Test require '.$version.'+ version of Elasticsearch');