From ab8af9a3059aea8cd1854548fc8b684708388ba6 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 30 Jul 2025 14:13:30 +0200 Subject: fix build with PHP 8.5.0alpha3 using patch from https://github.com/bukka/phpc/pull/4 --- ..._exception-instead-of-zend_exception_get_.patch | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch (limited to '0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch') diff --git a/0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch b/0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch new file mode 100644 index 0000000..dc8c9b7 --- /dev/null +++ b/0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch @@ -0,0 +1,29 @@ +From 5eec12d0995c683c1910487602db0bf4db022074 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Thu, 17 Jul 2025 10:59:20 +0200 +Subject: [PATCH] use zend_ce_exception instead of zend_exception_get_default() + for 8.5 + +--- + crypto.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/crypto.c b/crypto.c +index d841831..fd8df42 100644 +--- a/crypto.c ++++ b/crypto.c +@@ -76,7 +76,11 @@ PHP_MINIT_FUNCTION(crypto) + zend_class_entry ce; + + /* Register base exception */ ++#if PHP_VERSION_ID < 70000 + PHP_CRYPTO_EXCEPTION_REGISTER_CE(ce, Crypto, zend_exception_get_default(TSRMLS_C)); ++#else ++ PHP_CRYPTO_EXCEPTION_REGISTER_CE(ce, Crypto, zend_ce_exception); ++#endif + + /* Init OpenSSL algorithms */ + OpenSSL_add_all_algorithms(); +-- +2.50.1 + -- cgit