summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--0001-fix-prototype.patch25
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION73
-rw-r--r--php-pecl-nsq.spec24
4 files changed, 69 insertions, 55 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/PHPINFO b/PHPINFO
index 7ed4108..3f44d9f 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,5 +2,5 @@
nsq
nsq support => enabled
-version => 3.5.1
+version => 3.9.0
author => zhenyu.wu[email:wuzhenyu@kuangjue.com]
diff --git a/REFLECTION b/REFLECTION
index 0c21953..522562c 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.0 ] {
- 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..7d21000 100644
--- a/php-pecl-nsq.spec
+++ b/php-pecl-nsq.spec
@@ -21,14 +21,12 @@
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.0
+Release: 1%{?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
-
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
@@ -61,8 +59,6 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd %{sources}
-%patch -P0 -p1 -b .proto
-
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_NSQ_VERSION/{s/.* "//;s/".*$//;p}' php_nsq.h )
if test "x${extver}" != "x%{version}"; then
@@ -90,13 +86,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 +103,8 @@ cd ../ZTS
--with-nsq \
--with-libevent-path=%{_root_prefix} \
--with-php-config=%{__ztsphpconfig}
-make %{?_smp_mflags}
+
+%make_build
%endif
@@ -112,12 +112,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 +175,10 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* 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