From 483932783561752f0add0693b8b221a2fd09246e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 4 Feb 2020 07:50:00 +0100 Subject: update to 1.3.1 drop patch merged upstream --- 25.patch | 29 ------------------ PHPINFO | 2 +- REFLECTION | 85 ++++++++++++++++++++++++++++----------------------- php-pecl-decimal.spec | 18 +++++------ 4 files changed, 57 insertions(+), 77 deletions(-) delete mode 100644 25.patch diff --git a/25.patch b/25.patch deleted file mode 100644 index bd6e25e..0000000 --- a/25.patch +++ /dev/null @@ -1,29 +0,0 @@ -From fd15500d437d41ab0351ca0c706bfbf049599241 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 22 Aug 2019 14:04:10 +0200 -Subject: [PATCH] fix test for PHP 7.4 - ---- - tests/reflection.phpt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tests/reflection.phpt b/tests/reflection.phpt -index ac0e9c0..a9c3613 100644 ---- a/tests/reflection.phpt -+++ b/tests/reflection.phpt -@@ -32,13 +32,13 @@ function print_method_summary(ReflectionClass $class, string $method) - printf("%s\n", $method->getName()); - printf("Number of parameters: %d\n", $method->getNumberOfParameters()); - printf("Number of required parameters: %d\n", $method->getNumberOfRequiredParameters()); -- printf("Return type: %s\n", $method->hasReturnType() ? $method->getReturnType() : "void"); -+ printf("Return type: %s\n", $method->hasReturnType() ? (PHP_VERSION_ID >= 70100 ? $method->getReturnType()->getName() : (string) $method->getReturnType()) : "void"); - printf("Allows return null? %s\n", $method->hasReturnType() ? ($method->getReturnType()->allowsNull() ? "yes" : "no") : "no"); - printf("Returns reference? %s\n", $method->returnsReference() ? "yes" : "no"); - printf("Parameters:\n"); - foreach ($method->getParameters() as $parameter) { - printf("Name: %s\n", $parameter->getName()); -- printf("Type: %s\n", ((string) $parameter->getType()) ?: "mixed"); -+ printf("Type: %s\n", ($parameter->hasType() ? (PHP_VERSION_ID >= 70100 ? $parameter->getType()->getName() : (string) $parameter->getType()) : "mixed")); - printf("Reference? %s\n", $parameter->isPassedByReference() ? "yes" : "no"); - printf("Allows null? %s\n", $parameter->allowsNull() ? "yes" : "no"); - printf("Optional? %s\n", $parameter->isOptional() ? "yes" : "no"); diff --git a/PHPINFO b/PHPINFO index a8cb914..1690582 100644 --- a/PHPINFO +++ b/PHPINFO @@ -2,5 +2,5 @@ decimal decimal support => enabled -decimal version => 1.3.0 +decimal version => 1.3.1 libmpdec version => 2.4.2 diff --git a/REFLECTION b/REFLECTION index 69e673b..bba6510 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,22 +1,22 @@ -Extension [ extension #86 decimal version 1.3.0 ] { +Extension [ extension #109 decimal version 1.3.1 ] { - Classes [1] { Class [ final class Decimal\Decimal implements JsonSerializable ] { - Constants [13] { - Constant [ public integer ROUND_UP ] { 101 } - Constant [ public integer ROUND_DOWN ] { 102 } - Constant [ public integer ROUND_CEILING ] { 103 } - Constant [ public integer ROUND_FLOOR ] { 104 } - Constant [ public integer ROUND_HALF_UP ] { 105 } - Constant [ public integer ROUND_HALF_DOWN ] { 106 } - Constant [ public integer ROUND_HALF_EVEN ] { 107 } - Constant [ public integer ROUND_HALF_ODD ] { 108 } - Constant [ public integer ROUND_TRUNCATE ] { 109 } - Constant [ public integer DEFAULT_PRECISION ] { 28 } - Constant [ public integer DEFAULT_ROUNDING ] { 107 } - Constant [ public integer MIN_PRECISION ] { 1 } - Constant [ public integer MAX_PRECISION ] { 999999999999999999 } + Constant [ public int ROUND_UP ] { 101 } + Constant [ public int ROUND_DOWN ] { 102 } + Constant [ public int ROUND_CEILING ] { 103 } + Constant [ public int ROUND_FLOOR ] { 104 } + Constant [ public int ROUND_HALF_UP ] { 105 } + Constant [ public int ROUND_HALF_DOWN ] { 106 } + Constant [ public int ROUND_HALF_EVEN ] { 107 } + Constant [ public int ROUND_HALF_ODD ] { 108 } + Constant [ public int ROUND_TRUNCATE ] { 109 } + Constant [ public int DEFAULT_PRECISION ] { 28 } + Constant [ public int DEFAULT_ROUNDING ] { 107 } + Constant [ public int MIN_PRECISION ] { 1 } + Constant [ public int MAX_PRECISION ] { 999999999999999999 } } - Static properties [0] { @@ -27,7 +27,7 @@ Extension [ extension #86 decimal version 1.3.0 ] { - Parameters [2] { Parameter #0 [ $values ] - Parameter #1 [ integer or NULL $precision ] + Parameter #1 [ int or NULL $precision ] } - Return [ Decimal\Decimal ] } @@ -36,7 +36,7 @@ Extension [ extension #86 decimal version 1.3.0 ] { - Parameters [2] { Parameter #0 [ $values ] - Parameter #1 [ integer or NULL $precision ] + Parameter #1 [ int or NULL $precision ] } - Return [ Decimal\Decimal ] } @@ -45,12 +45,12 @@ Extension [ extension #86 decimal version 1.3.0 ] { - Properties [0] { } - - Methods [40] { + - Methods [41] { Method [ public method __construct ] { - Parameters [2] { Parameter #0 [ $value ] - Parameter #1 [ integer $precision ] + Parameter #1 [ int $precision ] } } @@ -169,8 +169,8 @@ Extension [ extension #86 decimal version 1.3.0 ] { Method [ public method round ] { - Parameters [2] { - Parameter #0 [ integer or NULL $places ] - Parameter #1 [ integer or NULL $rounding ] + Parameter #0 [ int or NULL $places ] + Parameter #1 [ int or NULL $rounding ] } - Return [ Decimal\Decimal ] } @@ -178,7 +178,7 @@ Extension [ extension #86 decimal version 1.3.0 ] { Method [ public method shift ] { - Parameters [1] { - Parameter #0 [ integer $places ] + Parameter #0 [ int $places ] } - Return [ Decimal\Decimal ] } @@ -194,21 +194,21 @@ Extension [ extension #86 decimal version 1.3.0 ] { - Parameters [0] { } - - Return [ integer ] + - Return [ int ] } Method [ public method signum ] { - Parameters [0] { } - - Return [ integer ] + - Return [ int ] } Method [ public method parity ] { - Parameters [0] { } - - Return [ integer ] + - Return [ int ] } Method [ public method abs ] { @@ -229,64 +229,64 @@ Extension [ extension #86 decimal version 1.3.0 ] { - Parameters [0] { } - - Return [ boolean ] + - Return [ bool ] } Method [ public method isOdd ] { - Parameters [0] { } - - Return [ boolean ] + - Return [ bool ] } Method [ public method isPositive ] { - Parameters [0] { } - - Return [ boolean ] + - Return [ bool ] } Method [ public method isNegative ] { - Parameters [0] { } - - Return [ boolean ] + - Return [ bool ] } Method [ public method isNaN ] { - Parameters [0] { } - - Return [ boolean ] + - Return [ bool ] } Method [ public method isInf ] { - Parameters [0] { } - - Return [ boolean ] + - Return [ bool ] } Method [ public method isInteger ] { - Parameters [0] { } - - Return [ boolean ] + - Return [ bool ] } Method [ public method isZero ] { - Parameters [0] { } - - Return [ boolean ] + - Return [ bool ] } Method [ public method toFixed ] { - Parameters [3] { - Parameter #0 [ integer or NULL $places ] - Parameter #1 [ boolean or NULL $commas ] - Parameter #2 [ integer or NULL $rounding ] + Parameter #0 [ int or NULL $places ] + Parameter #1 [ bool or NULL $commas ] + Parameter #2 [ int or NULL $rounding ] } - Return [ string ] } @@ -302,7 +302,7 @@ Extension [ extension #86 decimal version 1.3.0 ] { - Parameters [0] { } - - Return [ integer ] + - Return [ int ] } Method [ public method toFloat ] { @@ -317,7 +317,7 @@ Extension [ extension #86 decimal version 1.3.0 ] { - Parameters [1] { Parameter #0 [ $other ] } - - Return [ boolean ] + - Return [ bool ] } Method [ public method compareTo ] { @@ -325,7 +325,16 @@ Extension [ extension #86 decimal version 1.3.0 ] { - Parameters [1] { Parameter #0 [ $other ] } - - Return [ integer ] + - Return [ int ] + } + + Method [ public method between ] { + + - Parameters [2] { + Parameter #0 [ $other ] + Parameter #1 [ $other ] + } + - Return [ bool ] } Method [ public method __toString ] { diff --git a/php-pecl-decimal.spec b/php-pecl-decimal.spec index 3a0e478..d289100 100644 --- a/php-pecl-decimal.spec +++ b/php-pecl-decimal.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-pecl-decimal # -# Copyright (c) 2018-2019 Remi Collet +# Copyright (c) 2018-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -23,13 +23,11 @@ Summary: Arbitrary-precision floating-point decimal Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 1.3.0 -Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: 1.3.1 +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: MIT -URL: http://pecl.php.net/package/%{pecl_name} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz - -Patch0: https://patch-diff.githubusercontent.com/raw/php-decimal/ext-decimal/pull/25.patch +URL: https://pecl.php.net/package/%{pecl_name} +Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel > 7 @@ -94,8 +92,6 @@ sed -e 's/role="test"/role="src"/' \ mv %{pecl_name}-%{version} NTS cd NTS -%patch0 -p1 -b .pr25 - # Sanity check, really often broken extver=$(sed -n '/#define PHP_DECIMAL_VERSION/{s/.* "//;s/".*$//;p}' php_decimal.h) if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then @@ -232,6 +228,10 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Tue Feb 4 2020 Remi Collet - 1.3.1-1 +- update to 1.3.1 +- drop patch merged upstream + * Tue Sep 03 2019 Remi Collet - 1.3.0-3 - rebuild for 7.4.0RC1 -- cgit