All Versions
39
Latest Version
Avg Release Cycle
103 days
Latest Release
-

Changelog History
Page 1

  • v7.1.1 Changes

    Backward Compatibility Breaks

    • 🔄 Changed Elastica\Query\MatchQuery::setFieldParam() signature to allow passing bool, float or int #1941
    • 🔄 Changed Elastica\Query\MatchPhraseQuery::setFieldParam() signature to allow passing bool, float or int #1944 ### ➕ Added
    • 🐳 Excluded docker directory in .gitattributes #1938 ### 🔄 Changed
    • Included Content-Type HTTP header every time, whatever the content of the body is #1780
    • 🔄 Changed Elastica\Status::indexExists(), Elastica\Status::aliasExists() and Elastica\Status::getIndicesWithAlias() signatures #1929
    • 👉 Replaced call_user_func() and call_user_func_array() by direct calls #1923
    • Replaced legacy constant CURLINFO_HTTP_CODE by CURLINFO_RESPONSE_CODE #1931
    • ⚡️ Updated php-cs-fixer to 2.18.3 #1915
    • ⚡️ Updated composer-normalize to 2.13.3 #1927 ### 🗄 Deprecated
    • 🗄 Deprecated Elastica\Transport\HttpAdapter class #1940
    • 👀 Deprecated Elastica\Exception\JSONParseException exception, catch \JsonException instead #1949 ### 🛠 Fixed
    • 🛠 Fixed wrong ltrim usage in guzzle transport #1783
    • Fixed _seq_no and _primary_term wrong initialization #1920
    • 🛠 Fixed Elastica\Connection\StrategyInterface instance checks #1921
    • 🛠 Fixed various PHPDoc annotations #1922
    • 🛠 Fixed numeric index names are returned as int in Elastica\Status::getIndexNames() #1928
    • 🛠 Fixed using raw array in post_filter #1950
  • v7.1.0 Changes

    Backward Compatibility Breaks

    • ➕ Added a default value to Elastica\Aggregation\Range::setKeyed() and Elastica\Aggregation\PercentilesBucket::setKeyed() #1876
    • ✂ Removed type-hint to Elastica\Aggregation\Percentiles::setMissing() argument #1875
    • 👍 Allowed the Terms query to accept an array of bool, float, int and/or string #1872 ### ➕ Added
    • ➕ Added auth_type parameter in the client class config to specify the type of authentication (allowed values are basic, digest, gssnegotiate, ntlm) #1790
    • Added if_seq_no / if_primary_term to replace version for optimistic concurrency control #1803
    • ➕ Added Elastica\Aggregation\PercentilesBucket aggregation #1806
    • ➕ Added weighted_avg to aggregations DSL #1814
    • ➕ Added support for defining a connection pool with DSN. Example: pool(http://127.0.0.1 http://127.0.0.2/bar?timeout=4) #1808
    • ➕ Added Elastica\Aggregation\Composite aggregation #1804
    • ➕ Added symfony/deprecation-contracts package to handle deprecations #1823
    • ➕ Added list_syntax CS rule #1854
    • Added native_constant_invocation CS rule #1833
    • ➕ Added static_lambda CS rule #1870
    • ➕ Added Elastica\Aggregation\DateRange::setTimezone() #1847
    • ➕ Added endpoint options support to Elastica\Index::create() #1859
    • ➕ Added Elastica\Aggregation\DateHistogram::setKeyed() #1876
    • ➕ Added Elastica\Aggregation\GeoDistance::setKeyed() #1876
    • ➕ Added Elastica\Aggregation\Histogram::setKeyed() #1876
    • ➕ Added Elastica\Aggregation\IpRange::setKeyed() #1876
    • ➕ Added Elastica\Aggregation\GeotileGridAggregation #1880
    • ➕ Added Elastica\Aggregation\Avg::setMissing(), Elastica\Aggregation\Cardinality::setMissing(), Elastica\Aggregation\DateRange::setMissing(), Elastica\Aggregation\DateHistogram::setMissing(), Elastica\Aggregation\ExtendedStats::setMissing(), Elastica\Aggregation\Histogram::setMissing(), Elastica\Aggregation\Max::setMissing(), Elastica\Aggregation\Min::setMissing(), Elastica\Aggregation\Stats::setMissing(), Elastica\Aggregation\Sum::setMissing(), Elastica\Aggregation\Terms::setMissing() #1876
    • 👌 Supported guzzlehttp/guzzle 7.x #1816
    • 👌 Supported PHP 8.0 #1794
    • 👌 Supported BC break on elasticsearch/elasticsearch version 7.4.0 #1864 ### 🔄 Changed
    • 👍 Allowed string such as wait_for to be passed to AbstractUpdateAction::setRefresh #1791
    • 👍 Allowed float values for connection timeout and connection connect-timeout, providing ms precision for those. Previous precision was second. #1868
    • ⚡️ Changed the return type of AbstractUpdateAction::getRefresh to boolean|string #1791
    • Reviewed options handling in Elastica\Index::create() #1822
    • 🗄 Replaced deprecated exceptions request option by http_errors request option in Guzzle transport #1817
    • 💅 Run coding styles check on github action #1878
    • ✅ Run unit tests on github action #1882
    • ✅ Run functional tests on github action #1885
    • ⚡️ Updated php-cs-fixer to 2.16.4 #1830
    • ⚡️ Updated php-cs-fixer to 2.16.7 #1881
    • ⚡️ Updated php-cs-fixer to 2.17.3 #1895
    • ⚡️ Updated php-cs-fixer to 2.18.2 #1897
    • 🔧 Used GuzzleHttp\RequestOptions constants for configuring request options #1820
    • 👉 Used new alias endpoints classes #1839
    • 👉 Used new cache endpoints classes #1840
    • 👉 Used new ingest pipeline endpoints classes #1834
    • 👉 Used new mapping endpoints classes #1845
    • 👉 Used new nodes endpoints classes #1863
    • 👉 Used new settings endpoints classes #1852 ### 🗄 Deprecated
    • 🗄 Deprecated Elastica\Aggregation\Range::setKeyedResponse(), use setKeyed() instead #1848
    • 👀 Deprecated Elastica\Exception\ResponseException::getElasticsearchException(), use getResponse()::getFullError() instead #1829
    • 🗄 Deprecated Elastica\QueryBuilder\DSL\Aggregation::global_agg(), use global() instead #1826
    • 🗄 Deprecated Elastica\Util::getParamName() #1832
    • 🗄 Deprecated all Processor class names in favor of suffixed class names #1893
    • 🗄 Deprecated Match query class and introduced MatchQuery instead for PHP 8.0 compatibility reason #1799
    • ⚡️ Deprecated version/version_type options (deprecated in 6.7.0) and added if_seq_no / if_primary_term that replaced it
    • 🗄 Deprecated passing bool or null as 2nd argument to Elastica\Index::create() #1828 ### ✂ Removed
    • ✂ Removed HHVM proxy detection #1818 ### 🛠 Fixed
    • 🛠 Fixed issue 1789
    • 🛠 Fixed type-hint for Elastica\QueryBuilder\DSL\Aggregation::sampler() not consistent with the underlying constructor call #1815
    • 🛠 Fixed Elastica\Util::toSnakeCase() with first letter being lower cased #1831
    • 🛠 Fixed handling precision as string in Elastica\Aggregation\GeohashGrid::setPrecision() #1884
    • 🛠 Fixed calling Elastica\Aggregation\Composite::addAfter() with the null value 1877
    • Replaced _routing and _retry_on_conflict by routing and retry_on_conflict in AbstractUpdateAction #1807
  • v7.0.0 Changes

    June 10, 2020

    🚀 This is the first non beta release in the 7.0 cycle. Please check all the previous beta release changelogs for breaking changes.

    ➕ Added

    • ➕ Added Elastica\Aggregation\WeightedAvg aggregation #1770

    🔄 Changed

    • ➕ Added missing Response information to Bulk/ResponseSet #1776
  • v7.0.0-beta.4 Changes

    March 23, 2020

    Backward Compatibility Breaks

    • If you're NOT using composer to manage your libraries: the root directory of the library's source code moved from lib/Elastica/ to src/.
    • The Wildcard::setValue() changed its signature: use it to set the value of the wildcard query only.
    • The Wildcard Query's constructor now requires the name and value properties.
    • The Terms Query's constructor now requires the field and terms properties.

    ➕ Added

    • ➕ Added AbstractTermsAggregation::setIncludeAsExactMatch() #1766
    • ➕ Added AbstractTermsAggregation::setExcludeAsExactMatch() #1766
    • ➕ Added AbstractTermsAggregation::setIncludeWithPartitions() #1766
    • ➕ Added Elastica\Reindex->setPipeline(Elastica\Pipeline $pipeline): void. The link between the reindex and the pipeline is solved when run() is called, and thus the pipeline given doesn't need to be created before calling setPipeline() #1752
    • ➕ Added Elastica\Reindex->setRefresh(string $value): void. It accepts REFRESH_* constants from its class #1752 and #1758
    • ➕ Added Elastica\Reindex->setQuery(Elastica\Query\AbstractQuery $query): void #1752
    • Added constants PIPELINE, REFRESH_TRUE, REFRESH_FALSE, REFRESH_WAIT_FOR, SLICES and SLICES_AUTO to Elastica\Reindex #1752
    • ➕ Added Elastica\Pipeline->getId(): ?string #1752
    • ➕ Added Elastica\Aggregation\ExtendedStatsBucket aggregation #1756

    🔄 Changed

    • 🔄 Changed Terms::setTerms() signature: it now accepts a list of strings only #1765
    • 🔄 Changed Terms::setTermsLookup() signature: index, path and id are now required arguments #1765
    • 🔄 Changed Wildcard::setValue() and constructor's signature: added more specific Wildcard::setBoost() and Wildcard::setRewrite methods
    • ⚡️ Updated PHP coding standards to adhere to PSR-12 #1760
    • ⚡️ Updated to PHPUnit v8.5 #1759
    • ♻️ Refactored code structure: use src/ and tests/ folders #1755
    • 🛠 Require elastica-php library >= v7.1.1, fixes an issue on Ingestion/Put() type-hinting
    • 🛠 Require guzzle >= v6.3 as development library: fixes issues on PHP >= 7.2
    • 🗄 Require phpunit >= v7.5, fixes deprecations in with PHP 7.3
    • 👻 Scroll is now throwing an exception when calling current() on an invalid iteration: always call valid() before
      📚 accessing the current item, as documented in PHP's Iterator documentation #1749

    ✂ Removed

    • ✂ Removed unsupported flags from AbstractTermsAggregation::setInclude() #1766
    • ✂ Removed unsupported flags from AbstractTermsAggregation::setExclude() #1766
    • 🚚 Terms::setMinimumMatch() has been removed as not supported by ES 7.x
  • v7.0.0-beta.3 Changes

    January 16, 2020
    • Marked Elastica 5.x as unmaintained

    🛠 Bugfixes

    • 🛠 Fix Search::count() not counting all results #1746
    • Fixed handling of Search::OPTION_SEARCH_IGNORE_UNAVAILABLE inside Scroll object

    ➕ Added

    • ➕ Added DiversifiedSampler aggregation #1735
    • ➕ Added \Elastica\Query\DistanceFeature #1730
    • ➕ Added support for injecting a callable AWS credential provider to use static, cached, or custom-sourced credentials #1667

    👌 Improvements

    • 🚀 Scroll releases previous ResultSet from memory before calling ES for next data batch #1740
  • v7.0.0-beta2 Changes

    December 10, 2019

    Backward Compatibility Breaks

    • The method Index::deleteById() does not throw an NotFoundException when deleting a non-existing document #1732
    • 🚚 The class \Elastica\QueryBuilder\Version\Version240 has been moved to \Elastica\QueryBuilder\Version\Version700 #1693
    • ⬇️ Dropped support for PHP 7.1 #1703

    🛠 Bugfixes

    • Renamed \Elastica\Suggest\Term deprecated option prefix_len to prefix_length #1707
    • The \Elastica\Query\GeoPolygon::count() method now returns the count of points passed to the filter #1696
    • 🛠 Fix issue in \Elastica\Client::request() which causes request data to not be sent to the logger #1682

    ➕ Added

    • Added geo_bounding_box, geo_polygon, match_phrase, match_phrase_prefix, match_none to \Elastica\QueryBuilder\Version\Version700 #1702
    • ➕ Added \Elastica\ResultSet::getTotalHitsRelation() to get relation for total hits #1694
    • ➕ Added Sampler aggregation #1688

    👌 Improvements

    • ✅ Launched tests with PHP 7.4 #1704
    • ✅ Launched local tests with PHP 7.2 by default #1725
    • Added nullable_type_declaration_for_default_null_value, no_alias_functions CS rules #1706
    • 🔧 Configured visibility_required CS rule for constants #1723
    • ➕ Added Collapse DSL to QueryBuilder #1724
  • v7.0.0-beta1 Changes

    October 31, 2019

    🚀 This is our first release in the 7.x cycle. It is compatible with Elasticsearch 7.x. Please review the breaking changes carefully. Most of them are related to the type removal in Elasticsearch.

    Backward Compatibility Breaks

    • The \Elastica\Query::$_suggest property has been renamed to $hasSuggest and is now private, it should not be used from extending classes #1679
    • \Elastica\Document expects a string as ID, not an int #1672.
    • ✂ Removed \Elastica\Query\GeohashCell query, use \Elastica\Query\GeoBoundingBox instead #1672.
    • 🗄 Deprecated usage of \Elastica\Type class, \Elastica\Index class must be used instead #1666
    • ✂ Removed \Elastica\Type class, \Elastica\Index class must be used instead #1666
    • 👮 Forced index names to string in \Elastica\Index::__construct() #1666
    • ✂ Removed Type query \Elastica\Query\Type #1666
    • ✂ Removed Elastica\Type class, Elastica\Index class must be used instead #1666
    • ✂ Removed type handling from Elastica\Search class #1666
    • ✂ Removed type handling from Elastica\Bulk and Elastica\Bulk\Action classes #1666
    • 👮 Forced index names to string in Elastica\Index::__construct() #1666
    • ✂ Removed Type query Elastica\Query\Type #1666
    • ⬇️ Dropped support for PHP 7.0
    • ⚡️ \Elastica\AbstractUpdateAction::getOptions( $fields ) no longer supports the $underscore parameter, option names must match what elasticsearch expects.
    • ✂ Removed no longer supported \Elastica\Query\QueryString::setAutoGeneratePhraseQueries( $bool ) #1622
    • Replaced params._agg with state context variable in scripted metric aggregations
    • Camel Case and underscore parameters deprecated in 6.x have been removed
    • The parameter fields deprecated in 6.x has been removed from Bulk requestedit and Update request.
    • 🚚 The _parent field has been removed in favour of the join field.
    • hits.total is now an object in the search response hits.total
    • Elastica\Reindex does not return an Index anymore but a Response.
    • Elastica\Reindex->run() does not refresh the new Index after completion anymore. Use $reindex->setParam(Reindex::REFRESH, 'wait_for') instead.
    • 0️⃣ Elastica\Search->search() and Elastica\Search->count() use request method POST by default. Same for Elastica\Index, Elastica\Type\AbstractType, Elastica\Type.
    • Elastica\Client $_config field is now a ClientConfiguration instead of an array
    • ✂ Removed \Elastica\Client::_log, \Elastica\Log and the log configuration option. Use the Psr\Log\LoggerInterface $logger client argument to customize logging.
    • 🔄 Changed all factory methods to make use of late static bindings by using static instead of self keyword. This is to increase extendability for classes with factory methods.

    🛠 Bugfixes

    • 👍 Always set the Guzzle base_uri to support connecting to multiple ES hosts. #1618
    • 📇 Properly handle underscore prefixes in options and bulk request metadata (cf upstream. #1621
    • Preserve zeros while doing float serialization to JSON. #1635
    • ➕ Add settings level on json to create an Index in all tests (it worked till 6.x but it shouldn't work)

    ➕ Added

    • 👌 support for elasticsearch-php 7.0
    • ➕ Added ParentAggregation #1616
    • Elastica\Reindex missing options (script, remote, wait_for_completion, scroll...)
    • ➕ Added AdjacencyMatrix aggregation #1642
    • ➕ Added request method parameter to Elastica\SearchableInterface->search() and Elastica\SearchableInterface->count(). Same for Elastica\Search#1441
    • ➕ Added support for Field Collapsing (Issue: #1392; PR: #1653)
    • 👌 Support string DSN in \Elastica\Client constructor for config argument #1640
    • 🔧 Move Client configuration in a dedicated class
    • ➕ Added callable type hinting to $callback in Client constructor. #1659
    • ➕ Added setTrackTotalHits method to Elastica\Query#1663
    • 👍 Allow metadata to be set on Aggregations (via AbstractAggregation::setMeta(array)). #1677

    👌 Improvements

    • Added native_function_invocation CS rule #1606
    • ✅ Elasticsearch test version changed from 6.5.2 to 6.6.1 #1620
    • Clear scroll context also when empty page was received #1660
  • v6.1.1 Changes

    January 29, 2019

    ➕ Added

    • The preferred type name is _doc, so that index APIs have the same path as they will have in 7.0
    • ➕ Added BucketSelector aggregation #1554
    • ➕ Added DerivativeAggregation #1553
    • The preferred type name is _doc, so that index APIs have the same path as they will have in 7.0
    • 👕 Introduced new version of PHP-CS-Fixer and new Lint travis step. #1555
    • ➕ Added typed_keys support for Search queries #1603

    👌 Improvements

    • ⬇️ Reduced memory footprint of response by not keeping the raw JSON data when JSON after JSON has been parsed. #1588

    🗄 Deprecated

    • Index templates use index_patterns instead of template
  • v6.1.0 Changes

    Backward Compatibility Breaks

    • Made result sets adhere to \Iterator interface definition that they implement. Specifically, you need to call valid() on the result set before calling current(). When using foreach this is done by PHP automatically. When valid returns false, the return value of current is undefined instead of false. #1506
      • \Elastica\ResultSet::next returns void instead of \Elastica\Result|false
      • \Elastica\Bulk\ResponseSet::current returns \Elastica\Bulk\Response instead of \Elastica\Bulk\Response|false
      • \Elastica\Multi\ResultSet::current returns \Elastica\ResultSet instead of \Elastica\ResultSet|false

    ➕ Added

    • ➕ Added a transport class for mocking a HTTP 403 error codes, useful for testing response failures in inheriting clients #1529
    • Field param for Elastica\Query\FunctionScore::addRandomScoreFunction #1529
    • Index Recovery : the indices recovery API provides insight into on-going index shard recoveries. It was never been implemented into Elastica. #1537
    • ➕ add parent_id (reference #1518) in QueryBuilder. [#1533](#1518)
    • implemented string_distance option in Term Suggestion #1543

    👌 Improvements

    • 🗄 Using Elastica\Query\FunctionScore::addRandomScoreFunction without $field parameter is deprecated since ES 6.0 and will fail since ES 7.0 #1522
    • ⚡️ Aggreation\Percentiles updated to a newer version of the Algorithm (T-Digest 3.2) and Percentiles results changed a bit Have a look at here, so updated tests in order not to fail. [#1531](#1352)
    • ⚡️ Aggregation\Percentiles have been updated since Elasticsearch 2.3. In this version compression, HDR histogram changed their implementations. The missing field has never been implemented. #1532

    Before

        "compression" : 200,
        "method" : "hdr",
        "number_of_significant_value_digits" : 3
    

    Now

        "tdigest": {
          "compression" : 200
        },
        "hdr": {
          "number_of_significant_value_digits" : 3
        }
    
  • v6.0.2 Changes

    ➕ Added

    • ➕ Added support for pipeline when indexing document. #1455
    • ➕ Added support for multiple bucket sort orders for aggregations. #1480
    • ➕ Added basic support for the Elasticsearch Task Api
    • ➕ Added updateByQuery endpoint. #1499

    👌 Improvements

    • 🗄 Use source script field instead of deprecated (since ES 5.6) inline field. #1497
    • ⚡️ Updated Elasticsearch testing version to 6.2.4. #1501