diff --git a/CHANGELOG.md b/CHANGELOG.md index b58ca7a6a..babfa04ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,10 +25,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed * Add support for Search Option "seq_no_primary_term" and Index Options "if_primary_term" and "if_seq_no" [#2234](https://github.com/ruflin/Elastica/pull/2234) -### Deprecated - -### Removed - ### Fixed * Fixed Pipeline Processor handling to allow for multiple processors of the same type [#2218](https://github.com/ruflin/Elastica/pull/2218) @@ -40,49 +36,49 @@ Have a look at the [Upgrade guide](https://github.com/ruflin/Elastica/blob/8.x/U ### Backward Compatibility Breaks * Dropped support for PHP <8.0 [#2131](https://github.com/ruflin/Elastica/pull/2131) * Removed deprecated classes in 7.x [#2132](https://github.com/ruflin/Elastica/pull/2132) - * `Elastica\Exception\ElasticsearchException` -> use `Elastica\Exception\ResponseException::getResponse()::getFullError()` instead - * `Elastica\Exception\ResponseException::getElasticsearchException()` -> use `Elastica\Exception\ResponseException::getResponse()::getFullError()` instead - * `Elastica\Processor\Append` -> use `Elastica\Processor\AppendProcessor` instead - * `Elastica\Processor\Attachment` -> use `Elastica\Processor\AttachmentProcessor` instead - * `Elastica\Processor\Convert` -> use `Elastica\Processor\ConvertProcessor` instead - * `Elastica\Processor\Date` -> use `Elastica\Processor\DateProcessor` instead - * `Elastica\Processor\DateIndexName` -> use `Elastica\Processor\DateIndexNameProcessor` instead - * `Elastica\Processor\DotExpander` -> use `Elastica\Processor\DotExpanderProcessor` instead - * `Elastica\Processor\Fail` -> use `Elastica\Processor\FailProcessor` instead - * `Elastica\Processor\Join` -> use `Elastica\Processor\JoinProcessor` instead - * `Elastica\Processor\Json` -> use `Elastica\Processor\JsonProcessor` instead - * `Elastica\Processor\Kv` -> use `Elastica\Processor\KvProcessor` instead - * `Elastica\Processor\Lowercase` -> use `Elastica\Processor\LowercaseProcessor` instead - * `Elastica\Processor\Remove` -> use `Elastica\Processor\RemoveProcessor` instead - * `Elastica\Processor\Rename` -> use `Elastica\Processor\RenameProcessor` instead - * `Elastica\Processor\Set` -> use `Elastica\Processor\SetProcessor` instead - * `Elastica\Processor\Sort` -> use `Elastica\Processor\SortProcessor` instead - * `Elastica\Processor\Split` -> use `Elastica\Processor\SplitProcessor` instead - * `Elastica\Processor\Trim` -> use `Elastica\Processor\AppendProcessor` instead - * `Elastica\Processor\Uppercase` -> use `Elastica\Processor\UppercaseProcessor` instead - * `Elastica\Query\Common` -> use `Elastica\Query\MatchQuery` instead - * `Elastica\QueryBuilder\DSL\Query::common_terms()` -> use `Elastica\QueryBuilder\DSL\Query::match()` instead - * `Elastica\Transport\HttpAdapter` -> use `Elastica\Transport\Http` instead + * `Elastica\Exception\ElasticsearchException` -> use `Elastica\Exception\ResponseException::getResponse()::getFullError()` instead + * `Elastica\Exception\ResponseException::getElasticsearchException()` -> use `Elastica\Exception\ResponseException::getResponse()::getFullError()` instead + * `Elastica\Processor\Append` -> use `Elastica\Processor\AppendProcessor` instead + * `Elastica\Processor\Attachment` -> use `Elastica\Processor\AttachmentProcessor` instead + * `Elastica\Processor\Convert` -> use `Elastica\Processor\ConvertProcessor` instead + * `Elastica\Processor\Date` -> use `Elastica\Processor\DateProcessor` instead + * `Elastica\Processor\DateIndexName` -> use `Elastica\Processor\DateIndexNameProcessor` instead + * `Elastica\Processor\DotExpander` -> use `Elastica\Processor\DotExpanderProcessor` instead + * `Elastica\Processor\Fail` -> use `Elastica\Processor\FailProcessor` instead + * `Elastica\Processor\Join` -> use `Elastica\Processor\JoinProcessor` instead + * `Elastica\Processor\Json` -> use `Elastica\Processor\JsonProcessor` instead + * `Elastica\Processor\Kv` -> use `Elastica\Processor\KvProcessor` instead + * `Elastica\Processor\Lowercase` -> use `Elastica\Processor\LowercaseProcessor` instead + * `Elastica\Processor\Remove` -> use `Elastica\Processor\RemoveProcessor` instead + * `Elastica\Processor\Rename` -> use `Elastica\Processor\RenameProcessor` instead + * `Elastica\Processor\Set` -> use `Elastica\Processor\SetProcessor` instead + * `Elastica\Processor\Sort` -> use `Elastica\Processor\SortProcessor` instead + * `Elastica\Processor\Split` -> use `Elastica\Processor\SplitProcessor` instead + * `Elastica\Processor\Trim` -> use `Elastica\Processor\AppendProcessor` instead + * `Elastica\Processor\Uppercase` -> use `Elastica\Processor\UppercaseProcessor` instead + * `Elastica\Query\Common` -> use `Elastica\Query\MatchQuery` instead + * `Elastica\QueryBuilder\DSL\Query::common_terms()` -> use `Elastica\QueryBuilder\DSL\Query::match()` instead + * `Elastica\Transport\HttpAdapter` -> use `Elastica\Transport\Http` instead * Removed deprecated methods [#2135](https://github.com/ruflin/Elastica/pull/2135) - * `Elastica\Aggregation\Range::setKeyedResponse()` -> use `Elastica\Aggregation\Range::setKeyed()` instead - * `Elastica\Bulk::toString()` -> use `Elastica\Bulk::__toString()` or cast to string instead - * `Elastica\Query\MatchQuery::setFieldCutoffFrequency()` - * `Elastica\Query\MultiMatch::setCutoffFrequency()` - * `Elastica\QueryBuilder\DSL\Aggregation::global_agg()` -> use `Elastica\QueryBuilder\DSL\Aggregation::global()` instead - * `Elastica\Request::toString()` -> use `Elastica\Request::__toString()` or cast to string instead - * `Elastica\Result::getType()` - * `Elastica\Suggest\Phrase::addCandidateGenerator()` -> use `Elastica\Suggest\Phrase::addDirectGenerator()` instead - * `Elastica\Util::getParamName()` + * `Elastica\Aggregation\Range::setKeyedResponse()` -> use `Elastica\Aggregation\Range::setKeyed()` instead + * `Elastica\Bulk::toString()` -> use `Elastica\Bulk::__toString()` or cast to string instead + * `Elastica\Query\MatchQuery::setFieldCutoffFrequency()` + * `Elastica\Query\MultiMatch::setCutoffFrequency()` + * `Elastica\QueryBuilder\DSL\Aggregation::global_agg()` -> use `Elastica\QueryBuilder\DSL\Aggregation::global()` instead + * `Elastica\Request::toString()` -> use `Elastica\Request::__toString()` or cast to string instead + * `Elastica\Result::getType()` + * `Elastica\Suggest\Phrase::addCandidateGenerator()` -> use `Elastica\Suggest\Phrase::addDirectGenerator()` instead + * `Elastica\Util::getParamName()` * Changed following aggregation constructors [#2138](https://github.com/ruflin/Elastica/pull/2138) - * `Elastica\Aggregation\AvgBucket`: The second argument `$bucketsPath` is now mandatory - * `Elastica\Aggregation\BucketScript`: The second (`array $bucketsPath`) and the third (`string $script`) argument are now mandatory - * `Elastica\Aggregation\BucketSelector`: The second (`array $bucketsPath`) and the third (`string $script`) argument are now mandatory - * `Elastica\Aggregation\Derivative`: The second argument (`string $bucketsPath`) is now mandatory - * `Elastica\Aggregation\NormalizeAggregation`: The second (`string $bucketsPath`) and the third (`string $method`) argument are now mandatory - * `Elastica\Aggregation\PercentilesBucket`: The second argument (`string $bucketsPath`) is now mandatory - * `Elastica\Aggregation\SerialDiff`: The second argument (`string $bucketsPath`) is now mandatory - * `Elastica\Aggregation\StatsBucket`: The second argument (`string $bucketsPath`) is now mandatory - * `Elastica\Aggregation\SumBucket`: The second argument (`string $bucketsPath`) is now mandatory + * `Elastica\Aggregation\AvgBucket`: The second argument `$bucketsPath` is now mandatory + * `Elastica\Aggregation\BucketScript`: The second (`array $bucketsPath`) and the third (`string $script`) argument are now mandatory + * `Elastica\Aggregation\BucketSelector`: The second (`array $bucketsPath`) and the third (`string $script`) argument are now mandatory + * `Elastica\Aggregation\Derivative`: The second argument (`string $bucketsPath`) is now mandatory + * `Elastica\Aggregation\NormalizeAggregation`: The second (`string $bucketsPath`) and the third (`string $method`) argument are now mandatory + * `Elastica\Aggregation\PercentilesBucket`: The second argument (`string $bucketsPath`) is now mandatory + * `Elastica\Aggregation\SerialDiff`: The second argument (`string $bucketsPath`) is now mandatory + * `Elastica\Aggregation\StatsBucket`: The second argument (`string $bucketsPath`) is now mandatory + * `Elastica\Aggregation\SumBucket`: The second argument (`string $bucketsPath`) is now mandatory * Changed return type of `Elastica\Cluster\Health::getActiveShardsPercentAsNumber()` method to `float` [#2144](https://github.com/ruflin/Elastica/pull/2144) * Changed `$origin` and `$scale` parameter types of `Elastica\Query\FunctionScore::addDecayFunction()` to allow `float|int|string` [#2144](https://github.com/ruflin/Elastica/pull/2144) * Changed `$key` parameter type of `Elastica\Multi\Search::addSearch()` to allow `int|string|null` [#2144](https://github.com/ruflin/Elastica/pull/2144) @@ -90,21 +86,21 @@ Have a look at the [Upgrade guide](https://github.com/ruflin/Elastica/blob/8.x/U * Changed `Elastica\Reindex::setWaitForCompletion()` to only allow `bool` [#2151](https://github.com/ruflin/Elastica/pull/2151) * Changed `Elastica\Search::addIndex()`, `Elasica\Search::addIndices()` and `Elastica\Search::hasIndex()` parameter type to only allow `Elastica\Index` [#2150](https://github.com/ruflin/Elastica/pull/2150) * Changed `$options` argument to not accept `int` in the following methods [#2148](https://github.com/ruflin/Elastica/pull/2148) - * `Elastica\SearchableInterface::search()` - * `Elastica\SearchableInterface::createSearch()` - * `Elastica\Search::search()` - * `Elastica\Search::createSearch()` - * `Elastica\Search::setOptionsAndQuery()` - * `Elastica\Index::search()` - * `Elastica\Index::createSearch()` + * `Elastica\SearchableInterface::search()` + * `Elastica\SearchableInterface::createSearch()` + * `Elastica\Search::search()` + * `Elastica\Search::createSearch()` + * `Elastica\Search::setOptionsAndQuery()` + * `Elastica\Index::search()` + * `Elastica\Index::createSearch()` * Removed classes [#2188](https://github.com/ruflin/Elastica/pull/2188) - * `Elastica\Connection` - * `Elastica\Connection\ConnectionPool` - * `Elastica\Connection\Strategy\CallbackStrategy` - * `Elastica\Connection\Strategy\RoundRobin` - * `Elastica\Connection\Strategy\Simple` - * `Elastica\Connection\Strategy\StrategyFactory` - * `Elastica\Connection\Strategy\StrategyInterface` + * `Elastica\Connection` + * `Elastica\Connection\ConnectionPool` + * `Elastica\Connection\Strategy\CallbackStrategy` + * `Elastica\Connection\Strategy\RoundRobin` + * `Elastica\Connection\Strategy\Simple` + * `Elastica\Connection\Strategy\StrategyFactory` + * `Elastica\Connection\Strategy\StrategyInterface` * Removed `Elastica\Client::setLogger()` method [#2148](https://github.com/ruflin/Elastica/pull/2148) * Enabled `strict_types` on all classes [#2190](https://github.com/ruflin/Elastica/pull/2190) * Changed `Elastica\Scroll:clear` to use `scroll_id` body parameter instead of url parameter [#2211](https://github.com/ruflin/Elastica/pull/2211) @@ -134,49 +130,49 @@ Have a look at the [Upgrade guide](https://github.com/ruflin/Elastica/blob/8.x/U ### Backward Compatibility Breaks * Dropped support for PHP <8.0 [#2131](https://github.com/ruflin/Elastica/pull/2131) * Removed deprecated classes in 7.x [#2132](https://github.com/ruflin/Elastica/pull/2132) - * `Elastica\Exception\ElasticsearchException` -> use `Elastica\Exception\ResponseException::getResponse()::getFullError()` instead - * `Elastica\Exception\ResponseException::getElasticsearchException()` -> use `Elastica\Exception\ResponseException::getResponse()::getFullError()` instead - * `Elastica\Processor\Append` -> use `Elastica\Processor\AppendProcessor` instead - * `Elastica\Processor\Attachment` -> use `Elastica\Processor\AttachmentProcessor` instead - * `Elastica\Processor\Convert` -> use `Elastica\Processor\ConvertProcessor` instead - * `Elastica\Processor\Date` -> use `Elastica\Processor\DateProcessor` instead - * `Elastica\Processor\DateIndexName` -> use `Elastica\Processor\DateIndexNameProcessor` instead - * `Elastica\Processor\DotExpander` -> use `Elastica\Processor\DotExpanderProcessor` instead - * `Elastica\Processor\Fail` -> use `Elastica\Processor\FailProcessor` instead - * `Elastica\Processor\Join` -> use `Elastica\Processor\JoinProcessor` instead - * `Elastica\Processor\Json` -> use `Elastica\Processor\JsonProcessor` instead - * `Elastica\Processor\Kv` -> use `Elastica\Processor\KvProcessor` instead - * `Elastica\Processor\Lowercase` -> use `Elastica\Processor\LowercaseProcessor` instead - * `Elastica\Processor\Remove` -> use `Elastica\Processor\RemoveProcessor` instead - * `Elastica\Processor\Rename` -> use `Elastica\Processor\RenameProcessor` instead - * `Elastica\Processor\Set` -> use `Elastica\Processor\SetProcessor` instead - * `Elastica\Processor\Sort` -> use `Elastica\Processor\SortProcessor` instead - * `Elastica\Processor\Split` -> use `Elastica\Processor\SplitProcessor` instead - * `Elastica\Processor\Trim` -> use `Elastica\Processor\AppendProcessor` instead - * `Elastica\Processor\Uppercase` -> use `Elastica\Processor\UppercaseProcessor` instead - * `Elastica\Query\Common` -> use `Elastica\Query\MatchQuery` instead - * `Elastica\QueryBuilder\DSL\Query::common_terms()` -> use `Elastica\QueryBuilder\DSL\Query::match()` instead - * `Elastica\Transport\HttpAdapter` -> use `Elastica\Transport\Http` instead + * `Elastica\Exception\ElasticsearchException` -> use `Elastica\Exception\ResponseException::getResponse()::getFullError()` instead + * `Elastica\Exception\ResponseException::getElasticsearchException()` -> use `Elastica\Exception\ResponseException::getResponse()::getFullError()` instead + * `Elastica\Processor\Append` -> use `Elastica\Processor\AppendProcessor` instead + * `Elastica\Processor\Attachment` -> use `Elastica\Processor\AttachmentProcessor` instead + * `Elastica\Processor\Convert` -> use `Elastica\Processor\ConvertProcessor` instead + * `Elastica\Processor\Date` -> use `Elastica\Processor\DateProcessor` instead + * `Elastica\Processor\DateIndexName` -> use `Elastica\Processor\DateIndexNameProcessor` instead + * `Elastica\Processor\DotExpander` -> use `Elastica\Processor\DotExpanderProcessor` instead + * `Elastica\Processor\Fail` -> use `Elastica\Processor\FailProcessor` instead + * `Elastica\Processor\Join` -> use `Elastica\Processor\JoinProcessor` instead + * `Elastica\Processor\Json` -> use `Elastica\Processor\JsonProcessor` instead + * `Elastica\Processor\Kv` -> use `Elastica\Processor\KvProcessor` instead + * `Elastica\Processor\Lowercase` -> use `Elastica\Processor\LowercaseProcessor` instead + * `Elastica\Processor\Remove` -> use `Elastica\Processor\RemoveProcessor` instead + * `Elastica\Processor\Rename` -> use `Elastica\Processor\RenameProcessor` instead + * `Elastica\Processor\Set` -> use `Elastica\Processor\SetProcessor` instead + * `Elastica\Processor\Sort` -> use `Elastica\Processor\SortProcessor` instead + * `Elastica\Processor\Split` -> use `Elastica\Processor\SplitProcessor` instead + * `Elastica\Processor\Trim` -> use `Elastica\Processor\AppendProcessor` instead + * `Elastica\Processor\Uppercase` -> use `Elastica\Processor\UppercaseProcessor` instead + * `Elastica\Query\Common` -> use `Elastica\Query\MatchQuery` instead + * `Elastica\QueryBuilder\DSL\Query::common_terms()` -> use `Elastica\QueryBuilder\DSL\Query::match()` instead + * `Elastica\Transport\HttpAdapter` -> use `Elastica\Transport\Http` instead * Removed deprecated methods [#2135](https://github.com/ruflin/Elastica/pull/2135) - * `Elastica\Aggregation\Range::setKeyedResponse()` -> use `Elastica\Aggregation\Range::setKeyed()` instead - * `Elastica\Bulk::toString()` -> use `Elastica\Bulk::__toString()` or cast to string instead - * `Elastica\Query\MatchQuery::setFieldCutoffFrequency()` - * `Elastica\Query\MultiMatch::setCutoffFrequency()` - * `Elastica\QueryBuilder\DSL\Aggregation::global_agg()` -> use `Elastica\QueryBuilder\DSL\Aggregation::global()` instead - * `Elastica\Request::toString()` -> use `Elastica\Request::__toString()` or cast to string instead - * `Elastica\Result::getType()` - * `Elastica\Suggest\Phrase::addCandidateGenerator()` -> use `Elastica\Suggest\Phrase::addDirectGenerator()` instead - * `Elastica\Util::getParamName()` + * `Elastica\Aggregation\Range::setKeyedResponse()` -> use `Elastica\Aggregation\Range::setKeyed()` instead + * `Elastica\Bulk::toString()` -> use `Elastica\Bulk::__toString()` or cast to string instead + * `Elastica\Query\MatchQuery::setFieldCutoffFrequency()` + * `Elastica\Query\MultiMatch::setCutoffFrequency()` + * `Elastica\QueryBuilder\DSL\Aggregation::global_agg()` -> use `Elastica\QueryBuilder\DSL\Aggregation::global()` instead + * `Elastica\Request::toString()` -> use `Elastica\Request::__toString()` or cast to string instead + * `Elastica\Result::getType()` + * `Elastica\Suggest\Phrase::addCandidateGenerator()` -> use `Elastica\Suggest\Phrase::addDirectGenerator()` instead + * `Elastica\Util::getParamName()` * Changed following aggregation constructors [#2138](https://github.com/ruflin/Elastica/pull/2138) - * `Elastica\Aggregation\AvgBucket`: The second argument `$bucketsPath` is now mandatory - * `Elastica\Aggregation\BucketScript`: The second (`array $bucketsPath`) and the third (`string $script`) argument are now mandatory - * `Elastica\Aggregation\BucketSelector`: The second (`array $bucketsPath`) and the third (`string $script`) argument are now mandatory - * `Elastica\Aggregation\Derivative`: The second argument (`string $bucketsPath`) is now mandatory - * `Elastica\Aggregation\NormalizeAggregation`: The second (`string $bucketsPath`) and the third (`string $method`) argument are now mandatory - * `Elastica\Aggregation\PercentilesBucket`: The second argument (`string $bucketsPath`) is now mandatory - * `Elastica\Aggregation\SerialDiff`: The second argument (`string $bucketsPath`) is now mandatory - * `Elastica\Aggregation\StatsBucket`: The second argument (`string $bucketsPath`) is now mandatory - * `Elastica\Aggregation\SumBucket`: The second argument (`string $bucketsPath`) is now mandatory + * `Elastica\Aggregation\AvgBucket`: The second argument `$bucketsPath` is now mandatory + * `Elastica\Aggregation\BucketScript`: The second (`array $bucketsPath`) and the third (`string $script`) argument are now mandatory + * `Elastica\Aggregation\BucketSelector`: The second (`array $bucketsPath`) and the third (`string $script`) argument are now mandatory + * `Elastica\Aggregation\Derivative`: The second argument (`string $bucketsPath`) is now mandatory + * `Elastica\Aggregation\NormalizeAggregation`: The second (`string $bucketsPath`) and the third (`string $method`) argument are now mandatory + * `Elastica\Aggregation\PercentilesBucket`: The second argument (`string $bucketsPath`) is now mandatory + * `Elastica\Aggregation\SerialDiff`: The second argument (`string $bucketsPath`) is now mandatory + * `Elastica\Aggregation\StatsBucket`: The second argument (`string $bucketsPath`) is now mandatory + * `Elastica\Aggregation\SumBucket`: The second argument (`string $bucketsPath`) is now mandatory * Changed return type of `Elastica\Cluster\Health::getActiveShardsPercentAsNumber()` method to `float` [#2144](https://github.com/ruflin/Elastica/pull/2144) * Changed `$origin` and `$scale` parameter types of `Elastica\Query\FunctionScore::addDecayFunction()` to allow `float|int|string` [#2144](https://github.com/ruflin/Elastica/pull/2144) * Changed `$key` parameter type of `Elastica\Multi\Search::addSearch()` to allow `int|string|null` [#2144](https://github.com/ruflin/Elastica/pull/2144) @@ -184,21 +180,21 @@ Have a look at the [Upgrade guide](https://github.com/ruflin/Elastica/blob/8.x/U * Changed `Elastica\Reindex::setWaitForCompletion()` to only allow `bool` [#2151](https://github.com/ruflin/Elastica/pull/2151) * Changed `Elastica\Search::addIndex()`, `Elasica\Search::addIndices()` and `Elastica\Search::hasIndex()` parameter type to only allow `Elastica\Index` [#2150](https://github.com/ruflin/Elastica/pull/2150) * Changed `$options` argument to not accept `int` in the following methods [#2148](https://github.com/ruflin/Elastica/pull/2148) - * `Elastica\SearchableInterface::search()` - * `Elastica\SearchableInterface::createSearch()` - * `Elastica\Search::search()` - * `Elastica\Search::createSearch()` - * `Elastica\Search::setOptionsAndQuery()` - * `Elastica\Index::search()` - * `Elastica\Index::createSearch()` + * `Elastica\SearchableInterface::search()` + * `Elastica\SearchableInterface::createSearch()` + * `Elastica\Search::search()` + * `Elastica\Search::createSearch()` + * `Elastica\Search::setOptionsAndQuery()` + * `Elastica\Index::search()` + * `Elastica\Index::createSearch()` * Removed classes [#2188](https://github.com/ruflin/Elastica/pull/2188) - * `Elastica\Connection` - * `Elastica\Connection\ConnectionPool` - * `Elastica\Connection\Strategy\CallbackStrategy` - * `Elastica\Connection\Strategy\RoundRobin` - * `Elastica\Connection\Strategy\Simple` - * `Elastica\Connection\Strategy\StrategyFactory` - * `Elastica\Connection\Strategy\StrategyInterface` + * `Elastica\Connection` + * `Elastica\Connection\ConnectionPool` + * `Elastica\Connection\Strategy\CallbackStrategy` + * `Elastica\Connection\Strategy\RoundRobin` + * `Elastica\Connection\Strategy\Simple` + * `Elastica\Connection\Strategy\StrategyFactory` + * `Elastica\Connection\Strategy\StrategyInterface` * Removed `Elastica\Client::setLogger()` method [#2148](https://github.com/ruflin/Elastica/pull/2148) * Enabled `strict_types` on all classes [#2190](https://github.com/ruflin/Elastica/pull/2190) * Changed `Elastica\Scroll:clear` to use `scroll_id` body parameter instead of url parameter [#2211](https://github.com/ruflin/Elastica/pull/2211) @@ -483,7 +479,7 @@ Have a look at the [Upgrade guide](https://github.com/ruflin/Elastica/blob/8.x/U * Require guzzle >= v6.3 as development library: fixes issues on PHP >= 7.2 * Require phpunit >= v7.5, fixes deprecations in with PHP 7.3 * Scroll is now throwing an exception when calling `current()` on an invalid iteration: always call `valid()` before - accessing the current item, as documented in PHP's Iterator documentation [#1749](https://github.com/ruflin/Elastica/pull/1749) + accessing the current item, as documented in PHP's Iterator documentation [#1749](https://github.com/ruflin/Elastica/pull/1749) ### Removed * Removed unsupported `flags` from `AbstractTermsAggregation::setInclude()` [#1766](https://github.com/ruflin/Elastica/pull/1766) @@ -621,9 +617,9 @@ Have a look at the [Upgrade guide](https://github.com/ruflin/Elastica/blob/8.x/U ### Backward Compatibility Breaks * Made result sets adhere to `\Iterator` interface definition that they implement. Specifically, you need to call `valid()` on the result set before calling `current()`. When using `foreach` this is done by PHP automatically. When `valid` returns false, the return value of `current` is undefined instead of false. [#1506](https://github.com/ruflin/Elastica/pull/1506) - * `\Elastica\ResultSet::next` returns `void` instead of `\Elastica\Result|false` - * `\Elastica\Bulk\ResponseSet::current` returns `\Elastica\Bulk\Response` instead of `\Elastica\Bulk\Response|false` - * `\Elastica\Multi\ResultSet::current` returns `\Elastica\ResultSet` instead of `\Elastica\ResultSet|false` + * `\Elastica\ResultSet::next` returns `void` instead of `\Elastica\Result|false` + * `\Elastica\Bulk\ResponseSet::current` returns `\Elastica\Bulk\Response` instead of `\Elastica\Bulk\Response|false` + * `\Elastica\Multi\ResultSet::current` returns `\Elastica\ResultSet` instead of `\Elastica\ResultSet|false` ### Added @@ -761,10 +757,10 @@ Have a look at the [Upgrade guide](https://github.com/ruflin/Elastica/blob/8.x/U - Send the `scroll_id` inside a json body instead of plain text [#1325](https://github.com/ruflin/Elastica/pull/1325) ### Added - - Added getNumberOfReplicas() for index settings [PR#1324](https://github.com/ruflin/Elastica/pull/1324) - - Added getNumberOfShards() for index settings [PR#1321](https://github.com/ruflin/Elastica/pull/1331) - - Added `\Elastica\Query\Span*` for proximity searches [#304](https://github.com/ruflin/Elastica/issues/304) - - Added avg_bucket() and sum_bucket() in aggregations [PR#1443](https://github.com/ruflin/Elastica/pull/1443) - (https://github.com/ruflin/Elastica/issues/1279) +- Added getNumberOfReplicas() for index settings [PR#1324](https://github.com/ruflin/Elastica/pull/1324) +- Added getNumberOfShards() for index settings [PR#1321](https://github.com/ruflin/Elastica/pull/1331) +- Added `\Elastica\Query\Span*` for proximity searches [#304](https://github.com/ruflin/Elastica/issues/304) +- Added avg_bucket() and sum_bucket() in aggregations [PR#1443](https://github.com/ruflin/Elastica/pull/1443) - (https://github.com/ruflin/Elastica/issues/1279) ## [5.2.1](https://github.com/ruflin/Elastica/compare/5.2.0...5.2.1) @@ -778,19 +774,19 @@ Have a look at the [Upgrade guide](https://github.com/ruflin/Elastica/blob/8.x/U ### Added - - Parameter `filter_path` for response filtering (e.g. `$index->search($query, ['filter_path' => 'hits.hits._source'])`) - - Add support for Health parameters for Cluster\Health endpoint (new prop : delayed_unassigned_shards, number_of_pending_tasks, number_of_in_flight_fetch, task_max_waiting_in_queue_millis, active_shards_percent_as_number) - - Add support for querystring in Type. this allow to use `update_all_types` in type mapping in order to resolve conflicts between fields in different types. [Conflicts between fields in different types](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html#merging-conflicts) - - Added `\Elastica\Query\ParentId` to avoid join with parent documents [#1287](https://github.com/ruflin/Elastica/issues/1287) - - Added `\Elastica\Reindex` for reindexing between indices [#1311](https://github.com/ruflin/Elastica/issues/1311) +- Parameter `filter_path` for response filtering (e.g. `$index->search($query, ['filter_path' => 'hits.hits._source'])`) +- Add support for Health parameters for Cluster\Health endpoint (new prop : delayed_unassigned_shards, number_of_pending_tasks, number_of_in_flight_fetch, task_max_waiting_in_queue_millis, active_shards_percent_as_number) +- Add support for querystring in Type. this allow to use `update_all_types` in type mapping in order to resolve conflicts between fields in different types. [Conflicts between fields in different types](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html#merging-conflicts) +- Added `\Elastica\Query\ParentId` to avoid join with parent documents [#1287](https://github.com/ruflin/Elastica/issues/1287) +- Added `\Elastica\Reindex` for reindexing between indices [#1311](https://github.com/ruflin/Elastica/issues/1311) ### Improvements - - Added support for `other_bucket` and `other_bucket_key` paramters on `Elastica\Aggregation\Filters` - - Update elasticsearch testing dependency to 5.4.1 +- Added support for `other_bucket` and `other_bucket_key` paramters on `Elastica\Aggregation\Filters` +- Update elasticsearch testing dependency to 5.4.1 ### Deprecated - - Deprecated `Tool\CrossIndex` use `\Elastica\Reindex` instead [#1311](https://github.com/ruflin/Elastica/issues/1311) +- Deprecated `Tool\CrossIndex` use `\Elastica\Reindex` instead [#1311](https://github.com/ruflin/Elastica/issues/1311) ## [5.2.0](https://github.com/ruflin/Elastica/compare/5.1.0...5.2.0) @@ -833,9 +829,9 @@ Have a look at the [Upgrade guide](https://github.com/ruflin/Elastica/blob/8.x/U ### Bugfixes - Removed features that do not exist in Elasticsearch 5.0 anymore: - - `ttl` and `timestamp` logic: setters and getters in documents and mapping - - `\Elastica\Query\Missing`: negate `\Elastica\Query\Exists` instead - - `\Elastica\Query\TopChildren` + - `ttl` and `timestamp` logic: setters and getters in documents and mapping + - `\Elastica\Query\Missing`: negate `\Elastica\Query\Exists` instead + - `\Elastica\Query\TopChildren` - `\Elastica\Query\MatchPhrase` and `\Elastica\Query\MatchPhrasePrefix` do not extend `\Elastica\Query\Match` anymore because they do not share exactly the same options - Removed the `routing` option in `\Elastica\Index::create` because there is no routing param when creating an index. So that option was doing nothing so far but fails in Elasticearch 5.0 because the non-existing query param is validated. - Fix `relation` property of `\Elastica\Query\GeoShapeProvided` @@ -855,12 +851,12 @@ Have a look at the [Upgrade guide](https://github.com/ruflin/Elastica/blob/8.x/U ### Deprecated - Deprecated functionality that is also deprecated in Elasticsearch 5.0: - - `\Elastica\Client::optimizeAll` in favor of `\Elastica\Client::forcemergeAll` - - `\Elastica\Query\BoolQuery::setMinimumNumberShouldMatch` in favor of `\Elastica\Query\BoolQuery::setMinimumShouldMatch` - - `\Elastica\Query\GeoDistanceRange`: use distance aggregations or sorting instead - - `\Elastica\Query\GeohashCell` - - `\Elastica\Query\Indices`: search on the `_index` field instead - - `\Elastica\Query\Match::setFieldType`: use `\Elastica\Query\MatchPhrase` and `\Elastica\Query\MatchPhrasePrefix` instead + - `\Elastica\Client::optimizeAll` in favor of `\Elastica\Client::forcemergeAll` + - `\Elastica\Query\BoolQuery::setMinimumNumberShouldMatch` in favor of `\Elastica\Query\BoolQuery::setMinimumShouldMatch` + - `\Elastica\Query\GeoDistanceRange`: use distance aggregations or sorting instead + - `\Elastica\Query\GeohashCell` + - `\Elastica\Query\Indices`: search on the `_index` field instead + - `\Elastica\Query\Match::setFieldType`: use `\Elastica\Query\MatchPhrase` and `\Elastica\Query\MatchPhrasePrefix` instead - `\Elastica\Transport\Null` is deprecated because null is a reserved class name in PHP 7. Use `\Elastica\Transport\NullTransport` instead. ## [5.0.0](https://github.com/ruflin/Elastica/compare/5.0.0-beta1...5.0.0) @@ -1442,13 +1438,13 @@ The changelog before version 2.0.0 was organised by date. All changes can be fou - Update to elasticsearch version 1.3.0 https://www.elastic.co/downloads/past-releases/1-3-0 2014-07-14 - - Add setQuery() method to Elastica\Query\ConstantScore [#653](https://github.com/ruflin/Elastica/issues/653/) +- Add setQuery() method to Elastica\Query\ConstantScore [#653](https://github.com/ruflin/Elastica/issues/653/) 2014-07-12 - - Be able to configure ES host/port via ENV var in test env [#652](https://github.com/ruflin/Elastica/issues/652/) +- Be able to configure ES host/port via ENV var in test env [#652](https://github.com/ruflin/Elastica/issues/652/) 2014-07-07 - - Fix FunstionScore Query random_score without seed bug. [#647](https://github.com/ruflin/Elastica/issues/647/) +- Fix FunstionScore Query random_score without seed bug. [#647](https://github.com/ruflin/Elastica/issues/647/) 2014-07-02 - Add setPostFilter method to Elastica\Query (https://www.elastic.co/guide/en/elasticsearch/guide/current/_post_filter.html) [#645](https://github.com/ruflin/Elastica/issues/645/)