Releases: ruflin/Elastica
Release 8.1.0
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
- @McFistyBuns made their first contribution in #2218
- @wolfsblu made their first contribution in #2220
- @gaetan-petit made their first contribution in #2229
Full Changelog: 8.0.0...8.1.0
Release 8.0.0
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
-> useElastica\Exception\ResponseException::getResponse()::getFullError()
insteadElastica\Exception\ResponseException::getElasticsearchException()
-> useElastica\Exception\ResponseException::getResponse()::getFullError()
insteadElastica\Processor\Append
-> useElastica\Processor\AppendProcessor
insteadElastica\Processor\Attachment
-> useElastica\Processor\AttachmentProcessor
insteadElastica\Processor\Convert
-> useElastica\Processor\ConvertProcessor
insteadElastica\Processor\Date
-> useElastica\Processor\DateProcessor
insteadElastica\Processor\DateIndexName
-> useElastica\Processor\DateIndexNameProcessor
insteadElastica\Processor\DotExpander
-> useElastica\Processor\DotExpanderProcessor
insteadElastica\Processor\Fail
-> useElastica\Processor\FailProcessor
insteadElastica\Processor\Join
-> useElastica\Processor\JoinProcessor
insteadElastica\Processor\Json
-> useElastica\Processor\JsonProcessor
insteadElastica\Processor\Kv
-> useElastica\Processor\KvProcessor
insteadElastica\Processor\Lowercase
-> useElastica\Processor\LowercaseProcessor
insteadElastica\Processor\Remove
-> useElastica\Processor\RemoveProcessor
insteadElastica\Processor\Rename
-> useElastica\Processor\RenameProcessor
insteadElastica\Processor\Set
-> useElastica\Processor\SetProcessor
insteadElastica\Processor\Sort
-> useElastica\Processor\SortProcessor
insteadElastica\Processor\Split
-> useElastica\Processor\SplitProcessor
insteadElastica\Processor\Trim
-> useElastica\Processor\AppendProcessor
insteadElastica\Processor\Uppercase
-> useElastica\Processor\UppercaseProcessor
insteadElastica\Query\Common
-> useElastica\Query\MatchQuery
insteadElastica\QueryBuilder\DSL\Query::common_terms()
-> useElastica\QueryBuilder\DSL\Query::match()
insteadElastica\Transport\HttpAdapter
-> useElastica\Transport\Http
instead
- Removed deprecated methods #2135
Elastica\Aggregation\Range::setKeyedResponse()
-> useElastica\Aggregation\Range::setKeyed()
insteadElastica\Bulk::toString()
-> useElastica\Bulk::__toString()
or cast to string insteadElastica\Query\MatchQuery::setFieldCutoffFrequency()
Elastica\Query\MultiMatch::setCutoffFrequency()
Elastica\QueryBuilder\DSL\Aggregation::global_agg()
-> useElastica\QueryBuilder\DSL\Aggregation::global()
insteadElastica\Request::toString()
-> useElastica\Request::__toString()
or cast to string insteadElastica\Result::getType()
Elastica\Suggest\Phrase::addCandidateGenerator()
-> useElastica\Suggest\Phrase::addDirectGenerator()
insteadElastica\Util::getParamName()
- Changed following aggregation constructors #2138
Elastica\Aggregation\AvgBucket
: The second argument$bucketsPath
is now mandatoryElastica\Aggregation\BucketScript
: The second (array $bucketsPath
) and the third (string $script
) argument are now mandatoryElastica\Aggregation\BucketSelector
: The second (array $bucketsPath
) and the third (string $script
) argument are now mandatoryElastica\Aggregation\Derivative
: The second argument (string $bucketsPath
) is now mandatoryElastica\Aggregation\NormalizeAggregation
: The second (string $bucketsPath
) and the third (string $method
) argument are now mandatoryElastica\Aggregation\PercentilesBucket
: The second argument (string $bucketsPath
) is now mandatoryElastica\Aggregation\SerialDiff
: The second argument (string $bucketsPath
) is now mandatoryElastica\Aggregation\StatsBucket
: The second argument (string $bucketsPath
) is now mandatoryElastica\Aggregation\SumBucket
: The second argument (string $bucketsPath
) is now mandatory
- Changed return type of
Elastica\Cluster\Health::getActiveShardsPercentAsNumber()
method tofloat
#2144 - Changed
$origin
and$scale
parameter types ofElastica\Query\FunctionScore::addDecayFunction()
to allowfloat|int|string
#2144 - Changed
$key
parameter type ofElastica\Multi\Search::addSearch()
to allowint|string|null
#2144 - Changed
$options
parameter type ofElastica\Index::create()
to only allowarray<string, mixed>
#2147 - Changed
Elastica\Reindex::setWaitForCompletion()
to only allowbool
#2151 - Changed
Elastica\Search::addIndex()
,Elasica\Search::addIndices()
andElastica\Search::hasIndex()
parameter type to only allowElastica\Index
#2150 - Changed
$options
argument to not acceptint
in the following methods #2148Elastica\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 usescroll_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
to3.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 theaggs
type to include raw arrays
New Contributors
- @sidz made their first contribution in #2131
- @pawelkeska made their first contribution in #2181
- @Jean-Beru made their first contribution in #2178
- @daminuxfork made their first contribution in #2194
- @mparker17 made their first contribution in #2196
Full Changelog: 7.3.0...8.0.0
8.0.0-alpha1
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
-> useElastica\Exception\ResponseException::getResponse()::getFullError()
insteadElastica\Exception\ResponseException::getElasticsearchException()
-> useElastica\Exception\ResponseException::getResponse()::getFullError()
insteadElastica\Processor\Append
-> useElastica\Processor\AppendProcessor
insteadElastica\Processor\Attachment
-> useElastica\Processor\AttachmentProcessor
insteadElastica\Processor\Convert
-> useElastica\Processor\ConvertProcessor
insteadElastica\Processor\Date
-> useElastica\Processor\DateProcessor
insteadElastica\Processor\DateIndexName
-> useElastica\Processor\DateIndexNameProcessor
insteadElastica\Processor\DotExpander
-> useElastica\Processor\DotExpanderProcessor
insteadElastica\Processor\Fail
-> useElastica\Processor\FailProcessor
insteadElastica\Processor\Join
-> useElastica\Processor\JoinProcessor
insteadElastica\Processor\Json
-> useElastica\Processor\JsonProcessor
insteadElastica\Processor\Kv
-> useElastica\Processor\KvProcessor
insteadElastica\Processor\Lowercase
-> useElastica\Processor\LowercaseProcessor
insteadElastica\Processor\Remove
-> useElastica\Processor\RemoveProcessor
insteadElastica\Processor\Rename
-> useElastica\Processor\RenameProcessor
insteadElastica\Processor\Set
-> useElastica\Processor\SetProcessor
insteadElastica\Processor\Sort
-> useElastica\Processor\SortProcessor
insteadElastica\Processor\Split
-> useElastica\Processor\SplitProcessor
insteadElastica\Processor\Trim
-> useElastica\Processor\AppendProcessor
insteadElastica\Processor\Uppercase
-> useElastica\Processor\UppercaseProcessor
insteadElastica\Query\Common
-> useElastica\Query\MatchQuery
insteadElastica\QueryBuilder\DSL\Query::common_terms()
-> useElastica\QueryBuilder\DSL\Query::match()
insteadElastica\Transport\HttpAdapter
-> useElastica\Transport\Http
instead
- Removed deprecated methods #2135
Elastica\Aggregation\Range::setKeyedResponse()
-> useElastica\Aggregation\Range::setKeyed()
insteadElastica\Bulk::toString()
-> useElastica\Bulk::__toString()
or cast to string insteadElastica\Query\MatchQuery::setFieldCutoffFrequency()
Elastica\Query\MultiMatch::setCutoffFrequency()
Elastica\QueryBuilder\DSL\Aggregation::global_agg()
-> useElastica\QueryBuilder\DSL\Aggregation::global()
insteadElastica\Request::toString()
-> useElastica\Request::__toString()
or cast to string insteadElastica\Result::getType()
Elastica\Suggest\Phrase::addCandidateGenerator()
-> useElastica\Suggest\Phrase::addDirectGenerator()
insteadElastica\Util::getParamName()
- Changed following aggregation constructors #2138
Elastica\Aggregation\AvgBucket
: The second argument$bucketsPath
is now mandatoryElastica\Aggregation\BucketScript
: The second (array $bucketsPath
) and the third (string $script
) argument are now mandatoryElastica\Aggregation\BucketSelector
: The second (array $bucketsPath
) and the third (string $script
) argument are now mandatoryElastica\Aggregation\Derivative
: The second argument (string $bucketsPath
) is now mandatoryElastica\Aggregation\NormalizeAggregation
: The second (string $bucketsPath
) and the third (string $method
) argument are now mandatoryElastica\Aggregation\PercentilesBucket
: The second argument (string $bucketsPath
) is now mandatoryElastica\Aggregation\SerialDiff
: The second argument (string $bucketsPath
) is now mandatoryElastica\Aggregation\StatsBucket
: The second argument (string $bucketsPath
) is now mandatoryElastica\Aggregation\SumBucket
: The second argument (string $bucketsPath
) is now mandatory
- Changed return type of
Elastica\Cluster\Health::getActiveShardsPercentAsNumber()
method tofloat
#2144 - Changed
$origin
and$scale
parameter types ofElastica\Query\FunctionScore::addDecayFunction()
to allowfloat|int|string
#2144 - Changed
$key
parameter type ofElastica\Multi\Search::addSearch()
to allowint|string|null
#2144 - Changed
$options
parameter type ofElastica\Index::create()
to only allowarray<string, mixed>
#2147 - Changed
Elastica\Reindex::setWaitForCompletion()
to only allowbool
#2151 - Changed
Elastica\Search::addIndex()
,Elasica\Search::addIndices()
andElastica\Search::hasIndex()
parameter type to only allowElastica\Index
#2150 - Changed
$options
argument to not acceptint
in the following methods #2148Elastica\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 usescroll_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
to3.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 theaggs
type to include raw arrays
New Contributors
- @sidz made their first contribution in #2131
- @pawelkeska made their first contribution in #2181
- @Jean-Beru made their first contribution in #2178
- @daminuxfork made their first contribution in #2194
- @mparker17 made their first contribution in #2196
Full Changelog: 7.3.2...8.0.0-alpha1
v7.3.2
What's Changed
- Remove duplicated key in TRawQuery by @franmomu in #2159
- Update Makefile by @tevesm in #2165
- Add more missing @throws tags (V7) by @VincentLanglet in #2176
- Apply RetryOnConflict on Bulk documents by @csabavirag in #2184
- Prepare release v7.3.2 by @thePanz in #2199
Full Changelog: 7.3.1...7.3.2
Release v7.3.1
Added
- Added missing
@throws
annotations to Client::request and related methods #2153
Deprecated
- Deprecated not passing a
buckets_path
andscript
when constructingElastica\Aggregation\BucketScript
andElastica\Aggregation\BucketSelector
Fixed
- Fix types order in
Elastica\Query
to work with psalm & expand theaggs
type to include raw arrays
Release v7.3.0
Changed
- Use
ramsey/composer-install
to simplify CI jobs and test with the lowest set of dependencies #2113 - Bumped
elasticsearch/elasticsearch
to7.10
to be able to useOpenPointInTime
class #2113 - Updated
php-cs-fixer
to3.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 to5
by @franmomu #2108
Removed
- Removed
CallbackStrategyTestHelper
andErrorsCollector
fromtests
#2111
Fixed
- Fixed
Query/Terms
terms phpdoc fromarray<bool|float|int|string>
tolist<bool|float|int|string>
#2118 - Fixed
Response
to prevent throwing JSONParseException when the response is empty.
New Contributors
- @krasilnikovm made their first contribution in #2115
- @jhuebner79 made their first contribution in #2090
- @aribon-cs made their first contribution in #2125
Full Changelog: 7.2.0...7.3.0
Release v7.2.0
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 thestring
type-hint by @franmomu #2082 - Changed
Settings::setMergePolicy
signature to allow to passint
andstring
as argument 2, if you are overriding this method you must update the signature removing thestring
type-hint by @franmomu #2085
Added
- Added
PHPStan
at level 3 by @franmomu #2064 - Added coverage check to CI by @franmomu #2071
- Added
string
as a valid type fordata
inRequest
by @franmomu #2078 - Added missing
throws
PHPDoc tags by @franmomu #2077 - Added
Search::addIndexByName()
,Search::hasIndexByName()
andSearch::addIndicesByName()
by @franmomu #2103
Changed
- Updated
symfony/phpunit-bridge
to6.0
by @franmomu #2067 - Updated
php-cs-fixer
to3.8.0
#2074 - Updated
composer-normalize
to2.2.28
by @deguif #2084 - Increased
PHPStan
level to4
#2080 ExceptionInterface
extendsThrowable
#2083- Changed
value
inSetProcessor
to acceptmixed
instead ofstring
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 toSearch::addIndex()
andSearch::hasIndex()
, pass an Index instance instead by @franmomu #2103 - Deprecated passing an array of
string
as 1st argument toSearch::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()
andConnection::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 allowingDocument
by @franmomu #2091 - Fixed
Term::setTerm()
PHPDoc allowing scalar values for$value
parameter by @franmomu #2094 - Fixed
DateHistogram
deprecation: usefixed_internal
orcalendar_interval
instead ofinterval
by @VincentLanglet #2099
New Contributors
Full Changelog: 7.1.5...7.2.0
Release 6.2.1
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
Added
- Added explicit return annotation to
Elastica\Multi\ResultSet::current()
andElastica\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
Added
- Added support for
symfony/deprecation-contracts
3.0 by @rguennichi #2047 - Added aggregation
auto_date_histogram
@andriinavrotskii #2051
Fixed
- Fixed version parameters for DeleteDocument by @pheyse24 #2048
- Fixed version parameters for Index::addDocument() by @pidera #2050
New Contributors
- @rguennichi made their first contribution in #2047
- @pheyse24 made their first contribution in #2048
- @pidera made their first contribution in #2050
- @andriinavrotskii made their first contribution in #2051
Full Changelog: 7.1.3...7.1.4