elastic / elasticsearch-serverless
PHP Client for Elasticsearch serverless
Installs: 533
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 187
Forks: 0
Open Issues: 0
Requires
- php: ^8.0
- elastic/transport: ^8.7
- guzzlehttp/guzzle: ^7.0
- psr/http-client: ^1.0
- psr/http-message: ^1.0
- psr/log: ^1|^2|^3
Requires (Dev)
- mockery/mockery: ^1.5
- nyholm/psr7: ^1.5
- php-http/message-factory: ^1.1
- php-http/mock-client: ^1.5
- phpstan/phpstan: ^1.4
- phpunit/phpunit: ^9.5
- symfony/finder: ~4.0
- symfony/http-client: ^5.0|^6.0
- symfony/yaml: ^5.0
This package is auto-updated.
Last update: 2025-03-17 12:29:59 UTC
README
Warning
Starting with the release of the Elastic Stack 9.0.0, this client will be discontinued. Instead, you can use the latest version of the Elasticsearch PHP Client to build your Elasticsearch Serverless PHP applications.
This is the official Elastic client for the Elasticsearch Cloud Serverless.
If you're looking to develop your PHP application with the Elasticsearch Stack, you should look at the Elasticsearch Client instead.
Installation
You can install the library using composer with the following command:
composer require elastic/elasticsearch-serverless
Instantiate the client
When you have installed elasticsearch-php you can start using it with the Client
class.
You can use the ClientBuilder
to create this object:
require 'vendor/autoload.php'; use Elastic\Elasticsearch\Serverless\ClientBuilder; $client = ClientBuilder::create() ->setEndpoint('<elasticsearch-endpoint>') ->setApiKey('<api-key>') ->build(); # $client is an object of Elastic\Elasticsearch\Serverless\Client class
Usage
You can read to the official documentation page for a getting started guide.
Development
See CONTRIBUTING.