diff --git a/composer.json b/composer.json index a0dd2fba91..041f901b43 100644 --- a/composer.json +++ b/composer.json @@ -15,11 +15,11 @@ ], "homepage": "http://elastica.io/", "require": { - "php": "^7.2 || ^8.0", + "php": "^8.1", "ext-json": "*", - "elasticsearch/elasticsearch": "^7.1.1", + "elasticsearch/elasticsearch": "^9.3", "nyholm/dsn": "^2.0.0", - "psr/log": "^1.0 || ^2.0 || ^3.0", + "psr/log": "^2.0 || ^3.0", "symfony/deprecation-contracts": "^2.2 || ^3.0", "symfony/polyfill-php73": "^1.19", "marc-mabe/php-enum": "^4.7" @@ -51,5 +51,10 @@ "branch-alias": { "dev-master": "7.0.x-dev" } + }, + "config": { + "allow-plugins": { + "php-http/discovery": true + } } } diff --git a/docker/docker-compose.es.yml b/docker/docker-compose.es.yml index 5cc514b768..c00e2b0a74 100644 --- a/docker/docker-compose.es.yml +++ b/docker/docker-compose.es.yml @@ -1,48 +1,51 @@ version: '3.4' services: - es01: - image: &image docker.elastic.co/elasticsearch/elasticsearch:${ES_VERSION:-7.15.2} - command: &command > - /bin/sh -c "./bin/elasticsearch-plugin list | grep -q ingest-attachment - || ./bin/elasticsearch-plugin install --batch ingest-attachment; - chown elasticsearch /usr/share/elasticsearch/repository; - /usr/local/bin/docker-entrypoint.sh" - environment: &environment - node.name: es01 - cluster.name: es-docker-cluster - cluster.initial_master_nodes: es01 - discovery.seed_hosts: es01 - bootstrap.memory_lock: 'true' - ES_JAVA_OPTS: -Xms512m -Xmx512m - path.repo: /usr/share/elasticsearch/repository - ulimits: &ulimits - memlock: - soft: -1 - hard: -1 - volumes: - - data01:/usr/share/elasticsearch/data - - esrepo:/usr/share/elasticsearch/repository - ports: - - 9200:9200 - networks: &networks - - elastic - es02: - image: *image - command: *command - environment: - <<: *environment - node.name: es02 - ulimits: *ulimits - volumes: - - data02:/usr/share/elasticsearch/data - - esrepo:/usr/share/elasticsearch/repository - networks: *networks + es01: + image: &image docker.elastic.co/elasticsearch/elasticsearch:${ES_VERSION:-9.3.0} + command: &command > + /bin/sh -c "./bin/elasticsearch-plugin list | grep -q ingest-attachment + || ./bin/elasticsearch-plugin install --batch ingest-attachment; + chown elasticsearch /usr/share/elasticsearch/repository; + /usr/local/bin/docker-entrypoint.sh" + environment: &environment + node.name: es01 + cluster.name: es-docker-cluster + cluster.initial_master_nodes: es01 + discovery.seed_hosts: es01 + bootstrap.memory_lock: 'true' + ES_JAVA_OPTS: -Xms512m -Xmx512m + path.repo: /usr/share/elasticsearch/repository + xpack.security.enabled: "false" + xpack.security.transport.ssl.enabled: "false" + action.destructive_requires_name: "false" + ulimits: &ulimits + memlock: + soft: -1 + hard: -1 + volumes: + - data01:/usr/share/elasticsearch/data + - esrepo:/usr/share/elasticsearch/repository + ports: + - 9200:9200 + networks: &networks + - elastic + es02: + image: *image + command: *command + environment: + <<: *environment + node.name: es02 + ulimits: *ulimits + volumes: + - data02:/usr/share/elasticsearch/data + - esrepo:/usr/share/elasticsearch/repository + networks: *networks volumes: - data01: - data02: - esrepo: + data01: + data02: + esrepo: networks: - elastic: - driver: bridge + elastic: + driver: bridge diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index d038053d76..f275e7c11a 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.2-fpm-alpine +FROM php:8.1-fpm-alpine COPY --from=composer /usr/bin/composer /usr/bin/composer diff --git a/phpunit.xml.dist b/phpunit.xml.dist index b06aa1d0b3..60baefba98 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,27 +2,27 @@ - - - src/ - - src/Query/Match.php - - - - - - - - - tests/ - - + + + src/ + + + src/Query/Match.php + + + + + + + + tests/ + + diff --git a/src/ApiVersion.php b/src/ApiVersion.php index debc830a6f..a8a7e922f1 100644 --- a/src/ApiVersion.php +++ b/src/ApiVersion.php @@ -7,4 +7,6 @@ class ApiVersion public const API_VERSION_6 = 6; public const API_VERSION_7 = 7; + + public const API_VERSION_9 = 9; } diff --git a/src/ElasticSearchVersion.php b/src/ElasticSearchVersion.php index 42d015bc1b..0b05597d0d 100644 --- a/src/ElasticSearchVersion.php +++ b/src/ElasticSearchVersion.php @@ -12,4 +12,6 @@ class ElasticSearchVersion extends Enum public const VERSION_6 = 6; public const VERSION_7 = 7; + + public const VERSION_9 = 9; } diff --git a/src/Elasticsearch/Endpoints/Update.php b/src/Elasticsearch/Endpoints/Update.php deleted file mode 100644 index cea30ce4ba..0000000000 --- a/src/Elasticsearch/Endpoints/Update.php +++ /dev/null @@ -1,21 +0,0 @@ -