summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--0001-fix-prototype.patch25
-rw-r--r--82.patch25
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION73
-rw-r--r--php-pecl-nsq.spec30
5 files changed, 102 insertions, 53 deletions
diff --git a/0001-fix-prototype.patch b/0001-fix-prototype.patch
deleted file mode 100644
index 97368ce..0000000
--- a/0001-fix-prototype.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From e33839a9b7236098c191b0040c2a6ec76ab587d8 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Thu, 20 Feb 2025 07:11:23 +0100
-Subject: [PATCH] fix prototype
-
----
- nsq_lookupd.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/nsq_lookupd.h b/nsq_lookupd.h
-index 52e5f35..c9dd512 100644
---- a/nsq_lookupd.h
-+++ b/nsq_lookupd.h
-@@ -21,7 +21,7 @@ char * request(char * url);
-
- void lookupd_init();
-
--char *lookup();
-+char *lookup(char *host, char *topic);
-
- char *request(char *url);
-
---
-2.48.1
-
diff --git a/82.patch b/82.patch
new file mode 100644
index 0000000..4417d24
--- /dev/null
+++ b/82.patch
@@ -0,0 +1,25 @@
+From 6fea3565c81b4689d73ea43267f6e42306547ae3 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 30 Jul 2025 14:20:14 +0200
+Subject: [PATCH] use Zend/zend_smart_string.h
+
+---
+ pub.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/pub.c b/pub.c
+index eaa0011..c2fb812 100644
+--- a/pub.c
++++ b/pub.c
+@@ -27,7 +27,11 @@
+ #include "ext/standard/php_var.h"
+ #include <errno.h>
+ #include <fcntl.h>
++#if PHP_VERSION_ID < 70200
+ #include "ext/standard/php_smart_string_public.h"
++#else
++#include "Zend/zend_smart_string.h"
++#endif
+ #include "ext/json/php_json.h"
+ #include "zend_smart_str.h"
+ #include <signal.h>
diff --git a/PHPINFO b/PHPINFO
index 7ed4108..ee7d590 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,5 +2,5 @@
nsq
nsq support => enabled
-version => 3.5.1
+version => 3.9.1
author => zhenyu.wu[email:wuzhenyu@kuangjue.com]
diff --git a/REFLECTION b/REFLECTION
index 0c21953..160a634 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #124 nsq version 3.5.1 ] {
+Extension [ <persistent> extension #97 nsq version 3.9.1 ] {
- Dependencies {
Dependency [ json (Required) ]
@@ -17,9 +17,9 @@ Extension [ <persistent> extension #124 nsq version 3.5.1 ] {
}
- Properties [3] {
- Property [ <default> public $nsqConfig ]
- Property [ <default> public $nsqd_connection_fds ]
- Property [ <default> public $conn_timeout ]
+ Property [ public $nsqConfig = NULL ]
+ Property [ public $nsqd_connection_fds = NULL ]
+ Property [ public $conn_timeout = NULL ]
}
- Methods [6] {
@@ -82,7 +82,7 @@ Extension [ <persistent> extension #124 nsq version 3.5.1 ] {
}
- Properties [1] {
- Property [ <default> public $address ]
+ Property [ public $address = NULL ]
}
- Methods [1] {
@@ -107,11 +107,11 @@ Extension [ <persistent> extension #124 nsq version 3.5.1 ] {
}
- Properties [5] {
- Property [ <default> public $message_id ]
- Property [ <default> public $messageId ]
- Property [ <default> public $timestamp ]
- Property [ <default> public $attempts ]
- Property [ <default> public $payload ]
+ Property [ public $message_id = NULL ]
+ Property [ public $messageId = NULL ]
+ Property [ public $timestamp = NULL ]
+ Property [ public $attempts = NULL ]
+ Property [ public $payload = NULL ]
}
- Methods [3] {
@@ -142,7 +142,7 @@ Extension [ <persistent> extension #124 nsq version 3.5.1 ] {
}
}
- Class [ <internal:nsq> class NsqException extends Exception implements Throwable ] {
+ Class [ <internal:nsq> class NsqException extends Exception implements Throwable, Stringable ] {
- Constants [0] {
}
@@ -154,47 +154,82 @@ Extension [ <persistent> extension #124 nsq version 3.5.1 ] {
}
- Properties [4] {
- Property [ <default> protected $message ]
- Property [ <default> protected $code ]
- Property [ <default> protected $file ]
- Property [ <default> protected $line ]
+ Property [ protected $message = '' ]
+ Property [ protected $code = 0 ]
+ Property [ protected string $file = '' ]
+ Property [ protected int $line = 0 ]
}
- Methods [10] {
Method [ <internal:Core, inherits Exception, ctor> public method __construct ] {
- Parameters [3] {
- Parameter #0 [ <optional> $message ]
- Parameter #1 [ <optional> $code ]
- Parameter #2 [ <optional> $previous ]
+ Parameter #0 [ <optional> string $message = "" ]
+ Parameter #1 [ <optional> int $code = 0 ]
+ Parameter #2 [ <optional> ?Throwable $previous = null ]
}
}
Method [ <internal:Core, inherits Exception> public method __wakeup ] {
+
+ - Parameters [0] {
+ }
+ - Tentative return [ void ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
+
+ - Parameters [0] {
+ }
+ - Return [ string ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] {
+
+ - Parameters [0] {
+ }
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] {
+
+ - Parameters [0] {
+ }
+ - Return [ string ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] {
+
+ - Parameters [0] {
+ }
+ - Return [ int ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] {
+
+ - Parameters [0] {
+ }
+ - Return [ array ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] {
+
+ - Parameters [0] {
+ }
+ - Return [ ?Throwable ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] {
+
+ - Parameters [0] {
+ }
+ - Return [ string ]
}
- Method [ <internal:Core, inherits Exception, prototype Throwable> public method __toString ] {
+ Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] {
+
+ - Parameters [0] {
+ }
+ - Return [ string ]
}
}
}
diff --git a/php-pecl-nsq.spec b/php-pecl-nsq.spec
index 044cade..ae11cde 100644
--- a/php-pecl-nsq.spec
+++ b/php-pecl-nsq.spec
@@ -21,13 +21,13 @@
Summary: PHP extension for NSQ client
Name: %{?scl_prefix}php-pecl-nsq
-Version: 3.5.1
-Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Version: 3.9.1
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source: https://pecl.php.net/get/%{sources}%{?prever}.tgz
License: PHP-3.01
URL: https://pecl.php.net/package/nsq
-Patch0: 0001-fix-prototype.patch
+Patch0: 82.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -61,7 +61,7 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd %{sources}
-%patch -P0 -p1 -b .proto
+%patch -P0 -p1
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_NSQ_VERSION/{s/.* "//;s/".*$//;p}' php_nsq.h )
@@ -90,13 +90,16 @@ EOF
cd %{sources}
%{__phpize}
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
cd ../NTS
%configure \
--with-nsq \
--with-libevent-path=%{_root_prefix} \
--with-php-config=%{__phpconfig}
-make %{?_smp_mflags}
+
+%make_build
%if %{with_zts}
cd ../ZTS
@@ -104,7 +107,8 @@ cd ../ZTS
--with-nsq \
--with-libevent-path=%{_root_prefix} \
--with-php-config=%{__ztsphpconfig}
-make %{?_smp_mflags}
+
+%make_build
%endif
@@ -112,12 +116,12 @@ make %{?_smp_mflags}
%{?dtsenable}
: Install the NTS stuff
-make -C NTS install INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
: Install the ZTS stuff
%if %{with_zts}
-make -C ZTS install INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
@@ -175,6 +179,16 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Wed Jul 30 2025 Remi Collet <remi@remirepo.net> - 3.9.1-2
+- fix build with PHP 8.5.0alpha3 using patch from
+
+* Mon Jun 16 2025 Remi Collet <remi@remirepo.net> - 3.9.1-1
+- update to 3.9.1
+
+* Sat May 31 2025 Remi Collet <remi@remirepo.net> - 3.9.0-1
+- update to 3.9.0
+- drop patch merged upstream
+
* Thu Feb 20 2025 Remi Collet <remi@remirepo.net> - 3.5.1-3
- fix lookup function prototype using patch from
https://github.com/yunnian/php-nsq/pull/76