summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2017-03-13 07:22:59 +0100
committerRemi Collet <fedora@famillecollet.com>2017-03-13 07:22:59 +0100
commitbde1475971e58c3a4cd0bf268fbdbcc5ac032965 (patch)
treec130c195410fd35f9a99573de4dbf94645037993
parentf0191bffa2c5d377196ded609372baffd2d80ffc (diff)
php-pecl-amqp: 1.9.0beta1
-rw-r--r--REFLECTION143
-rw-r--r--amqp-pr274.patch35
-rw-r--r--php-pecl-amqp.spec14
3 files changed, 187 insertions, 5 deletions
diff --git a/REFLECTION b/REFLECTION
index 10d23e8..a238e6b 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #72 amqp version 1.8.0 ] {
+Extension [ <persistent> extension #72 amqp version 1.9.0beta1 ] {
- INI {
Entry [ amqp.host <ALL> ]
@@ -82,7 +82,7 @@ Extension [ <persistent> extension #72 amqp version 1.8.0 ] {
Constant [ integer PHP_AMQP_MAX_CHANNELS ] { 256 }
}
- - Classes [11] {
+ - Classes [14] {
Class [ <internal:amqp> class AMQPConnection ] {
- Constants [0] {
@@ -1141,6 +1141,88 @@ Extension [ <persistent> extension #72 amqp version 1.8.0 ] {
}
}
+ Class [ <internal:amqp> final class AMQPTimestamp ] {
+
+ - Constants [2] {
+ Constant [ string MAX ] { 18446744073709551616 }
+ Constant [ string MIN ] { 0 }
+ }
+
+ - Static properties [0] {
+ }
+
+ - Static methods [0] {
+ }
+
+ - Properties [1] {
+ Property [ <default> private $timestamp ]
+ }
+
+ - Methods [3] {
+ Method [ <internal:amqp, ctor> public method __construct ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <optional> $timestamp ]
+ }
+ }
+
+ Method [ <internal:amqp> public method getTimestamp ] {
+
+ - Parameters [0] {
+ }
+ }
+
+ Method [ <internal:amqp> public method __toString ] {
+
+ - Parameters [0] {
+ }
+ }
+ }
+ }
+
+ Class [ <internal:amqp> final class AMQPDecimal ] {
+
+ - Constants [4] {
+ Constant [ integer EXPONENT_MIN ] { 0 }
+ Constant [ integer EXPONENT_MAX ] { 255 }
+ Constant [ integer SIGNIFICAND_MIN ] { 0 }
+ Constant [ integer SIGNIFICAND_MAX ] { 4294967295 }
+ }
+
+ - Static properties [0] {
+ }
+
+ - Static methods [0] {
+ }
+
+ - Properties [2] {
+ Property [ <default> private $exponent ]
+ Property [ <default> private $significand ]
+ }
+
+ - Methods [3] {
+ Method [ <internal:amqp, ctor> public method __construct ] {
+
+ - Parameters [2] {
+ Parameter #0 [ <required> $exponent ]
+ Parameter #1 [ <required> $significand ]
+ }
+ }
+
+ Method [ <internal:amqp> public method getExponent ] {
+
+ - Parameters [0] {
+ }
+ }
+
+ Method [ <internal:amqp> public method getSignificand ] {
+
+ - Parameters [0] {
+ }
+ }
+ }
+ }
+
Class [ <internal:amqp> class AMQPException extends Exception implements Throwable ] {
- Constants [0] {
@@ -1425,6 +1507,63 @@ Extension [ <persistent> extension #72 amqp version 1.8.0 ] {
}
}
}
+
+ Class [ <internal:amqp> class AMQPValueException extends AMQPException implements Throwable ] {
+
+ - Constants [0] {
+ }
+
+ - Static properties [0] {
+ }
+
+ - Static methods [0] {
+ }
+
+ - Properties [4] {
+ Property [ <default> protected $message ]
+ Property [ <default> protected $code ]
+ Property [ <default> protected $file ]
+ Property [ <default> protected $line ]
+ }
+
+ - 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 ]
+ }
+ }
+
+ Method [ <internal:Core, inherits Exception> public method __wakeup ] {
+ }
+
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
+ }
+
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] {
+ }
+
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] {
+ }
+
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] {
+ }
+
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] {
+ }
+
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] {
+ }
+
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] {
+ }
+
+ Method [ <internal:Core, inherits Exception, prototype Throwable> public method __toString ] {
+ }
+ }
+ }
}
}
diff --git a/amqp-pr274.patch b/amqp-pr274.patch
new file mode 100644
index 0000000..4817470
--- /dev/null
+++ b/amqp-pr274.patch
@@ -0,0 +1,35 @@
+From f031d8492f0acfc0f38e8e5e4e01ed87a22234b2 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Mon, 13 Mar 2017 06:57:14 +0100
+Subject: [PATCH] adapt buffer size and secure its usage, fix #273
+
+---
+ amqp_timestamp.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/amqp_timestamp.c b/amqp_timestamp.c
+index 70013f1..79b0e52 100644
+--- a/amqp_timestamp.c
++++ b/amqp_timestamp.c
+@@ -119,7 +119,7 @@ zend_function_entry amqp_timestamp_class_functions[] = {
+ PHP_MINIT_FUNCTION(amqp_timestamp)
+ {
+ zend_class_entry ce;
+- char min[1], max[20];
++ char min[20], max[20];
+ int min_len, max_len;
+
+ INIT_CLASS_ENTRY(ce, "AMQPTimestamp", amqp_timestamp_class_functions);
+@@ -128,10 +128,10 @@ PHP_MINIT_FUNCTION(amqp_timestamp)
+
+ zend_declare_property_null(this_ce, ZEND_STRL("timestamp"), ZEND_ACC_PRIVATE TSRMLS_CC);
+
+- max_len = sprintf(max, "%.0f", AMQP_TIMESTAMP_MAX);
++ max_len = snprintf(max, sizeof(max), "%.0f", AMQP_TIMESTAMP_MAX);
+ zend_declare_class_constant_stringl(this_ce, ZEND_STRL("MAX"), max, max_len TSRMLS_CC);
+
+- min_len = sprintf(min, "%.0f", AMQP_TIMESTAMP_MIN);
++ min_len = snprintf(min, sizeof(min), "%.0f", AMQP_TIMESTAMP_MIN);
+ zend_declare_class_constant_stringl(this_ce, ZEND_STRL("MIN"), min, min_len TSRMLS_CC);
+
+ return SUCCESS;
diff --git a/php-pecl-amqp.spec b/php-pecl-amqp.spec
index 30d4a03..599b178 100644
--- a/php-pecl-amqp.spec
+++ b/php-pecl-amqp.spec
@@ -22,22 +22,25 @@
%else
%global ini_name 40-%{pecl_name}.ini
%endif
-#global prever beta2
+%global prever beta1
%global buildver %(pkg-config --silence-errors --modversion librabbitmq 2>/dev/null || echo 65536)
Summary: Communicate with any AMQP compliant server
Name: %{?sub_prefix}php-pecl-amqp
-Version: 1.8.0
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Version: 1.9.0
+Release: 0.1.%{prever}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
Group: Development/Languages
URL: http://pecl.php.net/package/amqp
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+Patch0: %{pecl_name}-pr274.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: %{?scl_prefix}php-devel > 5.3.0
BuildRequires: %{?scl_prefix}php-pear
+#BuildRequires: php-debuginfo valgrind gdb
# Upstream requires 0.5.2, set 0.8.0 to ensure "last" is used.
%if 0%{?fedora} >= 23
BuildRequires: librabbitmq-devel >= 0.8.0
@@ -114,6 +117,7 @@ sed -e 's/role="test"/role="src"/' \
mv %{pecl_name}-%{version}%{?prever} NTS
cd NTS
+%patch0 -p1 -b .pr274
sed -e 's/CFLAGS="-I/CFLAGS="-fPIC -I/' -i config.m4
# Upstream often forget to change this
@@ -308,6 +312,10 @@ fi
%changelog
+* Mon Mar 13 2017 Remi Collet <remi@remirepo.net> - 1.9.0-0.1.beta1
+- Update to 1.9.0beta1
+- add patch from https://github.com/pdezwart/php-amqp/pull/274
+
* Sun Feb 19 2017 Remi Collet <remi@remirepo.net> - 1.8.0-2
- ensure proper librabbitmq version is used