This changelog references the relevant changes (bug and security fixes) done in 7.x versions.
- Added priority flag for index templates.
- Added Elasticsearch 9 and Elastica 9 support.
headersclient config is now applied viaTransport::setHeader()so it works uniformly across Guzzle, Symfony HTTP Client, and elastic-transport's bundled Curl client.timeoutclient config is now translated toCURLOPT_TIMEOUTat runtime when the active transport client is elastic-transport's bundled Curl — Guzzle/Symfony HTTP Client keep consuming the original'timeout'key as before.- Default config no longer injects
'headers' => []/'timeout' => 30intohttp_client_options, which would otherwise break elastic-transport's bundled Curl client (PHP 8+ValueErroron unknowncurl_setopt_arraykeys). - Deprecated the top-level
headersandtimeoutclient config. Move them intoclient_options— for Guzzle/Symfony HTTP Client useheaders/timeout, for the bundled Curl client useCURLOPT_HTTPHEADER/CURLOPT_TIMEOUT. - Fix deprecated Symfony method call.
- Instantiate custom repositories using the DI service locator.
- Add compatibility with
doctrine/doctrine-bundle3.x,doctrine/phpcr-odm3.x and Symfony 8.0 in highest-deps CI. - Raise minimum versions of
doctrine/doctrine-bundle(^2.5),doctrine/orm(^2.17) andjms/serializer-bundle(^5.4) to fix lowest-deps CI.
- Added Symfony 8.0 support.
- Added PHP 8.5 test coverage.
- Dropped Symfony 7.1, 7.2 and 7.3 support.
- Dropped support for PHP 7.4 and PHP 8.0.
- Dropped support for Symfony 5.4.
- [BC break] Method
FOS\ElasticaBundle\Elastica\Client::requestdoes not exist anymore. Please useFOS\ElasticaBundle\Elastica\Client::sendRequest. - [BC break] Method
FOS\ElasticaBundle\Elastica\Client::getIndexnow returnsFOS\ElasticaBundle\Elastica\Index. - [BC break] Arguments for the service
FOS\ElasticaBundle\Elastica\Clienthave changed. See definition ofFOS\ElasticaBundle\Elastica\Client::__construct. - [BC break] Client configuration now reflects configuration of
Elastica\Client. - [BC break] Index template configuration
index_templateoptiontemplateis renamed toindex_patternsand accepts array of strings. - [BC break] Arguments for the service
FOS\ElasticaBundle\Elastica\Client(fos_elastica.client..) are now named, instead of indexed. - [BC break] Configuration options:
host,port,urlare no longer available and replaced with singlehosts. - [BC break] Configuration options:
proxy,auth_type,aws_*,ssl,curl,persistent,compression,connectTimeoutare no longer available. - [BC break] Configuration
connectionStrategyis renamed toconnection_strategy. - [BC break] Event
PostElasticaRequestEventnow operates withPsr\Http\Message\RequestInterfaceinstead ofElastica\Request. - [BC break] Event
ElasticaRequestExceptionEventnow operates withPsr\Http\Message\RequestInterfaceinstead ofElastica\Request, andElastic\Elasticsearch\Exception\ElasticsearchExceptioninstead ofElastica\Exception\ExceptionInterface.
Main change is the configuration of the bundle:
- There are no
connectionslevel anymore. - Options
host,portandurlare replaced with optionhosts, which accepts array. - SSL configuration is provided within
client_configoption. - Other client options are configurable in
client_options. - Refer to new examples! Elastica HTTP client configuration