From 0af41e35ee20dddc60d337bb653296a07f3687ae Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 9 Jul 2025 12:42:55 +0200 Subject: fix for PHP 8.5 using patch from upstream and from https://github.com/nikic/php-ast/pull/253 --- php85.patch | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 php85.patch (limited to 'php85.patch') diff --git a/php85.patch b/php85.patch new file mode 100644 index 0000000..ba00564 --- /dev/null +++ b/php85.patch @@ -0,0 +1,50 @@ +From d546378de770fbe5d40a7bf181d2b77ea408f59f Mon Sep 17 00:00:00 2001 +From: Nikita Popov +Date: Sun, 1 Jun 2025 17:33:35 +0200 +Subject: [PATCH] Add compatibility define for ZEND_AST_EXIT + +--- + php_ast.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/php_ast.h b/php_ast.h +index 29e4450..4ba3bbc 100644 +--- a/php_ast.h ++++ b/php_ast.h +@@ -93,6 +93,11 @@ extern ast_str_globals str_globals; + # define ZEND_AST_PARENT_PROPERTY_HOOK_CALL 0x2f8 + #endif + ++/* ZEND_AST_EXIT has been replaced with plain function call. */ ++#if PHP_VERSION_ID >= 80500 ++# define ZEND_AST_EXIT 0x1fd ++#endif ++ + /* Pretend it still exists */ + # define ZEND_AST_LIST ((1 << (ZEND_AST_IS_LIST_SHIFT + 1)) - 1) + +From 69c9ca89d4db6c5aabbeaaf7f22dfe979907d60a Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 9 Jul 2025 12:38:30 +0200 +Subject: [PATCH] Add compatibility define for ZEND_AST_CLONE + +--- + php_ast.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/php_ast.h b/php_ast.h +index 4ba3bbc..0eeb28c 100644 +--- a/php_ast.h ++++ b/php_ast.h +@@ -93,9 +93,10 @@ extern ast_str_globals str_globals; + # define ZEND_AST_PARENT_PROPERTY_HOOK_CALL 0x2f8 + #endif + +-/* ZEND_AST_EXIT has been replaced with plain function call. */ ++/* ZEND_AST_EXIT and ZEND_AST_CLONE have been replaced with plain function call. */ + #if PHP_VERSION_ID >= 80500 + # define ZEND_AST_EXIT 0x1fd ++# define ZEND_AST_CLONE 0x1fc + #endif + + /* Pretend it still exists */ -- cgit