From 438308bc000149e49a6f82b39c0ad80ffca9300a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Djupsj=C3=B6backa?= Date: Tue, 19 Dec 2023 11:56:06 +0200 Subject: [PATCH] Add support for PHP 8.4 (nightly) and run tests also on PHP 8.4 --- .github/workflows/build.yml | 2 +- src/jsonpath/interpreter.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4cddd54..dc906ce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - php: [ "8.0", "8.1", "8.2", "8.3" ] + php: [ "8.0", "8.1", "8.2", "8.3", "8.4" ] use-opcache: [ "true", "false" ] steps: diff --git a/src/jsonpath/interpreter.c b/src/jsonpath/interpreter.c index 3016304..bd26eb2 100644 --- a/src/jsonpath/interpreter.c +++ b/src/jsonpath/interpreter.c @@ -293,7 +293,11 @@ static bool compare_rgxp(zval* lh, zval* rh) { zend_string* zs_lh = zend_string_copy(Z_STR_P(lh)); +#if PHP_VERSION_ID >= 80400 + php_pcre_match_impl(pce, zs_lh, &retval, &subpats, 0, 0, 0); +#else php_pcre_match_impl(pce, zs_lh, &retval, &subpats, 0, 0, 0, 0); +#endif zend_string_release_ex(zs_lh, 0); zval_ptr_dtor(&subpats);