diff --git a/CHANGELOG.md b/CHANGELOG.md index 88c8cee5e6..d83107c650 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,18 @@ All notable changes to this project will be documented in this file based on the ## [Unreleased](https://github.com/ruflin/Elastica/compare/5.0.0...master) -- Date math in index names is now escaped in URI -- Added a check for paths that already have date math escaped +### Backward Compatibility Breaks + +### Bugfixes + +### Added + +### Improvements + +### Deprecated + + +## [5.1.0](https://github.com/ruflin/Elastica/compare/5.0.0...5.1.0) ### Backward Compatibility Breaks @@ -24,6 +34,8 @@ All notable changes to this project will be documented in this file based on the - added `\Elastica\Script\ScriptId` to reference stored scripts by ID - added `\Elastica\Query\AbstractGeoShape::RELATION_WITHIN` +- Date math in index names is now escaped in URI +- Added a check for paths that already have date math escaped ### Improvements diff --git a/README.md b/README.md index 4aac4ab015..03e9fbd53f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ All library issues should go to the [issue tracker from github](https://github.c Compatibility ------------- -This release is compatible with all elasticsearch 5.x releases. It was tested with version 5.0.0 +This release is compatible with all elasticsearch 5.x releases. It was tested with version 5.1.2. Contributing @@ -29,4 +29,4 @@ Dependencies ------------ | Project | Version | Required | |---------|---------|----------| -|[Elasticsearch](https://github.com/elasticsearch/elasticsearch/tree/5.0)|5.0|yes| +|[Elasticsearch](https://github.com/elasticsearch/elasticsearch/tree/5.1)|5.1|yes| diff --git a/composer.json b/composer.json index fb86b6fd03..397d83a380 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ }, "extra": { "branch-alias": { - "dev-master": "5.0.x-dev" + "dev-master": "5.1.x-dev" } } } diff --git a/env/elasticsearch/Dockerfile b/env/elasticsearch/Dockerfile index 54cef8b9bc..4949a2501b 100644 --- a/env/elasticsearch/Dockerfile +++ b/env/elasticsearch/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.elastic.co/elasticsearch/elasticsearch:5.0.2 +FROM docker.elastic.co/elasticsearch/elasticsearch:5.1.2 MAINTAINER Nicolas Ruflin RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install mapper-attachments diff --git a/lib/Elastica/Query/AbstractGeoShape.php b/lib/Elastica/Query/AbstractGeoShape.php index 313010743b..b50c17bab5 100644 --- a/lib/Elastica/Query/AbstractGeoShape.php +++ b/lib/Elastica/Query/AbstractGeoShape.php @@ -23,7 +23,7 @@ abstract class AbstractGeoShape extends AbstractQuery const RELATION_CONTAINS = 'contains'; /** - * Elasticsearch path of the geo_shape field + * Elasticsearch path of the geo_shape field. * * @var string */ diff --git a/lib/Elastica/Util.php b/lib/Elastica/Util.php index 04c38c31e0..518116e691 100644 --- a/lib/Elastica/Util.php +++ b/lib/Elastica/Util.php @@ -32,6 +32,7 @@ public static function isDateMathEscaped($requestUri) /** * Escapes date math symbols within request URI. + * * @see https://www.elastic.co/guide/en/elasticsearch/reference/5.x/date-math-index-names.html * * @param string $requestUri diff --git a/test/lib/Elastica/Test/Aggregation/ScriptedMetricTest.php b/test/lib/Elastica/Test/Aggregation/ScriptedMetricTest.php index 5818815067..c2048d3511 100644 --- a/test/lib/Elastica/Test/Aggregation/ScriptedMetricTest.php +++ b/test/lib/Elastica/Test/Aggregation/ScriptedMetricTest.php @@ -37,7 +37,7 @@ public function testScriptedMetricAggregation() $this->_checkScriptInlineSetting(); $agg = new ScriptedMetric( 'scripted', - "params._agg.durations = []", + 'params._agg.durations = []', 'params._agg.durations.add(doc.end.value - doc.start.value)', 'return params._agg.durations' ); diff --git a/test/lib/Elastica/Test/Bulk/Action/AbstractDocumentTest.php b/test/lib/Elastica/Test/Bulk/Action/AbstractDocumentTest.php index fde09e01d5..009ac5ff8c 100644 --- a/test/lib/Elastica/Test/Bulk/Action/AbstractDocumentTest.php +++ b/test/lib/Elastica/Test/Bulk/Action/AbstractDocumentTest.php @@ -1,9 +1,7 @@ assertEquals($expectedArray, $query->toArray()); } - /** * @group functional */ diff --git a/test/lib/Elastica/Test/Query/MatchTest.php b/test/lib/Elastica/Test/Query/MatchTest.php index 305d407acd..d842a32f5a 100644 --- a/test/lib/Elastica/Test/Query/MatchTest.php +++ b/test/lib/Elastica/Test/Query/MatchTest.php @@ -245,7 +245,6 @@ public function testMatchPhrasePrefixType() $this->assertEquals(2, $resultSet->count()); } - /** * @group unit */ diff --git a/test/lib/Elastica/Test/QueryBuilder/DSL/AggregationTest.php b/test/lib/Elastica/Test/QueryBuilder/DSL/AggregationTest.php index d7f190c0f0..3885b5d34c 100644 --- a/test/lib/Elastica/Test/QueryBuilder/DSL/AggregationTest.php +++ b/test/lib/Elastica/Test/QueryBuilder/DSL/AggregationTest.php @@ -2,7 +2,6 @@ namespace Elastica\Test\QueryBuilder\DSL; use Elastica\Query\Exists; -use Elastica\Query\Term; use Elastica\QueryBuilder\DSL; class AggregationTest extends AbstractDSLTest diff --git a/test/lib/Elastica/Test/Transport/GuzzleTest.php b/test/lib/Elastica/Test/Transport/GuzzleTest.php index 2d540dc757..eff76fa4cb 100644 --- a/test/lib/Elastica/Test/Transport/GuzzleTest.php +++ b/test/lib/Elastica/Test/Transport/GuzzleTest.php @@ -3,7 +3,6 @@ use Elastica\Document; use Elastica\Query; -use Elastica\ResultSet; use Elastica\ResultSet\DefaultBuilder; use Elastica\Test\Base as BaseTest; diff --git a/test/lib/Elastica/Test/Transport/HttpTest.php b/test/lib/Elastica/Test/Transport/HttpTest.php index 41e541c77d..490d46fccd 100644 --- a/test/lib/Elastica/Test/Transport/HttpTest.php +++ b/test/lib/Elastica/Test/Transport/HttpTest.php @@ -3,7 +3,6 @@ use Elastica\Document; use Elastica\Query; -use Elastica\ResultSet; use Elastica\ResultSet\DefaultBuilder; use Elastica\Test\Base as BaseTest; diff --git a/test/lib/Elastica/Test/Type/MappingTest.php b/test/lib/Elastica/Test/Type/MappingTest.php index 85030477d4..8a2652c483 100644 --- a/test/lib/Elastica/Test/Type/MappingTest.php +++ b/test/lib/Elastica/Test/Type/MappingTest.php @@ -248,11 +248,11 @@ public function testDynamicTemplate() 'raw' => [ 'type' => 'keyword', 'include_in_all' => false, - ] - ] - ] - ] - ] + ], + ], + ], + ], + ], ], $newMapping, 'Mapping of dynamic "multiname" field should have been created with the type "{dynamic_type}" resolved to "text". '. diff --git a/test/lib/Elastica/Test/UtilTest.php b/test/lib/Elastica/Test/UtilTest.php index cf73d40be8..97996b935d 100644 --- a/test/lib/Elastica/Test/UtilTest.php +++ b/test/lib/Elastica/Test/UtilTest.php @@ -52,7 +52,7 @@ public function getEscapeDateMathPairs() [',log-2011.12.01/log/_refresh', '%3Clog-%7Bnow%2Fd%7D%3E%2Clog-2011.12.01/log/_refresh'], [ ',,/_search', - '%3Clogstash-%7Bnow%2Fd-2d%7D%3E%2C%3Clogstash-%7Bnow%2Fd-1d%7D%3E%2C%3Clogstash-%7Bnow%2Fd%7D%3E/_search' + '%3Clogstash-%7Bnow%2Fd-2d%7D%3E%2C%3Clogstash-%7Bnow%2Fd-1d%7D%3E%2C%3Clogstash-%7Bnow%2Fd%7D%3E/_search', ], [ '', //