From cebd7f8d38fcd0fdb7848c3e2576c61b5a3cc666 Mon Sep 17 00:00:00 2001 From: Lukasz Cybula Date: Wed, 15 Apr 2026 11:59:12 +0200 Subject: [PATCH 1/2] Allowed doctrine/doctrine-bundle ^3.0 --- composer.json | 2 +- tests/Bundle/DataSourceBundle/Fixtures/TestKernel.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 918d377..f5c0270 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "ext-dom": "*", "doctrine/collections": "^1.7|^2.0", "doctrine/dbal": "^3.4|^4.0", - "doctrine/doctrine-bundle": "^2.4", + "doctrine/doctrine-bundle": "^2.4|^3.0", "doctrine/orm": "^2.14|^3.0", "doctrine/persistence": "^2.4|^3.0|^4.0", "friendsofsymfony/elastica-bundle": "^6.3", diff --git a/tests/Bundle/DataSourceBundle/Fixtures/TestKernel.php b/tests/Bundle/DataSourceBundle/Fixtures/TestKernel.php index d10a020..d83fabb 100644 --- a/tests/Bundle/DataSourceBundle/Fixtures/TestKernel.php +++ b/tests/Bundle/DataSourceBundle/Fixtures/TestKernel.php @@ -102,7 +102,6 @@ protected function configureContainer(ContainerBuilder $configuration, LoaderInt 'logging' => false ], 'orm' => [ - 'auto_generate_proxy_classes' => true, 'naming_strategy' => 'doctrine.orm.naming_strategy.underscore_number_aware', 'mappings' => [ 'datasource_bundle' => [ From d6d84d40a2ad99c93902dd14546f4bffb0217896 Mon Sep 17 00:00:00 2001 From: Lukasz Cybula Date: Thu, 14 May 2026 16:55:51 +0200 Subject: [PATCH 2/2] Test on ES 8 on PHP 8.4 and 8.5 --- .github/workflows/ci.yml | 13 ++++++++++++- composer.json | 4 ++-- .../DataSourceBundle/Fixtures/TestKernel.php | 16 +++++++++++++--- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84e8ba4..50eeadb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,17 @@ jobs: strategy: matrix: php-version: [8.1, 8.2, 8.3, 8.4, 8.5] + include: + - php-version: 8.1 + elasticsearch-version: 7.17.8 + - php-version: 8.2 + elasticsearch-version: 7.17.8 + - php-version: 8.3 + elasticsearch-version: 7.17.8 + - php-version: 8.4 + elasticsearch-version: 8.11.3 + - php-version: 8.5 + elasticsearch-version: 8.11.3 runs-on: ubuntu-22.04 container: image: fsiopenpl/docker-php-apache:alpine-${{ matrix.php-version }} @@ -23,7 +34,7 @@ jobs: timeout-minutes: 10 services: elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:7.17.8 + image: docker.elastic.co/elasticsearch/elasticsearch:${{ matrix.elasticsearch-version }} ports: - 9200/tcp env: diff --git a/composer.json b/composer.json index f5c0270..22d21aa 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "doctrine/doctrine-bundle": "^2.4|^3.0", "doctrine/orm": "^2.14|^3.0", "doctrine/persistence": "^2.4|^3.0|^4.0", - "friendsofsymfony/elastica-bundle": "^6.3", + "friendsofsymfony/elastica-bundle": "^6.3|^7.0", "fsi/files": "^2.0.2|^3.0", "gedmo/doctrine-extensions": "^3.5", "nyholm/psr7": "^1.8", @@ -35,7 +35,7 @@ "phpstan/phpstan-phpunit": "^2.0", "phpunit/phpunit": "^10.5", "psr/http-client": "^1.0", - "ruflin/elastica": "^7.2", + "ruflin/elastica": "^7.2|^8.0", "seec/phpunit-consecutive-params": "^1.1.1", "squizlabs/php_codesniffer": "^4.0", "symfony/browser-kit": "^4.4.30|^5.4|^6.0|^7.0", diff --git a/tests/Bundle/DataSourceBundle/Fixtures/TestKernel.php b/tests/Bundle/DataSourceBundle/Fixtures/TestKernel.php index d83fabb..cff28f2 100644 --- a/tests/Bundle/DataSourceBundle/Fixtures/TestKernel.php +++ b/tests/Bundle/DataSourceBundle/Fixtures/TestKernel.php @@ -115,12 +115,22 @@ protected function configureContainer(ContainerBuilder $configuration, LoaderInt ] ]); - $configuration->loadFromExtension('fos_elastica', [ - 'clients' => [ + if (InstalledVersions::getVersion('friendsofsymfony/elastica-bundle') >= '7.0.0') { + $clients = [ + 'default' => [ + 'hosts' => ['%env(ELASTICSEARCH_URL)%/'], + ], + ]; + } else { + $clients = [ 'default' => [ 'url' => '%env(ELASTICSEARCH_URL)%/', ], - ], + ]; + } + + $configuration->loadFromExtension('fos_elastica', [ + 'clients' => $clients, 'indexes' => [ 'news' => [ 'use_alias' => true,