Skip to content
Open

V3 #5

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ 7.4, 8.0 ]
php: [ 8.1 ]

env:
ES_URL: http://127.0.0.1:9200
Expand Down
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ concurrency framework.

**Required PHP Version**

- PHP 7.4
- PHP 8.0
- PHP 8.1+

**Installation**

Expand All @@ -21,12 +20,10 @@ composer require webgriffe/amp-elasticsearch
Just create a client instance and call its public methods which returns promises:

```php
Loop::run(function () {
$client = new Webgriffe\AmpElasticsearch\Client('http://my.elasticsearch.test:9200');
yield $this->client->createIndex('myindex');
$response = yield $this->client->indexDocument('myindex', '', ['testField' => 'abc']);
echo $response['result']; // 'created'
});
$client = new Webgriffe\AmpElasticsearch\Client('http://my.elasticsearch.test:9200');
$client->createIndex('myindex');
$response = $client->indexDocument('myindex', '', ['testField' => 'abc']);
echo $response['result']; // 'created'
```

See other usage examples in the [`tests/Integration/ClientTest.php`](./tests/Integration/ClientTest.php).
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"description": "A non-blocking ElasticSearch client for PHP based on Amp.",
"license": "MIT",
"require": {
"php": "~7.4.0|~8.0.0",
"php": ">=8.1",
"ext-json": "*",
"amphp/http-client": "^4.5",
"amphp/amp": "^2.1"
"amphp/http-client": "^v5.0",
"amphp/amp": "^v3.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.7'

services:
php:
image: "php:8.0"
image: "php:8.1"
volumes:
- "./:/app"
working_dir: "/app"
Expand Down
Loading