diff options
-rw-r--r-- | 418.patch | 31 | ||||
-rw-r--r-- | PHPINFO | 4 | ||||
-rw-r--r-- | REFLECTION | 28 | ||||
-rw-r--r-- | amqp-pr455.patch | 22 | ||||
-rw-r--r-- | php-pecl-amqp.spec | 14 |
5 files changed, 56 insertions, 43 deletions
diff --git a/418.patch b/418.patch deleted file mode 100644 index 3a09262..0000000 --- a/418.patch +++ /dev/null @@ -1,31 +0,0 @@ -From ad6e2ddaf8421e992fea2d2e77c491255d6a035b Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Fri, 17 Jun 2022 14:00:36 +0200 -Subject: [PATCH] Fix: Deprecated: Creation of dynamic property (8.2) - ---- - tests/bug_62354.phpt | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/tests/bug_62354.phpt b/tests/bug_62354.phpt -index d2a173b3..6330476c 100644 ---- a/tests/bug_62354.phpt -+++ b/tests/bug_62354.phpt -@@ -4,7 +4,9 @@ Constructing AMQPQueue with AMQPConnection segfaults - <?php if (!extension_loaded("amqp")) print "skip"; ?> - --FILE-- - <?php --class Amqptest {}; -+class Amqptest { -+ public $conn = NULL; -+}; - $o = new Amqptest(); - $o->conn = new AMQPConnection(); - $funcs = array( -@@ -20,4 +22,4 @@ getLogin => 'guest' - getPassword => 'guest' - getPort => 5672 - getVHost => '/' --isConnected => false -\ No newline at end of file -+isConnected => false @@ -1,8 +1,8 @@ amqp -Version => 2.0.0alpha1 -Compiled => Jul 30 2023 @ 00:00:00 +Version => 2.0.0beta1 +Compiled => Aug 3 2023 @ 00:00:00 AMQP protocol version => 0-9-1 librabbitmq version => 0.13.0 Default max channels per connection => 256 @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #124 amqp version 2.0.0alpha1 ] { +Extension [ <persistent> extension #124 amqp version 2.0.0beta1 ] { - INI { Entry [ amqp.host <ALL> ] @@ -73,11 +73,11 @@ Extension [ <persistent> extension #124 amqp version 2.0.0alpha1 ] { } - Constants [32] { - Constant [ string AMQP_EXTENSION_VERSION ] { 2.0.0alpha1 } + Constant [ string AMQP_EXTENSION_VERSION ] { 2.0.0beta1 } Constant [ int AMQP_EXTENSION_VERSION_MAJOR ] { 2 } Constant [ int AMQP_EXTENSION_VERSION_MINOR ] { 0 } Constant [ int AMQP_EXTENSION_VERSION_PATCH ] { 0 } - Constant [ string AMQP_EXTENSION_VERSION_EXTRA ] { alpha1 } + Constant [ string AMQP_EXTENSION_VERSION_EXTRA ] { beta1 } Constant [ int AMQP_EXTENSION_VERSION_ID ] { 20000 } Constant [ int AMQP_NOPARAM ] { 0 } Constant [ int AMQP_JUST_CONSUME ] { 1 } @@ -1245,7 +1245,7 @@ Extension [ <persistent> extension #124 amqp version 2.0.0alpha1 ] { Property [ private array $arguments = [] ] } - - Methods [25] { + - Methods [26] { Method [ <internal:amqp, ctor> public method __construct ] { - Parameters [1] { @@ -1278,7 +1278,7 @@ Extension [ <persistent> extension #124 amqp version 2.0.0alpha1 ] { Method [ <internal:amqp> public method setFlags ] { - Parameters [1] { - Parameter #0 [ <required> int $flags ] + Parameter #0 [ <required> ?int $flags ] } - Return [ void ] } @@ -1306,6 +1306,14 @@ Extension [ <persistent> extension #124 amqp version 2.0.0alpha1 ] { - Return [ void ] } + Method [ <internal:amqp> public method removeArgument ] { + + - Parameters [1] { + Parameter #0 [ <required> string $argumentName ] + } + - Return [ void ] + } + Method [ <internal:amqp> public method setArguments ] { - Parameters [1] { @@ -1470,7 +1478,7 @@ Extension [ <persistent> extension #124 amqp version 2.0.0alpha1 ] { Property [ private array $arguments = [] ] } - - Methods [20] { + - Methods [21] { Method [ <internal:amqp, ctor> public method __construct ] { - Parameters [1] { @@ -1546,6 +1554,14 @@ Extension [ <persistent> extension #124 amqp version 2.0.0alpha1 ] { - Return [ void ] } + Method [ <internal:amqp> public method removeArgument ] { + + - Parameters [1] { + Parameter #0 [ <required> string $argumentName ] + } + - Return [ void ] + } + Method [ <internal:amqp> public method setArguments ] { - Parameters [1] { diff --git a/amqp-pr455.patch b/amqp-pr455.patch new file mode 100644 index 0000000..0d705e3 --- /dev/null +++ b/amqp-pr455.patch @@ -0,0 +1,22 @@ +From 60ffb76b339dc92f5adcbe44c8852c27769b2250 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Thu, 3 Aug 2023 07:41:46 +0200 +Subject: [PATCH] Fix #454 segfault in setPort + +--- + amqp_connection.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/amqp_connection.c b/amqp_connection.c +index 40c2859d..d8f71b12 100644 +--- a/amqp_connection.c ++++ b/amqp_connection.c +@@ -1165,7 +1165,7 @@ static PHP_METHOD(amqp_connection_class, getPort) + set the port */ + static PHP_METHOD(amqp_connection_class, setPort) + { +- int port; ++ zend_long port; + + /* Get the port from the method params */ + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &port) == FAILURE) { diff --git a/php-pecl-amqp.spec b/php-pecl-amqp.spec index 0994658..da57f28 100644 --- a/php-pecl-amqp.spec +++ b/php-pecl-amqp.spec @@ -18,7 +18,7 @@ %global pecl_name amqp %global ini_name 40-%{pecl_name}.ini %global upstream_version 2.0.0 -%global upstream_prever alpha2 +%global upstream_prever beta1 %global upstream_lower %(echo %{upstream_prever} | tr '[:upper:]' '[:lower:]') %global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} %global _configure ../%{sources}/configure @@ -33,6 +33,8 @@ License: PHP-3.01 URL: https://pecl.php.net/package/amqp Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz +Patch0: %{pecl_name}-pr455.patch + BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.4 @@ -94,6 +96,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd %{sources} +%patch -P0 -p1 + # Upstream often forget to change this extver=$(sed -n '/#define PHP_AMQP_VERSION /{s/.* "//;s/".*$//;p}' php_amqp_version.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then @@ -225,9 +229,6 @@ export RABBITMQ_MNESIA_BASE=$PWD/base ret=0 pushd %{sources} -# https://github.com/php-amqp/php-amqp/issues/448 -rm tests/amqpconnection_tls*.phpt - : Run the upstream test Suite for NTS extension TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ @@ -279,6 +280,11 @@ fi %changelog +* Thu Aug 3 2023 Remi Collet <remi@remirepo.net> - 2.0.0~beta1-1 +- update to 2.0.0beta1 +- fix segfault in test suite using patch from + https://github.com/php-amqp/php-amqp/pull/455 + * Mon Jul 31 2023 Remi Collet <remi@remirepo.net> - 2.0.0~alpha2-1 - update to 2.0.0alpha2 - open https://github.com/php-amqp/php-amqp/issues/448 missing file |