summaryrefslogtreecommitdiffstats
path: root/php85.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2025-07-09 12:42:55 +0200
committerRemi Collet <remi@php.net>2025-07-09 12:42:55 +0200
commit0af41e35ee20dddc60d337bb653296a07f3687ae (patch)
tree993893f82f86aa9a123a2cc8baf56b36ff58bee0 /php85.patch
parent26a4b8b1d738fde154019a135dceb46e9f693329 (diff)
fix for PHP 8.5 using patch from upstream and fromHEADmaster
https://github.com/nikic/php-ast/pull/253
Diffstat (limited to 'php85.patch')
-rw-r--r--php85.patch50
1 files changed, 50 insertions, 0 deletions
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 <github@npopov.com>
+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 <remi@remirepo.net>
+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 */