diff --git a/docs/breaking-changes.asciidoc b/docs/breaking-changes.asciidoc index ea694a855..3a83099c9 100644 --- a/docs/breaking-changes.asciidoc +++ b/docs/breaking-changes.asciidoc @@ -3,24 +3,44 @@ ### E_USER_DEPRECATED notice when using deprecated parameters -Starting from elasticsearch-php 7.4.0, we generate a PHP [E_USER_DEPRECATED](https://www.php.net/manual/en/errorfunc.constants.php) -notice every time you use a deprecated parameters for Elasticsearch. -We decided to add this notice to facilitate the code refactoring with the -new API specification of Elasticsearch (e.g. the usage of typeless APIs, see below). +Starting from elasticsearch-php 7.4.0, we generate a PHP +https://www.php.net/manual/en/errorfunc.constants.php[E_USER_DEPRECATED] notice +every time you use a deprecated parameters for {es}. We decided to add this +notice to facilitate the code refactoring with the new API specification of {es} +(for example the usage of typeless APIs, see below). -### Moving from types to typeless APIs in Elasticsearch 7.0 +From 7.4.1, we mitigated the usage of E_USER_DEPRICATED warning by using the `@` +https://www.php.net/manual/en/language.operators.errorcontrol.php[operator]. The +operator suppresses the error message, however, it is still possible to catch it +by using a custom error handler: -Elasticsearch 7.0 deprecated APIs that accept types, introduced new typeless -APIs, and removed support for the _default_ mapping. Read [this](https://www.elastic.co/blog/moving-from-types-to-typeless-apis-in-elasticsearch-7-0) +[source,php] +---- +set_error_handler(function ($errno, $errstr) { + var_dump($errstr); +}, E_USER_DEPRECATED); + +@trigger_error('Deprecation message here', E_USER_DEPRECATED); +---- + + +### Moving from types to typeless APIs in {es} 7.0 + +{es} 7.0 deprecated APIs that accept types, introduced new typeless APIs, and +removed support for the _default_ mapping. Read +https://www.elastic.co/blog/moving-from-types-to-typeless-apis-in-elasticsearch-7-0[this] blog post for more information. + ### Type hint and return type -Added type hints and return type declarations in all the code base, where possible. -See PR [#897](https://github.com/elastic/elasticsearch-php/pull/897). +Added type hints and return type declarations in all the code base where +possible. See PR https://github.com/elastic/elasticsearch-php/pull/897[#897]. + ### PHP 7.1+ Requirement We require using PHP 7.1+ for elasticsearch-php. PHP 7.0 is not supported since -1st Jan 2019. See [PHP supported version](https://www.php.net/supported-versions.php) for -more information. +1st Jan 2019. Refer +https://www.php.net/supported-versions.php[PHP supported version] for more +information. diff --git a/docs/community.asciidoc b/docs/community.asciidoc index efe5aa08a..cda68eeef 100644 --- a/docs/community.asciidoc +++ b/docs/community.asciidoc @@ -6,38 +6,48 @@ https://github.com/ongr-io/ElasticsearchDSL[Link: ElasticsearchDSL] [quote, ElasticsearchDSL] __________________________ -Introducing Elasticsearch DSL library to provide objective query builder for Elasticsearch bundle and elasticsearch-php client. You can easily build any Elasticsearch query and transform it to an array. +Introducing {es} DSL library to provide objective query builder for {es} bundle +and elasticsearch-php client. You can easily build any {es} query and transform +it to an array. __________________________ + === elasticsearcher https://github.com/madewithlove/elasticsearcher[Link: elasticsearcher] [quote, elasticsearcher] __________________________ -This agnostic package is a lightweight wrapper on top of the Elasticsearch PHP client. Its main goal is to allow for easier structuring of queries and indices in your application. It does not want to hide or replace functionality of the Elasticsearch PHP client. +This agnostic package is a lightweight wrapper on top of the {es} PHP client. +Its main goal is to allow for easier structuring of queries and indices in your +application. It does not want to hide or replace functionality of the {es} PHP +client. __________________________ + === ElasticSearchQueryDSL https://github.com/gskema/elasticsearch-query-dsl-php[Link: ElasticSearchQueryDSL] [quote, ElasticSearchQueryDSL] __________________________ -Feature complete, object oriented, composable, extendable ElasticSearch query DSL builder for PHP. Deliberately built to be as simple as possible, easily usable and with explicit naming. +Feature complete, object oriented, composable, extendable {es} query DSL builder +for PHP. Deliberately built to be as simple as possible, easily usable and with +explicit naming. __________________________ + == Community Integrations === Symfony ==== ONGR Elasticsearch Bundle -https://github.com/ongr-io/ElasticsearchBundle[Link: ONGR Elasticsearch Bundle] +https://github.com/ongr-io/ElasticsearchBundle[Link: ONGR {es} Bundle] -[quote, ONGR Elasticsearch Bundle] +[quote, ONGR {es} Bundle] __________________________ -Elasticsearch Bundle was created in order to serve the need for professional elasticsearch +{es} Bundle was created in order to serve the need for professional {es} integration with enterprise level Symfony 2 systems. This bundle is: - Supported by ONGR.io development team. @@ -46,10 +56,13 @@ integration with enterprise level Symfony 2 systems. This bundle is: Technical goodies: -- Provides nestable and DSL query builder to be executed by type repository services. -- Uses Doctrine-like document / entities document-object mapping using annotations. +- Provides nestable and DSL query builder to be executed by type repository + services. +- Uses Doctrine-like document / entities document-object mapping using + annotations. - Query results iterators are provided for your convenience. -- Registers console commands for index and types management and data import / export. +- Registers console commands for index and types management and data import / + export. - Designed in an extensible way for all your custom needs. __________________________ @@ -60,23 +73,26 @@ https://github.com/FriendsOfSymfony/FOSElasticaBundle[Link: FOS Elastica Bundle] [quote, FOS Elastica Bundle] __________________________ -This bundle provides integration with https://github.com/ruflin/Elastica[Link: Elastica] for Symfony. Features include: +This bundle provides integration with +https://github.com/ruflin/Elastica[Link: Elastica] for Symfony. Features +include: -- Integrates the Elastica library into a Symfony environment -- Automatically generate mappings using a serializer -- Listeners for Doctrine events for automatic indexing +- Integrates the Elastica library into a Symfony environment. +- Automatically generate mappings using a serializer. +- Listeners for Doctrine events for automatic indexing. __________________________ === Drupal -==== Elasticsearch Connector +==== {es} Connector -https://www.drupal.org/project/elasticsearch_connector[Link: Elasticsearch Connector] +https://www.drupal.org/project/elasticsearch_connector[Link: {es} Connector] -[quote, Elasticsearch Connector] +[quote, {es} Connector] __________________________ -Elasticsearch Connector is a set of modules designed to build a full Elasticsearch eco system in Drupal. +{es} Connector is a set of modules designed to build a full {es} eco system in +Drupal. __________________________ === Laravel @@ -87,7 +103,7 @@ https://github.com/shift31/laravel-elasticsearch[Link: shift31/Laravel-Elasticse [quote, Laravel-Elasticsearch] __________________________ -This is a Laravel (4+) Service Provider for the official Elasticsearch low-level client. +This is a Laravel (4+) Service Provider for the official {es} low-level client. __________________________ @@ -97,7 +113,7 @@ https://github.com/cviebrock/laravel-elasticsearch[Link: cviebrock/Laravel-Elast [quote, Laravel-Elasticsearch] __________________________ -An easy way to use the official Elastic Search client in your Laravel applications. +An easy way to use the official {es} client in your Laravel applications. __________________________ @@ -107,7 +123,9 @@ https://github.com/sleimanx2/plastic[Link: Plastic] [quote, Plastic] __________________________ -Plastic is an Elasticsearch ODM and mapper for Laravel. It renders the developer experience more enjoyable while using Elasticsearch, by providing a fluent syntax for mapping, querying, and storing eloquent models. +Plastic is an {es} ODM and mapper for Laravel. It renders the developer +experience more enjoyable while using {es} by providing a fluent syntax for +mapping, querying, and storing eloquent models. __________________________ === Helper @@ -118,7 +136,9 @@ https://github.com/Nexucis/es-php-index-helper[Link: nexucis/es-php-index-helper [quote, Index Helper] _____________________ -This helper is a light library which wrap the official client elasticsearch-php. It will help you to manage your ES Indices with no downtime. -This helper implements the philosophy described in the https://www.elastic.co/guide/en/elasticsearch/guide/master/index-aliases.html[official documentation] -which can be summarized in a few words : *use alias instead of index directly* +This helper is a light library which wrap the official client elasticsearch-php. +It will help you to manage your ES Indices with no downtime. This helper +implements the philosophy described in the +https://www.elastic.co/guide/en/elasticsearch/guide/master/index-aliases.html[official documentation] +which can be summarized in a few words : *use alias instead of index directly*. _____________________