DE-159650: Upgrade Elasticsearch dependency to v9.3.0 and update Docker and phpunit config#19
Conversation
…ocker config and phpstan baseline
There was a problem hiding this comment.
Pull request overview
Upgrades the project’s Elasticsearch PHP client and related tooling/configuration to support Elasticsearch v9.3.0, including local Docker infrastructure and version constants used across the codebase.
Changes:
- Bumps
elasticsearch/elasticsearchrequirement to^9.3and raises the minimum PHP version to^8.1(plus Composer plugin allow-listing). - Updates local Docker setup to run a 2-node Elasticsearch v9.3.0 cluster and updates the PHP Docker base image.
- Updates PHPUnit configuration schema/coverage configuration and adds v9 constants for API/Elasticsearch version handling.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
composer.json |
Updates PHP + Elasticsearch client constraints; adds Composer allow-plugins config. |
docker/docker-compose.es.yml |
Moves local ES cluster image default to 9.3.0 and adds v9-oriented env config. |
docker/php/Dockerfile |
Updates local PHP container base image to PHP 8.1. |
phpunit.xml.dist |
Migrates config to PHPUnit 9.x schema/coverage format. |
src/ApiVersion.php |
Adds API_VERSION_9 constant. |
src/ElasticSearchVersion.php |
Adds VERSION_9 constant. |
src/Elasticsearch/Endpoints/Update.php |
Removes the custom Update endpoint wrapper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "php": "^8.1", | ||
| "ext-json": "*", | ||
| "elasticsearch/elasticsearch": "^7.1.1", | ||
| "elasticsearch/elasticsearch": "^9.3", | ||
| "nyholm/dsn": "^2.0.0", |
There was a problem hiding this comment.
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.
| 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" |
There was a problem hiding this comment.
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.
Description: Upgrade elasticsearch/elasticsearch dependency from v7 to v9.3.0 and update supporting infrastructure
Possible impact: composer dependencies, Docker ES cluster config, phpunit config, ES version constants
Summary
elasticsearch/elasticsearchfrom v7 to v9.3.0 incomposer.jsondocker/docker-compose.es.ymlto a 2-node ES v9 clusterdocker/php/DockerfilePHP versionphpunit.xml.distfor ES v9 test groupsApiVersion::API_VERSION_9constant tosrc/ApiVersion.phpsrc/ElasticSearchVersion.phpsrc/Elasticsearch/Endpoints/Update.php(no longer needed in v9)Stacked PRs (1/9)
Test Plan
composer installsucceeds with new elasticsearch v9.3.0 dependency🤖 Generated with Claude Code