From 365c32c7fe87037eabec3a392288da7867b1ef3d Mon Sep 17 00:00:00 2001 From: Sami Mussbach Date: Fri, 26 Jun 2026 10:58:54 +0200 Subject: [PATCH] Support Elasticsearch 8 / FOSElasticaBundle 7 (PHP 8.1+) Bump dependency constraints to the ES8-compatible line (friendsofsymfony/elastica-bundle ^7.0, PHP ^8.1) and add the ': void' return type to QueuePagerPersister::insert() required by FOSElasticaBundle 7.x's PagerPersisterInterface. --- Persister/QueuePagerPersister.php | 2 +- composer.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Persister/QueuePagerPersister.php b/Persister/QueuePagerPersister.php index 9c2c471..f0dc07b 100644 --- a/Persister/QueuePagerPersister.php +++ b/Persister/QueuePagerPersister.php @@ -49,7 +49,7 @@ public function __construct( /** * {@inheritdoc} */ - public function insert(PagerInterface $pager, array $options = array()) + public function insert(PagerInterface $pager, array $options = array()): void { $pager->setMaxPerPage(empty($options['max_per_page']) ? 100 : $options['max_per_page']); diff --git a/composer.json b/composer.json index fe0564e..689fec1 100644 --- a/composer.json +++ b/composer.json @@ -5,9 +5,9 @@ "keywords": ["elasticsearch", "elastica", "fos", "performance"], "license": "MIT", "require": { - "php": "^7.1|^8.0", + "php": "^8.1", "symfony/framework-bundle": "^6.0|^7.0", - "friendsofsymfony/elastica-bundle": "^6.0", + "friendsofsymfony/elastica-bundle": "^7.0", "enqueue/enqueue-bundle": "^0.10" }, "require-dev": {