Skip to content
Closed
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
11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Comment on lines +18 to 21
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing src/Elasticsearch/Endpoints/Update.php appears to break the codebase: src/Client.php still imports Elastica\Elasticsearch\Endpoints\Update and instantiates it in Client::updateDocument(). This will lead to a class-not-found/autoload error unless the client code is updated (e.g., to use the upstream Elasticsearch\Endpoints\Update) or the wrapper is kept.

Copilot uses AI. Check for mistakes.
"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"
Expand Down Expand Up @@ -51,5 +51,10 @@
"branch-alias": {
"dev-master": "7.0.x-dev"
}
},
"config": {
"allow-plugins": {
"php-http/discovery": true
}
}
}
87 changes: 45 additions & 42 deletions docker/docker-compose.es.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
44 changes: 22 additions & 22 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@

<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/8.5/phpunit.xsd"
colors = "true"
beStrictAboutOutputDuringTests = "true"
verbose = "true"
bootstrap = "vendor/autoload.php"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
colors = "true"
beStrictAboutOutputDuringTests = "true"
verbose = "true"
bootstrap = "vendor/autoload.php"
Comment on lines +5 to +10
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xsi:noNamespaceSchemaLocation points to the PHPUnit 9.5 schema, but composer.json currently allows PHPUnit ^9.4. If Composer resolves to 9.4.x, XML schema validation can fail or the config may not match the supported elements/attributes. Consider aligning these by either bumping the PHPUnit dev requirement to ^9.5 or using the matching schema URL for the supported PHPUnit version.

Copilot uses AI. Check for mistakes.
>
<filter>
<whitelist>
<directory>src/</directory>
<exclude>
<file>src/Query/Match.php</file>
</exclude>
</whitelist>
</filter>
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
</listeners>
<testsuites>
<testsuite name="default">
<directory>tests/</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory>src/</directory>
</include>
<exclude>
<file>src/Query/Match.php</file>
</exclude>
</coverage>
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
</listeners>
<testsuites>
<testsuite name="default">
<directory>tests/</directory>
</testsuite>
</testsuites>
</phpunit>
2 changes: 2 additions & 0 deletions src/ApiVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ class ApiVersion
public const API_VERSION_6 = 6;

public const API_VERSION_7 = 7;

public const API_VERSION_9 = 9;
}
2 changes: 2 additions & 0 deletions src/ElasticSearchVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ class ElasticSearchVersion extends Enum
public const VERSION_6 = 6;

public const VERSION_7 = 7;

public const VERSION_9 = 9;
}
21 changes: 0 additions & 21 deletions src/Elasticsearch/Endpoints/Update.php

This file was deleted.

Loading