From c430462ee482eb768058cf788341c9caca75907e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Djupsj=C3=B6backa?= Date: Wed, 29 Jan 2025 15:00:54 +0200 Subject: [PATCH] Publish version 3.0.0 --- package.xml | 85 +++++++++++++++++++++++++++++++++++++++++++------- php_jsonpath.h | 2 +- 2 files changed, 74 insertions(+), 13 deletions(-) diff --git a/package.xml b/package.xml index 516fd32..77856e7 100644 --- a/package.xml +++ b/package.xml @@ -16,10 +16,10 @@ yes - 2025-01-26 + 2025-01-29 - 2.1.1 - 2.0.0 + 3.0.0 + 3.0.0 stable @@ -27,15 +27,32 @@ PHP License -* Add link to PHP Extensions Repository for Windows DLLs by @crocodele in https://github.com/supermetrics-public/pecl-jsonpath/pull/180 -* Add dependabot configuration by @dawitnida in https://github.com/supermetrics-public/pecl-jsonpath/pull/181 -* Bump actions/checkout from 2 to 4 by @dependabot in https://github.com/supermetrics-public/pecl-jsonpath/pull/183 -* Bump DoozyX/clang-format-lint-action from 0.12 to 0.17 by @dependabot in https://github.com/supermetrics-public/pecl-jsonpath/pull/182 -* Bump schneegans/dynamic-badges-action from 1.0.0 to 1.7.0 by @dependabot in https://github.com/supermetrics-public/pecl-jsonpath/pull/184 -* Bump php/setup-php-sdk from 0.8 to 0.9 by @dependabot in https://github.com/supermetrics-public/pecl-jsonpath/pull/185 -* Bump DoozyX/clang-format-lint-action from 0.17 to 0.18 by @dependabot in https://github.com/supermetrics-public/pecl-jsonpath/pull/186 -* Add composer.json for compatibility with PIE by @crocodele in https://github.com/supermetrics-public/pecl-jsonpath/pull/187 -* Fix segmentation fault when matching regex string against non-string values by @crocodele in https://github.com/supermetrics-public/pecl-jsonpath/pull/190 +## Breaking changes + +In comparisons involving numbers, numeric strings are now treated as numbers. + +Example: +``` +$data = [ + 'items' => [ + [ + 'id' => 1, + 'quantity' => 5, + ], + [ + 'id' => 2, + 'quantity' => '8', + ], + ], +]; +``` + +Before: `$.items[?(@.quantity > 0)]` returns `[['id' => 1, 'quantity' => 5]]`. +After: `$.items[?(@.quantity > 0)]` returns `[['id' => 1, 'quantity' => 5], ['id' => 2, 'quantity' => '8']]`. + +## What's Changed +* Test also on PHP 8.4 for Windows and PHP 8.5 (nightly) for Linux, cache PHP-SDK in Windows by @crocodele in https://github.com/supermetrics-public/pecl-jsonpath/pull/192 +* Allow numeric strings in number comparisons by @crocodele in https://github.com/supermetrics-public/pecl-jsonpath/pull/191 @@ -83,6 +100,9 @@ + + + @@ -411,6 +431,47 @@ jsonpath + + 2025-01-29 + + + 3.0.0 + 3.0.0 + + + stable + stable + + PHP License + +## Breaking changes + +In comparisons involving numbers, numeric strings are now treated as numbers. + +Example: +``` +$data = [ + 'items' => [ + [ + 'id' => 1, + 'quantity' => 5, + ], + [ + 'id' => 2, + 'quantity' => '8', + ], + ], +]; +``` + +Before: `$.items[?(@.quantity > 0)]` returns `[['id' => 1, 'quantity' => 5]]`. +After: `$.items[?(@.quantity > 0)]` returns `[['id' => 1, 'quantity' => 5], ['id' => 2, 'quantity' => '8']]`. + +## What's Changed +* Test also on PHP 8.4 for Windows and PHP 8.5 (nightly) for Linux, cache PHP-SDK in Windows by @crocodele in https://github.com/supermetrics-public/pecl-jsonpath/pull/192 +* Allow numeric strings in number comparisons by @crocodele in https://github.com/supermetrics-public/pecl-jsonpath/pull/191 + + 2025-01-26 diff --git a/php_jsonpath.h b/php_jsonpath.h index ad17dcf..10cec9a 100644 --- a/php_jsonpath.h +++ b/php_jsonpath.h @@ -24,7 +24,7 @@ extern zend_module_entry jsonpath_module_entry; #define phpext_jsonpath_ptr &jsonpath_module_entry -#define PHP_JSONPATH_VERSION "2.1.1" +#define PHP_JSONPATH_VERSION "3.0.0" #ifdef PHP_WIN32 #define PHP_JSONPATH_API __declspec(dllexport)