packagist ruflin/elastica 9.1.0

52 minutes ago

Backward Compatibility Breaks

  • Query\Terms now throws InvalidException for non-list terms instead of building an invalid query. Use array_values() to reindex sparse or associative arrays before passing them to the constructor or setTerms() #2139 #2335.
  • Elastica\Client::setAsync(), getAsync(), setResponseException(), getResponseException() and setServerless() now throw Elastica\Exception\NotImplementedException with feature-specific messages instead of a generic \Exception #2303.
  • Elastica\Task::cancel() now throws Elastica\Exception\InvalidException instead of a generic \Exception when no task ID is set. Both new exception types implement Elastica\Exception\ExceptionInterface and extend \LogicException, so an earlier catch (\LogicException) now handles these failures before catch (\Exception) #2303.
  • Query\TermsSet and Query\Ids now throw InvalidException for non-list array arguments instead of building an invalid query. Use array_values() to reindex sparse or associative arrays before passing them to the constructor or setTerms() / setIds() #2139 #2338.

Added

  • Added support for numeric minimum_should_match values in TermsSet query #2293
  • Added support for "search after" based pagination #1645 #2299
  • Added support for the seq_no_primary_term search option and the if_seq_no / if_primary_term index options to enable optimistic concurrency control #2284
  • Added support for PHP 8.6 #2320

Changed

  • Elastica\Util::convertDate() now throws Elastica\Exception\InvalidException when given a string that strtotime() cannot parse, instead of silently producing 1970-01-01T00:00:00Z. The return type has also been narrowed to string and a typo-prone null argument is no longer accepted at runtime. #2305
  • Bumped codecov/codecov-action from v2 to v7 and aligned it with the v7 input contract (token, fail_ci_if_error: false, conditional use_oidc) #2327.

Fixed

  • Client::deleteIds() now accepts integer document IDs again by casting them to string before Action::setId() #2316 #2317
  • Elastica\Index::refresh() now refreshes only the targeted index instead of the entire cluster (previously it issued POST /_refresh, now it issues POST /{index}/_refresh) #2313
  • Bulk index, create and update actions now send the if_seq_no / if_primary_term optimistic concurrency control options, which were silently dropped, and bulk delete actions no longer drop if_seq_no when it is 0 #2058 #2336

Auto generated release notes

What's Changed

  • Allow numeric minimum_should_match values for terms set query by @hotrush in #2293
  • test: add functional test for numeric minimum_should_match in TermsSet by @ruflin in #2294
  • #1645: add support for "search after" pagination by @klimov-paul in #2299
  • Add support for seq_no_primary_term search option and if_seq_no/if_primary_term index options by @ruflin in #2284
  • docs: refresh AGENTS.md, README.md, and CONTRIBUTING.md by @ruflin in #2300
  • fix: throw InvalidException on unparseable Util::convertDate input by @ruflin in #2305
  • Add PHP 8.6 to the pipeline by @sidz in #2320
  • ci: enforce .editorconfig with editorconfig-checker by @ruflin in #2323
  • docs: update AGENTS.md to match current tooling and test setup by @ruflin in #2324
  • fix: quote PHPUNIT_OPTIONS in docker-run-phpunit by @ruflin in #2325
  • Client::deleteIds type error by @AntoineRoue in #2317
  • test: wait for green cluster health in ClusterTest::testGetHealth by @ruflin in #2326
  • chore(ci): bump codecov-action from v2 to v5 by @ruflin in #2307
  • fix: scope Index::refresh() to the target index (#2313) by @ruflin in #2315
  • docs: require red-then-green regression tests for bug fixes by @ruflin in #2328
  • chore(ci): bump codecov-action from v5 to v7 by @ruflin in #2327
  • docs: link deleteIds changelog entry to #2317 by @ruflin in #2329
  • docs: reconcile CONTRIBUTING.md with the current project reality by @ruflin in #2312
  • docs: point contributors at GitHub Discussions only by @ruflin in #2333
  • fix: replace assertTrue(true) with addToAssertionCount(1) in DocumentTest by @ruflin in #2337
  • fix: reject non-list terms before building a query by @Aschenbath in #2335
  • fix: send if_seq_no/if_primary_term in bulk index, create and update actions by @caioocesar in #2336
  • test: fix JSONTest assertion and make it run in CI by @ruflin in #2332
  • test: fix malformed group attribute on MappingTest::testDynamicTemplate by @ruflin in #2331
  • test: use #[Group] attributes instead of @group docblock annotations by @ruflin in #2339
  • fix: reject non-list arrays in Query\TermsSet and Query\Ids by @ruflin in #2338
  • test: test AbstractSimpleAggregation with a real subclass and run it in CI by @ruflin in #2334
  • refactor: throw typed Elastica exceptions for unsupported features by @ruflin in #2303
  • docs: prepare the 9.1.0 changelog by @ruflin in #2357

New Contributors

Full Changelog: 9.0.0...9.1.0

Don't miss a new elastica release

NewReleases is sending notifications on new releases.