Skip to content

DE-159650: Upgrade Elasticsearch dependency to v9.3.0 and update Docker and phpunit config#19

Closed
sumitkhopade1986 wants to merge 1 commit intoopensearchfrom
DE-159650-upgrade-elasticsearch-infra-deps
Closed

DE-159650: Upgrade Elasticsearch dependency to v9.3.0 and update Docker and phpunit config#19
sumitkhopade1986 wants to merge 1 commit intoopensearchfrom
DE-159650-upgrade-elasticsearch-infra-deps

Conversation

@sumitkhopade1986
Copy link
Copy Markdown

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

  • Upgrades elasticsearch/elasticsearch from v7 to v9.3.0 in composer.json
  • Updates docker/docker-compose.es.yml to a 2-node ES v9 cluster
  • Updates docker/php/Dockerfile PHP version
  • Updates phpunit.xml.dist for ES v9 test groups
  • Adds ApiVersion::API_VERSION_9 constant to src/ApiVersion.php
  • Adds ES v9 version constant to src/ElasticSearchVersion.php
  • Removes deprecated src/Elasticsearch/Endpoints/Update.php (no longer needed in v9)

Stacked PRs (1/9)

Base: opensearchThis PRconnectionindex-apiclient-bulksecondary-srctests-bulktests-multi-aggregationtests-transporttests-remaining

Test Plan

  • composer install succeeds with new elasticsearch v9.3.0 dependency
  • Docker Compose ES cluster starts correctly with v9 image
  • CI phpunit unit tests pass

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 27, 2026 14:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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/elasticsearch requirement to ^9.3 and 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.

Comment thread composer.json
Comment on lines +18 to 21
"php": "^8.1",
"ext-json": "*",
"elasticsearch/elasticsearch": "^7.1.1",
"elasticsearch/elasticsearch": "^9.3",
"nyholm/dsn": "^2.0.0",
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.
Comment thread phpunit.xml.dist
Comment on lines +5 to +10
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"
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants