diff options
author | Remi Collet <remi@remirepo.net> | 2025-09-04 11:06:52 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2025-09-04 11:06:52 +0200 |
commit | aff94630078d500bd42d7a43d4fadf72a8345c74 (patch) | |
tree | ba8e3d47038ed7948ede2f6585fe70d3e0e3e4c8 | |
parent | 54d1328486f9bb55c2a5f9f4dc5c3fea7047e42a (diff) |
https://github.com/weltling/parle/pull/59
-rw-r--r-- | 59.patch | 56 | ||||
-rw-r--r-- | php-pecl-parle.spec | 6 |
2 files changed, 61 insertions, 1 deletions
diff --git a/59.patch b/59.patch new file mode 100644 index 0000000..9373643 --- /dev/null +++ b/59.patch @@ -0,0 +1,56 @@ +From e28a0a6af688bca4714924aa0996f3f8697ae913 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Thu, 17 Jul 2025 15:31:42 +0200 +Subject: [PATCH 1/2] use zend_ce_exception instead of + zend_exception_get_default() for 8.5 + +--- + parle.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/parle.cpp b/parle.cpp +index 782c591..a1e2c2b 100644 +--- a/parle.cpp ++++ b/parle.cpp +@@ -3145,11 +3145,11 @@ PHP_MINIT_FUNCTION(parle) + #endif + + INIT_CLASS_ENTRY(ce, "Parle\\LexerException", NULL); +- ParleLexerException_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default()); ++ ParleLexerException_ce = zend_register_internal_class_ex(&ce, zend_ce_exception); + INIT_CLASS_ENTRY(ce, "Parle\\ParserException", NULL); +- ParleParserException_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default()); ++ ParleParserException_ce = zend_register_internal_class_ex(&ce, zend_ce_exception); + INIT_CLASS_ENTRY(ce, "Parle\\StackException", NULL); +- ParleStackException_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default()); ++ ParleStackException_ce = zend_register_internal_class_ex(&ce, zend_ce_exception); + + REGISTER_NS_BOOL_CONSTANT("Parle", "INTERNAL_UTF32", PARLE_U32, CONST_PERSISTENT | CONST_CS); + + +From efda0c5bac49a49e694d2eb8fc0d71f2c17f5e69 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Thu, 4 Sep 2025 11:04:59 +0200 +Subject: [PATCH 2/2] Fix Deprecated: Case statements followed by a semicolon + +--- + tests/lexer_position_tracking_001.phpt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/lexer_position_tracking_001.phpt b/tests/lexer_position_tracking_001.phpt +index 131e518..4fd3bd0 100644 +--- a/tests/lexer_position_tracking_001.phpt ++++ b/tests/lexer_position_tracking_001.phpt +@@ -43,10 +43,10 @@ do { + case Parser::ACTION_REDUCE: + //echo "Trace: ", $par->trace(), PHP_EOL; + switch ($par->reduceId) { +- case $prod_0; ++ case $prod_0: + echo " Match: '", $par->sigil(0), "', token: '", substr($in, $lex->marker, $lex->cursor - $lex->marker), "'", PHP_EOL; + break; +- case $prod_1; ++ case $prod_1: + echo " Match: '", $par->sigil(1), "', token: '", substr($in, $lex->marker, $lex->cursor - $lex->marker), "'", PHP_EOL; + break; + } diff --git a/php-pecl-parle.spec b/php-pecl-parle.spec index 5cb487f..4441c2a 100644 --- a/php-pecl-parle.spec +++ b/php-pecl-parle.spec @@ -20,7 +20,7 @@ Summary: Parsing and lexing Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 0.8.5 -Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} # Extension is BSD, libraries are Boost License: BSD-2-Clause AND BSL-1.0 URL: https://pecl.php.net/package/%{pecl_name} @@ -183,6 +183,10 @@ make test "TESTS=--show-diff -q %{?_smp_mflags}" ######### TODO : use --enable-parle-utf32 ? %changelog +* Thu Sep 4 2025 Remi Collet <remi@remirepo.net> - 0.8.5-4 +- more fix for PHP 8.5.0beta2 using patch from + https://github.com/weltling/parle/pull/59 + * Thu Jul 17 2025 Remi Collet <remi@remirepo.net> - 0.8.5-3 - add fix for PHP 8.5.0alpha2 using patch from https://github.com/weltling/parle/pull/59 |