From 34ee1baa11c38121d58354577d9145cc3952b8ac Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 15 Jul 2025 14:54:09 +0200 Subject: add patch for PHP 8.5.0alpha2 from https://github.com/php-amqp/php-amqp/pull/595 --- 595.patch | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) (limited to '595.patch') diff --git a/595.patch b/595.patch index 707c995..ce190d9 100644 --- a/595.patch +++ b/595.patch @@ -1,7 +1,7 @@ From 789de276603ca54cf85c958bf996c4faedf73223 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 4 Jul 2025 12:13:08 +0200 -Subject: [PATCH] Use php_format_date instead of php_std_date +Subject: [PATCH 1/2] Use php_format_date instead of php_std_date - php_format_date exists in 7.4+ - php_std_date removed in 8.5 @@ -62,3 +62,40 @@ index 8809a20b..eaf857e7 100644 if (AMQP_RESPONSE_NORMAL != res.reply_type) { char *message = NULL, *long_message = NULL; + +From 32c799b2f4182e4d7f2ef99cdbd9df3d6f0c2678 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Tue, 15 Jul 2025 14:50:40 +0200 +Subject: [PATCH 2/2] use zend_ce_exception + +--- + amqp.c | 2 +- + amqp_queue.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/amqp.c b/amqp.c +index ef04488d..84a87b7b 100644 +--- a/amqp.c ++++ b/amqp.c +@@ -276,7 +276,7 @@ static PHP_MINIT_FUNCTION(amqp) /* {{{ */ + + /* Exceptions */ + INIT_CLASS_ENTRY(ce, "AMQPException", NULL); +- amqp_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default()); ++ amqp_exception_class_entry = zend_register_internal_class_ex(&ce, zend_ce_exception); + + INIT_CLASS_ENTRY(ce, "AMQPConnectionException", NULL); + amqp_connection_exception_class_entry = zend_register_internal_class_ex(&ce, amqp_exception_class_entry); +diff --git a/amqp_queue.c b/amqp_queue.c +index eeeec3df..48287fa1 100644 +--- a/amqp_queue.c ++++ b/amqp_queue.c +@@ -754,7 +754,7 @@ static PHP_METHOD(amqp_queue_class, consume) + ZVAL_UNDEF(&exception); + object_init_ex(&exception, amqp_envelope_exception_class_entry); + zend_update_property_string( +- zend_exception_get_default(), ++ zend_ce_exception, + PHP_AMQP_COMPAT_OBJ_P(&exception), + ZEND_STRL("message"), + "Orphaned envelope" -- cgit