summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2025-07-17 10:15:03 +0200
committerRemi Collet <remi@php.net>2025-07-17 10:15:03 +0200
commit376ec51b68106b5672c8f51c0be64fa634280a88 (patch)
treea87e6fb203e931767882c9a8ab5f2d743446111a
parentbdcdfda73b95099cfe2ffcaf6c3e2997e7f7592c (diff)
fix build with PHP 8.5.0alpha2 using patch fromHEADmaster
https://github.com/zeromq/php-zmq/pull/240
-rw-r--r--240.patch23
-rw-r--r--PHPINFO6
-rw-r--r--php-pecl-zmq.spec8
3 files changed, 36 insertions, 1 deletions
diff --git a/240.patch b/240.patch
new file mode 100644
index 0000000..324be60
--- /dev/null
+++ b/240.patch
@@ -0,0 +1,23 @@
+From 94920ac64398901175dc4372a4297817122c52ce Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 17 Jul 2025 10:12:11 +0200
+Subject: [PATCH] use zend_ce_exception instead of zend_exception_get_default()
+ for 8.5
+
+---
+ zmq.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/zmq.c b/zmq.c
+index 1fd9736..e4bd627 100644
+--- a/zmq.c
++++ b/zmq.c
+@@ -2864,7 +2864,7 @@ PHP_MINIT_FUNCTION(zmq)
+ #endif
+
+ INIT_CLASS_ENTRY(ce_exception, "ZMQException", NULL);
+- php_zmq_exception_sc_entry = zend_register_internal_class_ex(&ce_exception, zend_exception_get_default());
++ php_zmq_exception_sc_entry = zend_register_internal_class_ex(&ce_exception, zend_ce_exception);
+ php_zmq_exception_sc_entry->ce_flags &= ~ZEND_ACC_FINAL;
+
+ INIT_CLASS_ENTRY(ce_context_exception, "ZMQContextException", NULL);
diff --git a/PHPINFO b/PHPINFO
new file mode 100644
index 0000000..3212c66
--- /dev/null
+++ b/PHPINFO
@@ -0,0 +1,6 @@
+
+zmq
+
+ZMQ extension => enabled
+ZMQ extension version => 1.1.3
+libzmq version => 4.3.4
diff --git a/php-pecl-zmq.spec b/php-pecl-zmq.spec
index b109434..c3a6397 100644
--- a/php-pecl-zmq.spec
+++ b/php-pecl-zmq.spec
@@ -26,7 +26,7 @@
Summary: ZeroMQ messaging
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 1.1.3
-Release: 19%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 20%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: BSD-3-Clause
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
@@ -35,6 +35,7 @@ Patch0: https://patch-diff.githubusercontent.com/raw/zeromq/php-zmq/pull
Patch1: https://patch-diff.githubusercontent.com/raw/zeromq/php-zmq/pull/222.patch
Patch2: https://patch-diff.githubusercontent.com/raw/zeromq/php-zmq/pull/228.patch
Patch3: https://patch-diff.githubusercontent.com/raw/zeromq/php-zmq/pull/238.patch
+Patch4: https://patch-diff.githubusercontent.com/raw/zeromq/php-zmq/pull/240.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -76,6 +77,7 @@ cd %{sources}
%patch -P1 -p1 -b .pr222
%patch -P2 -p1 -b .pr228
%patch -P3 -p1 -b .pr238
+%patch -P4 -p1 -b .pr240
if pkg-config libzmq --atleast-version=4
then
@@ -201,6 +203,10 @@ export TEST_PHP_EXECUTABLE=%{__ztsphp}
%changelog
+* Thu Jul 17 2025 Remi Collet <remi@remirepo.net> - 1.1.3-20
+- fix build with PHP 8.5.0alpha2 using patch from
+ https://github.com/zeromq/php-zmq/pull/240
+
* Wed Jan 22 2025 Remi Collet <remi@remirepo.net> - 1.1.3-19
- fix build with GCC 15 using patch from
https://github.com/zeromq/php-zmq/pull/238