Skip to content

Releases: ruflin/Elastica

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

Release 7.1.3

09 Dec 08:33
2ee1f63
Compare
Choose a tag to compare

Added

  • Added support for scripted upsert on bulk requests by @dsgrillo #1974
  • Added Elastica\Aggregation\CumulativeSum by @limenet #1987
  • Added ignore_failure option to suitable ingest processors by @deguif #2003
  • Added ignore_missing option to lowercase, remove, trim and uppercase processors by @deguif #2001
  • Added allow_duplicates option to append processor by @deguif #2004
  • Added bytes processor by @deguif #2008
  • Added indices_boost option to Elastica\Query by @deguif #2018
  • Added Elastica\Query\Terms::setBoost() method to configure boost by @deguif #2035
  • Added Elastica\Query\TermsSet query by @mamchyts #2020
  • Added terms_set in query builder by @deguif #2036
  • Added Elastica\Aggregation\Traits\BucketsPathTrait to configure buckets_path on aggregations by @deguif #2037 #2039
  • Allowed to configure a sub key when adding a param with Elastica\Param::addParam() by @deguif #2030

Changed

  • Triggered deprecation in Elastica\Result::getType() method by @deguif #2016
  • Updated php-cs-fixer to 3.3.2 by @deguif #2022
  • Updated composer-normalize to 2.15.0 by @deguif #2021
  • Updated elasticsearch test version to 7.15.2 by @deguif #2027
  • Extracted setting gap policy to \Elastica\Aggregation\Traits\GapPolicyTrait and introduced \Elastica\Aggregation\GapPolicyInterface with constants for options by @stchr #2023
  • Extracted setting field to Elastica\Processor\Traits\FieldTrait by @deguif #2024
  • Extracted setting target_field to Elastica\Processor\Traits\TargetFieldTrait by @deguif #2026
  • Simplified github action matrix for continuous integration workflow by @deguif #2025

Deprecated

  • Deprecated Elastica\Query\Common class, use Elastica\Query\MatchQuery instead by @deguif #2013
  • Deprecated Elastica\QueryBuilder\DSL\Query::common_terms(), use match() instead by @deguif #2013
  • Deprecated passing an int as 1st argument to Elastica\Search::setOptionsAndQuery(), pass an array with the key size instead by @deguif #2010
  • Deprecated cutoff_frequency option of Elastica\Query\MatchQuery by @deguif #2014
  • Deprecated cutoff_frequency option of Elastica\Query\MultiMatch by @deguif #2015
  • Deprecated Elastica\Bulk::toString(), Elastica\Bulk\Action::toString() and Elastica\Request::toString() methods, use __toString() method or cast to string instead by @deguif #2033
  • Deprecated not passing a buckets_path when constructing Elastica\Aggregation\AvgBucket, Elastica\Aggregation\Derivative, Elastica\Aggregation\NormalizeAggregation, Elastica\Aggregation\PercentilesBucket, Elastica\Aggregation\SerialDiff, Elastica\Aggregation\StatsBucket and Elastica\Aggregation\SumBucket by @deguif #2038
  • Deprecated not passing a method when constructing Elastica\Aggregation\NormalizeAggregation by @deguif #2040

Removed

  • Removed remaining _type field usages by @deguif #2017
  • Removed Elastica\Bulk::$_type dead property by @deguif #2034
  • Removed Elasticsearch old version checks in tests by @deguif #2041

Fixed

  • Fixed type-hint for Elastica\Search::setOptionsAndQuery() by @deguif #2009
  • Fixed terms query params resolution by @deguif #2032

New Contributors

Full Changelog: 7.1.2...7.1.3

Release 7.1.2

21 Oct 13:15
fa4ddb1
Compare
Choose a tag to compare

Backward Compatibility Breaks

  • Changed Elastica\Exception\JSONParseException inheritance, it now extends \JsonException instead of \RuntimeException #1949

Added

  • Added Elastica\Aggregation\NormalizeAggregation #1956
  • Added Elastica\Suggest\Phrase::addDirectGenerator to align with ES specification #1964
  • Added support for psr/log 2.0 and 3.0 #1971
  • Added new optional 'case_insensitive' option to Elastica\Query\Wildcard #1894
  • Added Elastica\Result::getSort() fetching the "sort" property of results #1979
  • Added exposure of Point-In-Time ID for search responses in Elastica\ResultSet::getPointInTimeId() #1991
  • Added Elastica\Index::openPointInTime() for opening a PiT on the index #1994
  • Added possibility to specify PointInTime on Elastica\Query::setPointInTime() #1992
  • Added Elastica\Client::closePointInTime() for closing a PiT #1995

Changed

  • Updated php-cs-fixer to 3.2.1 #1996, #1959,#1955
  • Using default Elasticsearch images for testing instead of OSS #1954

Fixed

  • Fixed compatibility with guzzlehttp/psr7 version 2.x #2002
  • Fixed the assignment of version, seq_no and primary_term on getDocument #1973