From 22ebf51f79d4608ab14d3166954e66d41172884f Mon Sep 17 00:00:00 2001 From: Simon Podlipsky Date: Wed, 18 Mar 2026 16:36:14 +0100 Subject: [PATCH] Add PHP 8.5 to CI test matrix - Disable fail-fast to see results for all PHP versions - Fix APCng overflow warning on PHP 8.5 when casting out-of-range float to int in convertToIncrementalInteger() Signed-off-by: Simon Podlipsky --- .github/workflows/tests.yml | 4 ++-- src/Prometheus/Storage/APCng.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1946b072..81db0c28 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,9 +6,9 @@ jobs: test: runs-on: ubuntu-latest strategy: - fail-fast: true + fail-fast: false matrix: - php: [ 8.1, 8.2, 8.3, 8.4 ] + php: [ 8.1, 8.2, 8.3, 8.4, 8.5 ] redis-version: [ 5, 6, 7, 8 ] name: P${{ matrix.php }} - Redis ${{ matrix.redis-version }} diff --git a/src/Prometheus/Storage/APCng.php b/src/Prometheus/Storage/APCng.php index b37cffb9..1e115fc7 100644 --- a/src/Prometheus/Storage/APCng.php +++ b/src/Prometheus/Storage/APCng.php @@ -825,7 +825,7 @@ private function decrementKeyWithValue(string $key, $val): void */ private function convertToIncrementalInteger($val): int { - return intval($val * $this->precisionMultiplier); + return @intval($val * $this->precisionMultiplier); } private function convertIncrementalIntegerToFloat(int $val): float