Skip to content

Releases: ruflin/Elastica

Release 8.1.0

29 Nov 08:32
5e5f9b2
Compare
Choose a tag to compare

Added

  • Added support for the multi-match query type bool_prefix #2220
  • Added support for PHP 8.4 #2221
  • Added support for custom key to IpRange and GeoDistance addRange using a common trait #2227
  • Added bucket sort aggregation #2229

Fixed

  • Fixed Pipeline Processor handling to allow for multiple processors of the same type #2218

New Contributors

Full Changelog: 8.0.0...8.1.0

Release 8.0.0

29 May 11:49
2fc446e
Compare
Choose a tag to compare

This is first 8.x GA release for Elastica. It contains a list of breaking changes. Have a look at the Upgrade guide.

8.0.0 is a huge milestone and a big thanks to everyone in the community that made this possible!

Backward Compatibility Breaks

  • Dropped support for PHP <8.0 #2131
  • Removed deprecated classes in 7.x #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
  • Removed deprecated methods #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()
  • Changed following aggregation constructors #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
  • Changed return type of Elastica\Cluster\Health::getActiveShardsPercentAsNumber() method to float #2144
  • Changed $origin and $scale parameter types of Elastica\Query\FunctionScore::addDecayFunction() to allow float|int|string #2144
  • Changed $key parameter type of Elastica\Multi\Search::addSearch() to allow int|string|null #2144
  • Changed $options parameter type of Elastica\Index::create() to only allow array<string, mixed> #2147
  • Changed Elastica\Reindex::setWaitForCompletion() to only allow bool #2151
  • Changed Elastica\Search::addIndex(), Elasica\Search::addIndices() and Elastica\Search::hasIndex() parameter type to only allow Elastica\Index #2150
  • Changed $options argument to not accept int in the following methods #2148
    • Elastica\SearchableInterface::search()
    • Elastica\SearchableInterface::createSearch()
    • Elastica\Search::search()
    • Elastica\Search::createSearch()
    • Elastica\Search::setOptionsAndQuery()
    • Elastica\Index::search()
    • Elastica\Index::createSearch()
  • Removed classes #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
  • Removed Elastica\Client::setLogger() method #2148
  • Enabled strict_types on all classes #2190
  • Changed Elastica\Scroll:clear to use scroll_id body parameter instead of url parameter #2211
  • Remove branch alias for dev-master from composer file #2215

Added

  • Added support for PHP 8.2 #2136
  • Added missing @throws annotations to Client::request and related methods #2152
  • Added ElasticSearch 8.x to CI #2123
  • Added more versions of ElasticSearch to CI #2155
  • If not expicitly set, use retry_on_conflict from Client configuration in Bulk updates (ported from 7.x #2184)
  • Added support for the Combined Fields query type #2195

Changed

  • Updated php-cs-fixer to 3.13.2 #2143
  • Modernize code using match expression #2141
  • Updated docker/php/Dockerfile added AllowSymfonyFlexPlugin (false) on docker phpuser context #2194

Removed

  • Removed the JSONParseException class, which is replaced by \JsonException
  • Removed the JSONParseException test class
  • Removed nyholm/dsn as no longer needed.
  • Removed symfony/deprecation-contracts as no longer needed.

Fixed

  • Fix types order in Elastica\Query to work with psalm & expand the aggs type to include raw arrays

New Contributors

Full Changelog: 7.3.0...8.0.0

8.0.0-alpha1

03 May 09:10
7446c55
Compare
Choose a tag to compare
8.0.0-alpha1 Pre-release
Pre-release

This is the first 8.0.0 alpha release for Elastica. It is compatible with Elasticsearch 8.0 and contains several breaking changes. We want to get this out in the wild to get as much feedback on it as we can. Any new issues found? Any migration issues? The work of getting us to GA is tracked here: #2185

Big thanks to the community for getting us to this release!

Changelog

Backward Compatibility Breaks

  • Dropped support for PHP <8.0 #2131
  • Removed deprecated classes in 7.x #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
  • Removed deprecated methods #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()
  • Changed following aggregation constructors #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
  • Changed return type of Elastica\Cluster\Health::getActiveShardsPercentAsNumber() method to float #2144
  • Changed $origin and $scale parameter types of Elastica\Query\FunctionScore::addDecayFunction() to allow float|int|string #2144
  • Changed $key parameter type of Elastica\Multi\Search::addSearch() to allow int|string|null #2144
  • Changed $options parameter type of Elastica\Index::create() to only allow array<string, mixed> #2147
  • Changed Elastica\Reindex::setWaitForCompletion() to only allow bool #2151
  • Changed Elastica\Search::addIndex(), Elasica\Search::addIndices() and Elastica\Search::hasIndex() parameter type to only allow Elastica\Index #2150
  • Changed $options argument to not accept int in the following methods #2148
    • Elastica\SearchableInterface::search()
    • Elastica\SearchableInterface::createSearch()
    • Elastica\Search::search()
    • Elastica\Search::createSearch()
    • Elastica\Search::setOptionsAndQuery()
    • Elastica\Index::search()
    • Elastica\Index::createSearch()
  • Removed classes #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
  • Removed Elastica\Client::setLogger() method #2148
  • Enabled strict_types on all classes #2190
  • Changed Elastica\Scroll:clear to use scroll_id body parameter instead of url parameter #2211

Added

  • Added support for PHP 8.2 #2136
  • Added missing @throws annotations to Client::request and related methods #2152
  • Added ElasticSearch 8.x to CI #2123
  • Added more versions of ElasticSearch to CI #2155
  • If not expicitly set, use retry_on_conflict from Client configuration in Bulk updates (ported from 7.x #2184)
  • Added support for the Combined Fields query type #2195

Changed

  • Updated php-cs-fixer to 3.13.2 #2143
  • Modernize code using match expression #2141
  • Updated docker/php/Dockerfile added AllowSymfonyFlexPlugin (false) on docker phpuser context #2194

Removed

  • Removed the JSONParseException class, which is replaced by \JsonException
  • Removed the JSONParseException test class
  • Removed nyholm/dsn as no longer needed.
  • Removed symfony/deprecation-contracts as no longer needed.

Fixed

  • Fix types order in Elastica\Query to work with psalm & expand the aggs type to include raw arrays

New Contributors

Full Changelog: 7.3.2...8.0.0-alpha1

v7.3.2

11 Mar 14:12
Compare
Choose a tag to compare

What's Changed

Full Changelog: 7.3.1...7.3.2

Release v7.3.1

21 Apr 09:05
7c61a63
Compare
Choose a tag to compare

Added

  • Added missing @throws annotations to Client::request and related methods #2153

Deprecated

  • Deprecated not passing a buckets_path and script when constructing Elastica\Aggregation\BucketScript and Elastica\Aggregation\BucketSelector

Fixed

  • Fix types order in Elastica\Query to work with psalm & expand the aggs type to include raw arrays

Release v7.3.0

30 Nov 14:23
75fca5b
Compare
Choose a tag to compare

Changed

  • Use ramsey/composer-install to simplify CI jobs and test with the lowest set of dependencies #2113
  • Bumped elasticsearch/elasticsearch to 7.10 to be able to use OpenPointInTime class #2113
  • Updated php-cs-fixer to 3.9.5 #2110
  • Changed Elastica\Index\Settings::get adding ability to get default settings by @krasilnikovm #2115
  • Update AWSAuthV4 transport to sanitize host name for AWS requests before signing #2090
  • New method Elastica\Aggregation\Terms::setMissingBucket. For Composite Agg. Include in the response documents without a value for a given source. #2117
  • Increased PHPStan level to 5 by @franmomu #2108

Removed

  • Removed CallbackStrategyTestHelper and ErrorsCollector from tests #2111

Fixed

  • Fixed Query/Terms terms phpdoc from array<bool|float|int|string> to list<bool|float|int|string> #2118
  • Fixed Response to prevent throwing JSONParseException when the response is empty.

New Contributors

Full Changelog: 7.2.0...7.3.0

Release v7.2.0

02 Aug 13:32
8fe6176
Compare
Choose a tag to compare

Backward Compatibility Breaks

  • Changed SetProcessor::setValue signature to allow to pass any type, if you are overriding this method you must update the signature removing the string type-hint by @franmomu #2082
  • Changed Settings::setMergePolicy signature to allow to pass int and string as argument 2, if you are overriding this method you must update the signature removing the string type-hint by @franmomu #2085

Added

Changed

  • Updated symfony/phpunit-bridge to 6.0 by @franmomu #2067
  • Updated php-cs-fixer to 3.8.0 #2074
  • Updated composer-normalize to 2.2.28 by @deguif #2084
  • Increased PHPStan level to 4 #2080
  • ExceptionInterface extends Throwable #2083
  • Changed value in SetProcessor to accept mixed instead of string by @franmomu #2082
  • Updated Query::create PHPDoc to include supported types and propagate it to callers by @franmomu #2088
  • Update some iterable types in PHPDoc to be more specific by @franmomu #2092
  • Updated AwsAuthV4Test adding assertions for exception type by @franmomu #2094

Deprecated

  • Deprecated Elastica\Reindex::WAIT_FOR_COMPLETION_FALSE, use a boolean as parameter instead by @franmomu #2070
  • Passing anything else than a boolean as 1st argument to Reindex::setWaitForCompletion, pass a boolean instead by @franmomu #2070
  • Deprecated passing a string as 1st argument to Search::addIndex() and Search::hasIndex(), pass an Index instance instead by @franmomu #2103
  • Deprecated passing an array of string as 1st argument to Search::addIndices(), use an array of Index instances by @franmomu #2103

Removed

  • Removed egeloen/http-adapter as suggested package since the project is abandoned by @franmomu #2069
  • Removed 0 as valid request data using Analyze API by @franmomu #2068
  • Removed dead code in AwsAuthV4Test by @franmomu #2073

Fixed

  • Fixed some PHPDoc types adding null as possible value by @franmomu #2070 and #2087
  • Fixed passing wrong types to GapPolicyInterface::setGapPolicy(), Document::setDocAsUpsert() and Connection::setPort() methods by @franmomu #2081
  • Fixed Http PHPDoc adding \CurlHandle type for Curl connection by @franmomu #2086
  • Fixed case mismatch in method calls by @franmomu #2087
  • Fixed MoreLikeThis::setLike() PHPDoc allowing Document by @franmomu #2091
  • Fixed Term::setTerm() PHPDoc allowing scalar values for $value parameter by @franmomu #2094
  • Fixed DateHistogram deprecation: use fixed_internal or calendar_interval instead of interval by @VincentLanglet #2099

New Contributors

Full Changelog: 7.1.5...7.2.0

Release 6.2.1

14 Apr 07:00
f95cf64
Compare
Choose a tag to compare

Improvements

  • Solve PHP 8.1 deprecations for every class implementing Countable, Iterator or ArrayAccess by @VincentLanglet #2061

Full Changelog: 6.2.0...6.2.1

Release 7.1.5

29 Mar 15:39
72a4598
Compare
Choose a tag to compare

Added

  • Added explicit return annotation to Elastica\Multi\ResultSet::current() and Elastica\Multi\ResultSet::offsetGet() by @franmomu 2056
  • Add throwing \Elastica\Exception\RequestEntityTooLargeException on HTTP-413 responses in \Elastica\Bulk by @Vetaxon 2055

New Contributors

Full Changelog: 7.1.4...7.1.5

Release 7.1.4

14 Feb 07:21
6594f0e
Compare
Choose a tag to compare

Added

Fixed

  • Fixed version parameters for DeleteDocument by @pheyse24 #2048
  • Fixed version parameters for Index::addDocument() by @pidera #2050

New Contributors

Full Changelog: 7.1.3...7.1.4