Releases: ruflin/Elastica
Release 9.0.0
Changelog
Backward Compatibility Breaks
Elastica\IndexTemplatenow works only with new_index_templateAPI. You should useElastica\Templateto use the deprecated API #2274- Dropped support for PHP <8.1 #2246
- Removed 3rd
$methodargument from theElastica\SearchableInterface::searchandElastica\SearchableInterface::countas they are not unused anymore. The following classes are affected:Elastica\SearchandElastica\Index#2256 - Removed
Elastica\Requestclass as constants are not used anymore and no longer needed. #2256
Added
- Added support for Component Template #2274
- Added support for Index Template #2274
- Added Template class to target only legacy Template #2274
- Added support for PHP 8.5 #2253
Changed
Fixed
Elastica\Query\BoolQuery::toArrayno longer changes$this->_paramsto \stdClass when empty #2241- Fixed Client retries configuration to allow zero retries by changing condition from
> 0to>= 0#2278
Auto generated release notes
What's Changed
- [8.x] Fix readme badges by @malberts in #2238
- fix: do not mutate BoolQuery instance in toArray method by @MrkMrk00 in #2241
- Update Ubuntu version for testing to 24.04 by @ruflin in #2243
- Add elasticsearch 9 support by @sidz in #2246
- Add intstructions for Github Copilot by @ruflin in #2248
- Add unit test for Elastica\Query\FunctionScore::DECAY_EXPONENTIAL by @ruflin in #2249
- Upgrade PHPUnit from 9.5 to 10.5 by @sidz in #2251
- Update phpstan to 2.x by @sidz in #2252
- Support PHP 8.5 by @sidz in #2253
- Remove unused method argument in the Elastica\SearchableInterface methods in 9.x by @sidz in #2256
- Add CLAUDE.md file to repository by @ruflin in #2259
- Enhances AI instructions files by @ruflin in #2263
- Fix PHPStan and PHP-CS-Fixer Docker commands and PHP 8.4 compatibility by @ruflin in #2262
- Fix Elasticsearch cluster discovery configuration to ensure green health status by @ruflin in #2266
- Add Claude Code GitHub Workflow by @ruflin in #2264
- Support git worktree inside the repository by @ruflin in #2267
- Fix Makefile command issues to ensure all targets work properly by @ruflin in #2268
- Update default Elasticsearch version by @ruflin in #2270
- Update docker compose files to follow new recommendations, use latest… by @sidz in #2271
- Disable Claude PR reviews for now by @ruflin in #2275
- Add component and legacy Template, update IndexTemplate by @nyroDev in #2274
- [Rector] Apply TypedPropertyFromStrictConstructorRector rule by @sidz in #2272
- Add AGENTS.md to replace other similar files by @ruflin in #2280
- Fix: Allow zero retries in Client configuration by @ruflin in #2282
- Prepare 9.0.0 release by @ruflin in #2288
New Contributors
Full Changelog: 8.1.0...9.0.0
Release 8.2.0
Added
- Added support for PHP 8.5 #2254
- Added support for Component Template #2257
- Added support for Index Template, using
useLegacy = false#2257 - Added Template class to target only legacy Template #2257
Deprecated
- Deprecated
Elastica\Templatebecause it's deprecated since version 7.8 on ElasticSearch #2257
Fixed
Elastica\Query\BoolQuery::toArrayno longer changes$this->_paramsto \stdClass when empty #2241- Fixed Client retries configuration to allow zero retries by changing condition from
> 0to>= 0#2278
New Contributors
Full Changelog: 8.1.0...8.2.0
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
addRangeusing 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\AppendProcessorinsteadElastica\Processor\Attachment-> useElastica\Processor\AttachmentProcessorinsteadElastica\Processor\Convert-> useElastica\Processor\ConvertProcessorinsteadElastica\Processor\Date-> useElastica\Processor\DateProcessorinsteadElastica\Processor\DateIndexName-> useElastica\Processor\DateIndexNameProcessorinsteadElastica\Processor\DotExpander-> useElastica\Processor\DotExpanderProcessorinsteadElastica\Processor\Fail-> useElastica\Processor\FailProcessorinsteadElastica\Processor\Join-> useElastica\Processor\JoinProcessorinsteadElastica\Processor\Json-> useElastica\Processor\JsonProcessorinsteadElastica\Processor\Kv-> useElastica\Processor\KvProcessorinsteadElastica\Processor\Lowercase-> useElastica\Processor\LowercaseProcessorinsteadElastica\Processor\Remove-> useElastica\Processor\RemoveProcessorinsteadElastica\Processor\Rename-> useElastica\Processor\RenameProcessorinsteadElastica\Processor\Set-> useElastica\Processor\SetProcessorinsteadElastica\Processor\Sort-> useElastica\Processor\SortProcessorinsteadElastica\Processor\Split-> useElastica\Processor\SplitProcessorinsteadElastica\Processor\Trim-> useElastica\Processor\AppendProcessorinsteadElastica\Processor\Uppercase-> useElastica\Processor\UppercaseProcessorinsteadElastica\Query\Common-> useElastica\Query\MatchQueryinsteadElastica\QueryBuilder\DSL\Query::common_terms()-> useElastica\QueryBuilder\DSL\Query::match()insteadElastica\Transport\HttpAdapter-> useElastica\Transport\Httpinstead
- 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$bucketsPathis 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
$originand$scaleparameter types ofElastica\Query\FunctionScore::addDecayFunction()to allowfloat|int|string#2144 - Changed
$keyparameter type ofElastica\Multi\Search::addSearch()to allowint|string|null#2144 - Changed
$optionsparameter 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
$optionsargument to not acceptintin 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\ConnectionElastica\Connection\ConnectionPoolElastica\Connection\Strategy\CallbackStrategyElastica\Connection\Strategy\RoundRobinElastica\Connection\Strategy\SimpleElastica\Connection\Strategy\StrategyFactoryElastica\Connection\Strategy\StrategyInterface
- Removed
Elastica\Client::setLogger()method #2148 - Enabled
strict_typeson all classes #2190 - Changed
Elastica\Scroll:clearto usescroll_idbody 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
@throwsannotations 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_conflictfrom Client configuration in Bulk updates (ported from 7.x #2184) - Added support for the Combined Fields query type #2195
Changed
- Updated
php-cs-fixerto3.13.2#2143 - Modernize code using
matchexpression #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/dsnas no longer needed. - Removed
symfony/deprecation-contractsas no longer needed.
Fixed
- Fix types order in
Elastica\Queryto work with psalm & expand theaggstype 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\AppendProcessorinsteadElastica\Processor\Attachment-> useElastica\Processor\AttachmentProcessorinsteadElastica\Processor\Convert-> useElastica\Processor\ConvertProcessorinsteadElastica\Processor\Date-> useElastica\Processor\DateProcessorinsteadElastica\Processor\DateIndexName-> useElastica\Processor\DateIndexNameProcessorinsteadElastica\Processor\DotExpander-> useElastica\Processor\DotExpanderProcessorinsteadElastica\Processor\Fail-> useElastica\Processor\FailProcessorinsteadElastica\Processor\Join-> useElastica\Processor\JoinProcessorinsteadElastica\Processor\Json-> useElastica\Processor\JsonProcessorinsteadElastica\Processor\Kv-> useElastica\Processor\KvProcessorinsteadElastica\Processor\Lowercase-> useElastica\Processor\LowercaseProcessorinsteadElastica\Processor\Remove-> useElastica\Processor\RemoveProcessorinsteadElastica\Processor\Rename-> useElastica\Processor\RenameProcessorinsteadElastica\Processor\Set-> useElastica\Processor\SetProcessorinsteadElastica\Processor\Sort-> useElastica\Processor\SortProcessorinsteadElastica\Processor\Split-> useElastica\Processor\SplitProcessorinsteadElastica\Processor\Trim-> useElastica\Processor\AppendProcessorinsteadElastica\Processor\Uppercase-> useElastica\Processor\UppercaseProcessorinsteadElastica\Query\Common-> useElastica\Query\MatchQueryinsteadElastica\QueryBuilder\DSL\Query::common_terms()-> useElastica\QueryBuilder\DSL\Query::match()insteadElastica\Transport\HttpAdapter-> useElastica\Transport\Httpinstead
- 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$bucketsPathis 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
$originand$scaleparameter types ofElastica\Query\FunctionScore::addDecayFunction()to allowfloat|int|string#2144 - Changed
$keyparameter type ofElastica\Multi\Search::addSearch()to allowint|string|null#2144 - Changed
$optionsparameter 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
$optionsargument to not acceptintin 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\ConnectionElastica\Connection\ConnectionPoolElastica\Connection\Strategy\CallbackStrategyElastica\Connection\Strategy\RoundRobinElastica\Connection\Strategy\SimpleElastica\Connection\Strategy\StrategyFactoryElastica\Connection\Strategy\StrategyInterface
- Removed
Elastica\Client::setLogger()method #2148 - Enabled
strict_typeson all classes #2190 - Changed
Elastica\Scroll:clearto usescroll_idbody parameter instead of url parameter #2211
Added
- Added support for PHP 8.2 #2136
- Added missing
@throwsannotations 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_conflictfrom Client configuration in Bulk updates (ported from 7.x #2184) - Added support for the Combined Fields query type #2195
Changed
- Updated
php-cs-fixerto3.13.2#2143 - Modernize code using
matchexpression #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/dsnas no longer needed. - Removed
symfony/deprecation-contractsas no longer needed.
Fixed
- Fix types order in
Elastica\Queryto work with psalm & expand theaggstype 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
@throwsannotations to Client::request and related methods #2153
Deprecated
- Deprecated not passing a
buckets_pathandscriptwhen constructingElastica\Aggregation\BucketScriptandElastica\Aggregation\BucketSelector
Fixed
- Fix types order in
Elastica\Queryto work with psalm & expand theaggstype to include raw arrays
Release v7.3.0
Changed
- Use
ramsey/composer-installto simplify CI jobs and test with the lowest set of dependencies #2113 - Bumped
elasticsearch/elasticsearchto7.10to be able to useOpenPointInTimeclass #2113 - Updated
php-cs-fixerto3.9.5#2110 - Changed
Elastica\Index\Settings::getadding ability to get default settings by @krasilnikovm #2115 - Update
AWSAuthV4 transportto 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
PHPStanlevel to5by @franmomu #2108
Removed
- Removed
CallbackStrategyTestHelperandErrorsCollectorfromtests#2111
Fixed
- Fixed
Query/Termsterms phpdoc fromarray<bool|float|int|string>tolist<bool|float|int|string>#2118 - Fixed
Responseto 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::setValuesignature to allow to pass any type, if you are overriding this method you must update the signature removing thestringtype-hint by @franmomu #2082 - Changed
Settings::setMergePolicysignature to allow to passintandstringas argument 2, if you are overriding this method you must update the signature removing thestringtype-hint by @franmomu #2085
Added
- Added
PHPStanat level 3 by @franmomu #2064 - Added coverage check to CI by @franmomu #2071
- Added
stringas a valid type fordatainRequestby @franmomu #2078 - Added missing
throwsPHPDoc tags by @franmomu #2077 - Added
Search::addIndexByName(),Search::hasIndexByName()andSearch::addIndicesByName()by @franmomu #2103
Changed
- Updated
symfony/phpunit-bridgeto6.0by @franmomu #2067 - Updated
php-cs-fixerto3.8.0#2074 - Updated
composer-normalizeto2.2.28by @deguif #2084 - Increased
PHPStanlevel to4#2080 ExceptionInterfaceextendsThrowable#2083- Changed
valueinSetProcessorto acceptmixedinstead ofstringby @franmomu #2082 - Updated
Query::createPHPDoc 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
AwsAuthV4Testadding 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
stringas 1st argument toSearch::addIndex()andSearch::hasIndex(), pass an Index instance instead by @franmomu #2103 - Deprecated passing an array of
stringas 1st argument toSearch::addIndices(), use an array of Index instances by @franmomu #2103
Removed
- Removed
egeloen/http-adapteras suggested package since the project is abandoned by @franmomu #2069 - Removed
0as valid request data using Analyze API by @franmomu #2068 - Removed dead code in
AwsAuthV4Testby @franmomu #2073
Fixed
- Fixed some PHPDoc types adding
nullas possible value by @franmomu #2070 and #2087 - Fixed passing wrong types to
GapPolicyInterface::setGapPolicy(),Document::setDocAsUpsert()andConnection::setPort()methods by @franmomu #2081 - Fixed
HttpPHPDoc adding\CurlHandletype for Curl connection by @franmomu #2086 - Fixed case mismatch in method calls by @franmomu #2087
- Fixed
MoreLikeThis::setLike()PHPDoc allowingDocumentby @franmomu #2091 - Fixed
Term::setTerm()PHPDoc allowing scalar values for$valueparameter by @franmomu #2094 - Fixed
DateHistogramdeprecation: usefixed_internalorcalendar_intervalinstead ofintervalby @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