From 8bb827c9567d0f5591367a69386cfd696d68290d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 29 Sep 2025 07:57:23 +0200 Subject: add patch for PHP 8.5.0RC1 from https://github.com/php-amqp/php-amqp/pull/595 --- 595.patch | 39 +++++++++++++++++++++++++++++++++++++-- php-pecl-amqp.spec | 8 +++++--- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/595.patch b/595.patch index ce190d9..f274a41 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 1/2] Use php_format_date instead of php_std_date +Subject: [PATCH 1/3] Use php_format_date instead of php_std_date - php_format_date exists in 7.4+ - php_std_date removed in 8.5 @@ -66,7 +66,7 @@ index 8809a20b..eaf857e7 100644 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 +Subject: [PATCH 2/3] use zend_ce_exception --- amqp.c | 2 +- @@ -99,3 +99,38 @@ index eeeec3df..48287fa1 100644 PHP_AMQP_COMPAT_OBJ_P(&exception), ZEND_STRL("message"), "Orphaned envelope" + +From 977449987412a3d5c59a036dbab8b6d67764bb3e Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 29 Sep 2025 07:49:28 +0200 +Subject: [PATCH 3/3] Silent the "not representable as an int" warning + +--- + tests/amqpconnection_validation.phpt | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/tests/amqpconnection_validation.phpt b/tests/amqpconnection_validation.phpt +index 9f67cf67..bb1790c0 100644 +--- a/tests/amqpconnection_validation.phpt ++++ b/tests/amqpconnection_validation.phpt +@@ -26,7 +26,12 @@ foreach ($parameters as $args) { + list($prop, $setter, $getter, $values) = $args; + foreach ($values as $value) { + try { +- $con1 = new AMQPConnection([$prop => $value]); ++ if (in_array($prop, ['frame_max', 'heartbeat'])) { ++ // Silent the "not representable as an int" warning ++ $con1 = @new AMQPConnection([$prop => $value]); ++ } else { ++ $con1 = new AMQPConnection([$prop => $value]); ++ } + echo $getter . " after constructor: "; + echo $con1->{$getter}(); + echo PHP_EOL; +@@ -109,4 +114,4 @@ AMQPConnectionException: Parameter 'heartbeat' is out of range. + AMQPConnectionException: Parameter 'heartbeat' is out of range. + getHeartbeatInterval after constructor: 250 + getHeartbeatInterval after constructor: 0 +-==DONE== +\ No newline at end of file ++==DONE== diff --git a/php-pecl-amqp.spec b/php-pecl-amqp.spec index 0737612..012c040 100644 --- a/php-pecl-amqp.spec +++ b/php-pecl-amqp.spec @@ -31,7 +31,7 @@ Summary: Communicate with any AMQP compliant server Name: %{?scl_prefix}php-pecl-amqp Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}} -Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 6%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP-3.01 URL: https://pecl.php.net/package/amqp Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz @@ -209,8 +209,6 @@ pushd %{sources} # online rm tests/amqpconnection_construct_with_connect_timeout.phpt -# float/int issue -rm tests/amqpconnection_validation.phpt %if %{with server} mkdir log run base @@ -259,6 +257,10 @@ exit $ret %changelog +* Mon Sep 29 2025 Remi Collet - 2.1.2-6 +- add patch for PHP 8.5.0RC1 from + https://github.com/php-amqp/php-amqp/pull/595 + * Thu Sep 25 2025 Remi Collet - 2.1.2-5 - rebuild for PHP 8.5.0RC1 -- cgit