From 6ea7434941a921cfcb3f9185c84ac253dc97212d Mon Sep 17 00:00:00 2001 From: Mikko Pesari Date: Tue, 25 Nov 2025 00:09:19 +0200 Subject: [PATCH 1/3] Apply php-cs-fixer --- tests/QueryTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/QueryTest.php b/tests/QueryTest.php index db296cd..e832c41 100644 --- a/tests/QueryTest.php +++ b/tests/QueryTest.php @@ -102,7 +102,7 @@ public function testQueries( ); } } - } catch (JSONPathException | RuntimeException $e) { + } catch (JSONPathException|RuntimeException $e) { if (!\in_array($id, self::$baselineFailedQueries, true)) { throw new RuntimeException( $e->getMessage() . "\nQuery: {$query}\n\nMore information: {$url}", From 7d0d3cdd9ebf0d49a78c04922ef38087075f95b6 Mon Sep 17 00:00:00 2001 From: Mikko Pesari Date: Mon, 24 Nov 2025 23:50:33 +0200 Subject: [PATCH 2/3] Run tests on PHP 8.5 --- .github/workflows/Test.yml | 1 + composer.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 95a8a85..0abee78 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -23,6 +23,7 @@ jobs: - '8.2' - '8.3' - '8.4' + - '8.5' continue-on-error: ${{ matrix.php == '8.4' }} name: PHP ${{ matrix.php }} Test diff --git a/composer.json b/composer.json index 9d8ffa7..232a327 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "source": "https://github.com/SoftCreatR/JSONPath" }, "require": { - "php": "8.1 - 8.4", + "php": "8.1 - 8.5", "ext-json": "*" }, "require-dev": { From 18cbc1cd1b5cb4a4b827d5ab5ad5d6cd2fa11eb6 Mon Sep 17 00:00:00 2001 From: Mikko Pesari Date: Mon, 24 Nov 2025 23:41:26 +0200 Subject: [PATCH 3/3] PHP 8.5: Fix deprecation warning when passing null to array_key_exists() --- src/AccessHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AccessHelper.php b/src/AccessHelper.php index c8b0140..1d7e363 100644 --- a/src/AccessHelper.php +++ b/src/AccessHelper.php @@ -37,7 +37,7 @@ public static function keyExists(mixed $collection, $key, bool $magicIsAllowed = } if (\is_array($collection)) { - return \array_key_exists($key, $collection); + return \array_key_exists($key ?? '', $collection); } if ($collection instanceof ArrayAccess) {