Download the PHP package wa72/elasticsearch-bundle without Composer

On this page you can find all versions of the php package wa72/elasticsearch-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package elasticsearch-bundle

Wa72\ElasticsearchBundle

Tests

Symfony-bundle for working with Elasticsearch or OpenSearch.

Goals and Features:

Supported search engines

Each project uses exactly one search engine. Install the bundle together with the client library for that engine:

Engine Composer packages Client class
Elasticsearch 6.8 / 7.17 composer require wa72/elasticsearch-bundle elasticsearch/elasticsearch:"^6.8.4\|^7.17" Elasticsearch\Client
Elasticsearch 8.19 / 9.x composer require wa72/elasticsearch-bundle elasticsearch/elasticsearch:"^8.19\|^9.0" Elastic\Elasticsearch\Client
OpenSearch 2.x / 3.x composer require wa72/elasticsearch-bundle opensearch-project/opensearch-php:^2.7 OpenSearch\Client

For Elasticsearch, the bundle detects the installed client generation (6/7 or 8/9) automatically.

Configuration

Example for OpenSearch:

The OpenSearch client supports only one host. For multi-host setups use the client_service option.

HTTP client

OpenSearch and Elasticsearch 8/9 clients use a PSR-18 HTTP client:

Elasticsearch 6/7 clients always use their built-in Guzzle RingPHP handler, so the setting is ignored there.

Using your own client service

The bundle only configures the hosts. If you need authentication, SSL settings, a scoped Symfony HTTP client or other transport options, define the client service yourself and point client_service to it:

In this case the bundle does not build a client, and elasticsearch.client is an alias of your service.

Services

Console commands

Running the tests

Most tests do not need a search server. They check the configuration, the service definitions, the client factory and the console commands in a booted Symfony application.

The integration tests in tests/Integration need a running server compatible with the installed client. Select the engine with SEARCH_ENGINE (elasticsearch (default) or opensearch) and the server with ES_HOST (default: localhost:9200). If the server is not available, these tests are skipped (or fail if CI is set). All indices created by the tests start with wa72_bundle_test_ and are deleted afterwards.

For example, to test Elasticsearch 9:

To test OpenSearch:

GitHub Actions

The workflow .github/workflows/tests.yml runs the tests with PHP 8.3, 8.4 and 8.5 against Elasticsearch 6.8, 7.17, 8.19 and 9.5 and OpenSearch 2.19 and 3.9 with Symfony 7.4. Two additional jobs use Symfony 6.4. Each job installs only the client for its engine.

Run the workflow locally with nektos/act. Use a recent version of act: older versions (e.g. 0.2.52) do not support actions running on node24, such as the current shivammathur/setup-php.

When working behind an HTTP proxy, pass the proxy settings to the job containers, e.g. act push -j test --env https_proxy=$https_proxy --env http_proxy=$http_proxy --env no_proxy=localhost,127.0.0.1,search.


All versions of elasticsearch-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8
wa72/es-tools Version ^0.3
symfony/config Version ^6.4|^7
symfony/console Version ^6.4|^7
symfony/dependency-injection Version ^6.4|^7
symfony/http-kernel Version ^6.4|^7
symfony/http-client Version ^6.4|^7
nyholm/psr7 Version ^1.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wa72/elasticsearch-bundle contains the following files

Loading the files please wait ...