From 1748dbb8ff3a4dbc0ee5c297fc5a988778f1c545 Mon Sep 17 00:00:00 2001 From: eric-zaharia Date: Mon, 23 Mar 2026 16:36:32 +0200 Subject: [PATCH 01/17] chore: migrate from circleci to gh actions --- .github/workflows/ci.yml | 55 +++++++++++++++++++++++++++++++++ phpunit.xml.dist | 2 +- tests/config/algolia_search.yml | 2 +- 3 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..154c482a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,55 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + php: ['8.2', '8.3'] + symfony: ['^7.0'] + + name: PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }} + + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: zip, sqlite3 + coverage: none + + - name: Cache Composer dependencies + uses: actions/cache@v4 + with: + path: vendor + key: composer-deps-${{ matrix.php }}-${{ hashFiles('composer.json') }} + + - name: Install dependencies + run: COMPOSER_MEMORY_LIMIT=-1 composer require "symfony/framework-bundle=${{ matrix.symfony }}" -n --prefer-dist + + - name: Run static analysis + if: matrix.php < '8.3' + run: composer test:install && composer test:types + + - name: Check code styles + if: matrix.php < '8.3' + run: composer test:lint + + - name: Run tests + if: ${{ !github.event.pull_request.head.repo.fork }} + timeout-minutes: 15 + env: + COMPOSER_PROCESS_TIMEOUT: 900 + ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} + ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} + run: composer test:unit diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 685ec4b5..3b5f36ce 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -17,7 +17,7 @@ - + diff --git a/tests/config/algolia_search.yml b/tests/config/algolia_search.yml index d822f746..7e9d86d0 100644 --- a/tests/config/algolia_search.yml +++ b/tests/config/algolia_search.yml @@ -1,5 +1,5 @@ algolia_search: - prefix: '%env(ALGOLIA_PREFIX)%%env(CIRCLE_BUILD_NUM)%_' + prefix: '%env(ALGOLIA_PREFIX)%%env(GITHUB_RUN_NUMBER)%_' nbResults: 12 batchSize: 100 settingsDirectory: '/tests/cache/settings' From ecec463ed1b05f8bfb68c051f4f65c405d896b31 Mon Sep 17 00:00:00 2001 From: eric-zaharia Date: Mon, 23 Mar 2026 16:47:54 +0200 Subject: [PATCH 02/17] fix: remove deprecated TreeBuilder::root() --- phpstan.neon.dist | 1 - src/DependencyInjection/Configuration.php | 11 ++--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 0919687e..47f8ec7e 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -15,7 +15,6 @@ parameters: - '#Method Algolia\\SearchBundle\\DependencyInjection\\AlgoliaSearchExtension::load\(\) has a parameter .* with a type declaration of Symfony\\Component\\DependencyInjection\\ContainerBuilder, but containers should not be injected.#' - '#(Method|Function|Constructor).*has parameter.*with.*default value.#' - '#Class Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder constructor#' - - '#Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder::root\(\).#' - '#Class Algolia\\SearchBundle\\Services\\NullSearchService is neither abstract nor final.#' - '#Class Algolia\\SearchBundle\\Settings\\SettingsManager is neither abstract nor final.#' - '#Class Algolia\\SearchBundle\\EventListener\\SearchIndexerSubscriber is neither abstract nor final.#' diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 33f9e8b6..bf019cf1 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -16,15 +16,8 @@ final class Configuration implements ConfigurationInterface { public function getConfigTreeBuilder(): TreeBuilder { - if (\method_exists(TreeBuilder::class, 'getRootNode')) { - $treeBuilder = new TreeBuilder('algolia_search'); - $rootNode = $treeBuilder->getRootNode(); - } else { - // @codeCoverageIgnoreStart - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('algolia_search'); - // @codeCoverageIgnoreEnd - } + $treeBuilder = new TreeBuilder('algolia_search'); + $rootNode = $treeBuilder->getRootNode(); $rootNode ->children() From b55d4ac7eba264173960de0fb93a709c833ee735 Mon Sep 17 00:00:00 2001 From: eric-zaharia Date: Mon, 23 Mar 2026 16:52:06 +0200 Subject: [PATCH 03/17] fix: removed remaining stale ignore pattern --- phpstan.neon.dist | 1 - 1 file changed, 1 deletion(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 47f8ec7e..b28b7127 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -14,7 +14,6 @@ parameters: - '#File is missing a "declare\(strict_types=1\)" declaration.#' - '#Method Algolia\\SearchBundle\\DependencyInjection\\AlgoliaSearchExtension::load\(\) has a parameter .* with a type declaration of Symfony\\Component\\DependencyInjection\\ContainerBuilder, but containers should not be injected.#' - '#(Method|Function|Constructor).*has parameter.*with.*default value.#' - - '#Class Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder constructor#' - '#Class Algolia\\SearchBundle\\Services\\NullSearchService is neither abstract nor final.#' - '#Class Algolia\\SearchBundle\\Settings\\SettingsManager is neither abstract nor final.#' - '#Class Algolia\\SearchBundle\\EventListener\\SearchIndexerSubscriber is neither abstract nor final.#' From 14d2d1110fa1d095bc828a352536985b625c5bdc Mon Sep 17 00:00:00 2001 From: eric-zaharia Date: Mon, 23 Mar 2026 16:57:11 +0200 Subject: [PATCH 04/17] fix: removed trailing comma --- src/Command/SearchImportCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/SearchImportCommand.php b/src/Command/SearchImportCommand.php index 3b9bcb48..7930170f 100644 --- a/src/Command/SearchImportCommand.php +++ b/src/Command/SearchImportCommand.php @@ -37,7 +37,7 @@ public function __construct( SearchService $searchService, SearchService $searchServiceForAtomicReindex, ManagerRegistry $managerRegistry, - SearchClient $searchClient + SearchClient $searchClient, ) { parent::__construct($searchService); From e90d175c265babbd0f8d2a937c170d09bcae9172 Mon Sep 17 00:00:00 2001 From: eric-zaharia Date: Mon, 23 Mar 2026 17:00:53 +0200 Subject: [PATCH 05/17] fix: run static analysis and coding style for all versions --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 154c482a..9dfae102 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,11 +38,9 @@ jobs: run: COMPOSER_MEMORY_LIMIT=-1 composer require "symfony/framework-bundle=${{ matrix.symfony }}" -n --prefer-dist - name: Run static analysis - if: matrix.php < '8.3' run: composer test:install && composer test:types - name: Check code styles - if: matrix.php < '8.3' run: composer test:lint - name: Run tests From 85562bd252da41c9c242c1316fc671cb77281ef9 Mon Sep 17 00:00:00 2001 From: eric-zaharia Date: Mon, 23 Mar 2026 17:11:13 +0200 Subject: [PATCH 06/17] fix: include version in index prefix --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9dfae102..a10b8d7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,4 +50,5 @@ jobs: COMPOSER_PROCESS_TIMEOUT: 900 ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} + ALGOLIA_PREFIX: sf_phpunit_${{ matrix.php }}_ run: composer test:unit From e60858133528495a5b7ad21218e524a4d06671c6 Mon Sep 17 00:00:00 2001 From: eric-zaharia Date: Mon, 23 Mar 2026 17:28:23 +0200 Subject: [PATCH 07/17] chore: remove circleci config --- .circleci/config.yml | 91 -------------------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 00219fa5..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,91 +0,0 @@ -# PHP CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-php/ for more details -# -version: 2.1 - -executors: - php-docker: # declares a reusable executor - parameters: - version: - description: "PHP version tag" - type: string - docker: - - image: cimg/php:<> - -jobs: - test: - parameters: - version: - description: "PHP version tag" - type: string - symfony: - description: "Symfony framework version tag" - type: string - - executor: - name: php-docker - version: <> - - steps: - - checkout - - - run: - name: Add PHP8 APT repository - command: sudo add-apt-repository ppa:ondrej/php -y - - run: sudo apt-get update - - run: sudo apt-get install -y php<>-zip php<>-sqlite3 - - # Download and cache dependencies - - restore_cache: - keys: - - composer-deps-<>-{{ checksum "composer.json" }} - # fallback to using the latest cache if no exact match is found - #- composer-deps- - - - run: - name: Install dependencies - command: COMPOSER_MEMORY_LIMIT=-1 composer require "symfony/framework-bundle=<>" -n --prefer-dist - - - save_cache: - key: composer-deps-<>-{{ checksum "composer.json" }} - paths: - - ./vendor - - # CIRCLE_PR_REPONAME indicates an external contributor PR - - run: - name: Get API Key Dealer client - command: | - if [ "$CIRCLE_PR_REPONAME" ]; then - curl -s https://algoliasearch-client-keygen.herokuapp.com | sh >> $BASH_ENV - fi - - - run: - name: Run static analysis - command: if [[ <> < "8.3" ]]; then composer test:install && composer test:types; fi - - - run: - name: Check code styles - command: if [[ <> < "8.3" ]]; then composer test:lint; fi - - # Run tests with phpunit - # - # If the PR is open by an Algolia, we run all the tests - # with the keys in the env variables - # If the PR was open from a fork (community PR) - # we get API keys from the API key dealer https://alg.li/api-key-dealer - - run: - name: Run tests - no_output_timeout: 15m - command: | - export COMPOSER_PROCESS_TIMEOUT=900 - composer test:unit - -workflows: - workflow: - jobs: - - test: - matrix: - parameters: - version: ['8.2', '8.3'] - symfony: ['^7.0'] From fb384ffb4ff1d32d1b85275420196a38e64853c0 Mon Sep 17 00:00:00 2001 From: Eric Zaharia <94015633+eric-zaharia@users.noreply.github.com> Date: Mon, 23 Mar 2026 18:37:16 +0200 Subject: [PATCH 08/17] Update .github/workflows/ci.yml Co-authored-by: Thomas Raffray --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a10b8d7e..67293b29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,8 @@ jobs: with: path: vendor key: composer-deps-${{ matrix.php }}-${{ hashFiles('composer.json') }} + restore-keys: | + composer-deps-${{ matrix.php }}- - name: Install dependencies run: COMPOSER_MEMORY_LIMIT=-1 composer require "symfony/framework-bundle=${{ matrix.symfony }}" -n --prefer-dist From bb71710f8da739147b9857277e6d2ce44c18a33d Mon Sep 17 00:00:00 2001 From: Eric Zaharia <94015633+eric-zaharia@users.noreply.github.com> Date: Mon, 23 Mar 2026 18:37:25 +0200 Subject: [PATCH 09/17] Update .github/workflows/ci.yml Co-authored-by: Thomas Raffray --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67293b29..de6fa99e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,9 @@ on: branches: [master] pull_request: branches: [master] +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true jobs: test: From 8c6efaacb9304eb598131e392d3d809955eb53e8 Mon Sep 17 00:00:00 2001 From: Eric Zaharia <94015633+eric-zaharia@users.noreply.github.com> Date: Mon, 23 Mar 2026 18:37:32 +0200 Subject: [PATCH 10/17] Update .github/workflows/ci.yml Co-authored-by: Thomas Raffray --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de6fa99e..65bbbbf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.2', '8.3'] + php: ['8.2', '8.3', '8.4', '8.5'] symfony: ['^7.0'] name: PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }} From 408f678682887e53c8bf336d49938a313fc6c944 Mon Sep 17 00:00:00 2001 From: eric-zaharia Date: Tue, 24 Mar 2026 10:19:49 +0200 Subject: [PATCH 11/17] fix: support php 8.4/8.5 in CI and upgrade dev tooling --- phpstan.neon.dist | 4 ++-- src/AlgoliaSearchBundle.php | 5 +---- src/DependencyInjection/Configuration.php | 4 +++- src/SearchableEntity.php | 2 +- tests/QualityTools/composer.json | 7 +++---- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index b28b7127..4cba6a67 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,13 +1,13 @@ includes: - tests/QualityTools/vendor/phpstan/phpstan-strict-rules/rules.neon - - tests/QualityTools/vendor/localheinz/phpstan-rules/rules.neon - - tests/QualityTools/vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon + - tests/QualityTools/vendor/ergebnis/phpstan-rules/rules.neon parameters: level: 3 paths: - src ignoreErrors: + - '#Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface::\w+\(\)#' - '#Language construct isset\(\) should not be used.#' - '#Class "Algolia\\SearchBundle\\.*" is not allowed to extend ".*".#' - '#Method Algolia\\SearchBundle\\.*\(\) is not final, but since the containing class is abstract, it should be.#' diff --git a/src/AlgoliaSearchBundle.php b/src/AlgoliaSearchBundle.php index 528ad496..e2b763bb 100644 --- a/src/AlgoliaSearchBundle.php +++ b/src/AlgoliaSearchBundle.php @@ -13,10 +13,7 @@ final class AlgoliaSearchBundle extends Bundle */ public const VERSION = '7.0.0'; - /** - * @return void - */ - public function boot() + public function boot(): void { parent::boot(); diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index bf019cf1..f32f0a95 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -2,6 +2,7 @@ namespace Algolia\SearchBundle\DependencyInjection; +use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; @@ -17,7 +18,8 @@ final class Configuration implements ConfigurationInterface public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('algolia_search'); - $rootNode = $treeBuilder->getRootNode(); + /** @var ArrayNodeDefinition $rootNode */ + $rootNode = $treeBuilder->getRootNode(); $rootNode ->children() diff --git a/src/SearchableEntity.php b/src/SearchableEntity.php index e7426ba6..7493bc47 100644 --- a/src/SearchableEntity.php +++ b/src/SearchableEntity.php @@ -101,7 +101,7 @@ private function setId() throw new Exception('Entity has no primary key'); } - if (1 == count($ids)) { + if (1 === count($ids)) { $this->id = reset($ids); } else { $objectID = ''; diff --git a/tests/QualityTools/composer.json b/tests/QualityTools/composer.json index 3f7e31f2..84367f77 100644 --- a/tests/QualityTools/composer.json +++ b/tests/QualityTools/composer.json @@ -1,8 +1,7 @@ { "require-dev": { - "phpstan/phpstan": "^1.11", - "localheinz/phpstan-rules": "^2.2", - "phpstan/phpstan-strict-rules": "^1.6", - "thecodingmachine/phpstan-strict-rules": "^1.0" + "phpstan/phpstan": "^2.1", + "ergebnis/phpstan-rules": "^2.13", + "phpstan/phpstan-strict-rules": "^2.0" } } From 6c03e800b93739df2172337569b1ae56d64ce886 Mon Sep 17 00:00:00 2001 From: eric-zaharia Date: Tue, 24 Mar 2026 10:23:04 +0200 Subject: [PATCH 12/17] fix: ignore rootNode type --- phpstan.neon.dist | 1 - src/DependencyInjection/Configuration.php | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 4cba6a67..10fbff32 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -7,7 +7,6 @@ parameters: paths: - src ignoreErrors: - - '#Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface::\w+\(\)#' - '#Language construct isset\(\) should not be used.#' - '#Class "Algolia\\SearchBundle\\.*" is not allowed to extend ".*".#' - '#Method Algolia\\SearchBundle\\.*\(\) is not final, but since the containing class is abstract, it should be.#' diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index f32f0a95..018a29ec 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -2,7 +2,6 @@ namespace Algolia\SearchBundle\DependencyInjection; -use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; @@ -18,11 +17,10 @@ final class Configuration implements ConfigurationInterface public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('algolia_search'); - /** @var ArrayNodeDefinition $rootNode */ $rootNode = $treeBuilder->getRootNode(); $rootNode - ->children() + ->children() // @phpstan-ignore method.notFound ->scalarNode('prefix') ->defaultValue(null) ->end() From eeda271169d780e53c3f17ac8f41f7fe1071ee51 Mon Sep 17 00:00:00 2001 From: eric-zaharia Date: Tue, 24 Mar 2026 10:27:46 +0200 Subject: [PATCH 13/17] fix: remove ignore --- src/DependencyInjection/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 018a29ec..d7da174c 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -20,7 +20,7 @@ public function getConfigTreeBuilder(): TreeBuilder $rootNode = $treeBuilder->getRootNode(); $rootNode - ->children() // @phpstan-ignore method.notFound + ->children() ->scalarNode('prefix') ->defaultValue(null) ->end() From 6e07d75210f1a55d35926827c06b33f7323b56b7 Mon Sep 17 00:00:00 2001 From: eric-zaharia Date: Tue, 24 Mar 2026 10:32:55 +0200 Subject: [PATCH 14/17] fix: code style issue --- src/DependencyInjection/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index d7da174c..bf019cf1 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -17,7 +17,7 @@ final class Configuration implements ConfigurationInterface public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('algolia_search'); - $rootNode = $treeBuilder->getRootNode(); + $rootNode = $treeBuilder->getRootNode(); $rootNode ->children() From 5a99a8e84bbf1668499719f202994bbe71706ea4 Mon Sep 17 00:00:00 2001 From: eric-zaharia Date: Tue, 24 Mar 2026 10:56:14 +0200 Subject: [PATCH 15/17] fix: limit php version support --- .github/workflows/ci.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65bbbbf4..de6fa99e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.2', '8.3', '8.4', '8.5'] + php: ['8.2', '8.3'] symfony: ['^7.0'] name: PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }} diff --git a/composer.json b/composer.json index 5b6d7c49..6ebfe55b 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ ], "prefer-stable": true, "require": { - "php": ">= 8.2", + "php": ">= 8.2 < 8.4", "algolia/algoliasearch-client-php": "^3.0", "doctrine/event-manager": "^1.1 || ^2.0", "doctrine/persistence": "^2.1 || ^3.0", From 317472049afc3637ac371addc1ab95f33f3610d1 Mon Sep 17 00:00:00 2001 From: eric-zaharia Date: Tue, 24 Mar 2026 11:11:26 +0200 Subject: [PATCH 16/17] fix: force symfony/http-kernel to not jump to a higher version for newer php --- .github/workflows/ci.yml | 2 +- composer.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de6fa99e..65bbbbf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.2', '8.3'] + php: ['8.2', '8.3', '8.4', '8.5'] symfony: ['^7.0'] name: PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }} diff --git a/composer.json b/composer.json index 6ebfe55b..7f03425c 100644 --- a/composer.json +++ b/composer.json @@ -10,11 +10,12 @@ ], "prefer-stable": true, "require": { - "php": ">= 8.2 < 8.4", + "php": ">= 8.2", "algolia/algoliasearch-client-php": "^3.0", "doctrine/event-manager": "^1.1 || ^2.0", "doctrine/persistence": "^2.1 || ^3.0", "symfony/filesystem": "^7.0", + "symfony/http-kernel": "^7.0", "symfony/property-access": "^7.0", "symfony/serializer": "^7.0" }, From 9fcde52cd9acbe4106cd85147800a1b3f78879b2 Mon Sep 17 00:00:00 2001 From: eric-zaharia Date: Tue, 24 Mar 2026 11:18:20 +0200 Subject: [PATCH 17/17] fix: for PHP 8.4+ Symfony uses native lazy objects --- tests/TestCase/ClientProxyTest.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/TestCase/ClientProxyTest.php b/tests/TestCase/ClientProxyTest.php index 15ed63bd..3f62fbd1 100644 --- a/tests/TestCase/ClientProxyTest.php +++ b/tests/TestCase/ClientProxyTest.php @@ -41,9 +41,15 @@ public static function tearDownAfterClass(): void public function testClientIsProxied(): void { - $interfaces = class_implements($this->get('search.client')); - - self::assertContains(LazyObjectInterface::class, $interfaces); + $client = $this->get('search.client'); + + if (PHP_VERSION_ID >= 80400) { + $reflector = new \ReflectionClass($client); + self::assertTrue($reflector->isUninitializedLazyObject($client)); + } else { + $interfaces = class_implements($client); + self::assertContains(LazyObjectInterface::class, $interfaces); + } } public function testProxiedClientFailIfNoEnvVarsFound(): void