summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--0001-Silent-unexpected-NAN-value-was-coerced-to-string-wa.patch189
-rw-r--r--PHPINFO4
-rw-r--r--REFLECTION26
-rw-r--r--php-pecl-decimal.spec149
4 files changed, 260 insertions, 108 deletions
diff --git a/0001-Silent-unexpected-NAN-value-was-coerced-to-string-wa.patch b/0001-Silent-unexpected-NAN-value-was-coerced-to-string-wa.patch
new file mode 100644
index 0000000..5931087
--- /dev/null
+++ b/0001-Silent-unexpected-NAN-value-was-coerced-to-string-wa.patch
@@ -0,0 +1,189 @@
+From 52477ad2c4739d291644ff87ac62794d686df7fe Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Mon, 29 Sep 2025 08:27:04 +0200
+Subject: [PATCH] Silent "unexpected NAN value was coerced to string" warning
+
+---
+ tests/php7/cast.phpt | 2 +-
+ tests/php7/methods/add.phpt | 18 +++++++++---------
+ tests/php7/methods/div.phpt | 18 +++++++++---------
+ tests/php7/methods/ln.phpt | 10 +++++-----
+ tests/php7/methods/log10.phpt | 10 +++++-----
+ tests/php7/methods/mul.phpt | 18 +++++++++---------
+ tests/php7/methods/sub.phpt | 18 +++++++++---------
+ 7 files changed, 47 insertions(+), 47 deletions(-)
+
+diff --git a/tests/php7/cast.phpt b/tests/php7/cast.phpt
+index bb42d28..464e06b 100644
+--- a/tests/php7/cast.phpt
++++ b/tests/php7/cast.phpt
+@@ -64,7 +64,7 @@ $tests = [
+ [(float) decimal("1234.5678E+9"), 1.2345678E+12],
+ [(float) decimal("1234.5678E+90"), 1.2345678E+93],
+
+- [(string) (float) decimal( "NAN"), "NAN"],
++ [@(string) (float) decimal( "NAN"), "NAN"],
+ [(string) (float) decimal( "INF"), "INF"],
+ [(string) (float) decimal("-INF"), "-INF"],
+
+diff --git a/tests/php7/methods/add.phpt b/tests/php7/methods/add.phpt
+index 18708d2..0eb2bd9 100644
+--- a/tests/php7/methods/add.phpt
++++ b/tests/php7/methods/add.phpt
+@@ -69,15 +69,15 @@ $tests = [
+ ],
+
+ /* Special numbers */
+- [new Decimal( "NAN"), "NAN", (string) (NAN + NAN), 28],
+- [new Decimal( "NAN"), "INF", (string) (NAN + INF), 28],
+- [new Decimal( "NAN"), "-INF", (string) (NAN + -INF), 28],
+- [new Decimal( "INF"), "NAN", (string) (INF + NAN), 28],
+- [new Decimal( "INF"), "INF", (string) (INF + INF), 28],
+- [new Decimal( "INF"), "-INF", (string) (INF + -INF), 28],
+- [new Decimal("-INF"), "NAN", (string) (-INF + NAN), 28],
+- [new Decimal("-INF"), "INF", (string) (-INF + INF), 28],
+- [new Decimal("-INF"), "-INF", (string) (-INF + -INF), 28],
++ [new Decimal( "NAN"), "NAN", @(string) (NAN + NAN), 28],
++ [new Decimal( "NAN"), "INF", @(string) (NAN + INF), 28],
++ [new Decimal( "NAN"), "-INF", @(string) (NAN + -INF), 28],
++ [new Decimal( "INF"), "NAN", @(string) (INF + NAN), 28],
++ [new Decimal( "INF"), "INF", @(string) (INF + INF), 28],
++ [new Decimal( "INF"), "-INF", @(string) (INF + -INF), 28],
++ [new Decimal("-INF"), "NAN", @(string) (-INF + NAN), 28],
++ [new Decimal("-INF"), "INF", @(string) (-INF + INF), 28],
++ [new Decimal("-INF"), "-INF", @(string) (-INF + -INF), 28],
+ ];
+
+ foreach ($tests as $index => $test) {
+diff --git a/tests/php7/methods/div.phpt b/tests/php7/methods/div.phpt
+index 748922d..01d364f 100644
+--- a/tests/php7/methods/div.phpt
++++ b/tests/php7/methods/div.phpt
+@@ -56,15 +56,15 @@ $tests = [
+ ],
+
+ /* Special numbers */
+- [new Decimal( "NAN"), "NAN", (string) (NAN / NAN), 28],
+- [new Decimal( "NAN"), "INF", (string) (NAN / INF), 28],
+- [new Decimal( "NAN"), "-INF", (string) (NAN / -INF), 28],
+- [new Decimal( "INF"), "NAN", (string) (INF / NAN), 28],
+- [new Decimal( "INF"), "INF", (string) (INF / INF), 28],
+- [new Decimal( "INF"), "-INF", (string) (INF / -INF), 28],
+- [new Decimal("-INF"), "NAN", (string) (-INF / NAN), 28],
+- [new Decimal("-INF"), "INF", (string) (-INF / INF), 28],
+- [new Decimal("-INF"), "-INF", (string) (-INF / -INF), 28],
++ [new Decimal( "NAN"), "NAN", @(string) (NAN / NAN), 28],
++ [new Decimal( "NAN"), "INF", @(string) (NAN / INF), 28],
++ [new Decimal( "NAN"), "-INF", @(string) (NAN / -INF), 28],
++ [new Decimal( "INF"), "NAN", @(string) (INF / NAN), 28],
++ [new Decimal( "INF"), "INF", @(string) (INF / INF), 28],
++ [new Decimal( "INF"), "-INF", @(string) (INF / -INF), 28],
++ [new Decimal("-INF"), "NAN", @(string) (-INF / NAN), 28],
++ [new Decimal("-INF"), "INF", @(string) (-INF / INF), 28],
++ [new Decimal("-INF"), "-INF", @(string) (-INF / -INF), 28],
+ ];
+
+ foreach ($tests as $index => $test) {
+diff --git a/tests/php7/methods/ln.phpt b/tests/php7/methods/ln.phpt
+index 29292a7..be5989b 100644
+--- a/tests/php7/methods/ln.phpt
++++ b/tests/php7/methods/ln.phpt
+@@ -36,11 +36,11 @@ $tests = [
+ [decimal("0.000123456"), "-8.999625740681010220998716623", 28],
+ [decimal("0.000123456", 50), "-8.9996257406810102209987166229396596684344507962672", 50],
+
+- [decimal("-INF"), (string) log(-INF), 28],
+- [decimal( "NAN"), (string) log( NAN), 28],
+- [decimal( "INF"), (string) log( INF), 28],
+- [decimal( "0"), (string) log( 0), 28],
+- [decimal( "-1"), (string) log( -1), 28],
++ [decimal("-INF"), @(string) log(-INF), 28],
++ [decimal( "NAN"), @(string) log( NAN), 28],
++ [decimal( "INF"), @(string) log( INF), 28],
++ [decimal( "0"), @(string) log( 0), 28],
++ [decimal( "-1"), @(string) log( -1), 28],
+ ];
+
+ foreach ($tests as $test) {
+diff --git a/tests/php7/methods/log10.phpt b/tests/php7/methods/log10.phpt
+index c92bb22..d055064 100644
+--- a/tests/php7/methods/log10.phpt
++++ b/tests/php7/methods/log10.phpt
+@@ -36,11 +36,11 @@ $tests = [
+ [decimal("0.000123456"), "-3.908487798372228318930600223", 28],
+ [decimal("0.000123456", 50), "-3.9084877983722283189306002229320942053464158123113", 50],
+
+- [decimal("-INF"), (string) log10(-INF), 28],
+- [decimal( "NAN"), (string) log10( NAN), 28],
+- [decimal( "INF"), (string) log10( INF), 28],
+- [decimal( "0"), (string) log10( 0), 28],
+- [decimal( "-1"), (string) log10( -1), 28],
++ [decimal("-INF"), @(string) log10(-INF), 28],
++ [decimal( "NAN"), @(string) log10( NAN), 28],
++ [decimal( "INF"), @(string) log10( INF), 28],
++ [decimal( "0"), @(string) log10( 0), 28],
++ [decimal( "-1"), @(string) log10( -1), 28],
+ ];
+
+ foreach ($tests as $test) {
+diff --git a/tests/php7/methods/mul.phpt b/tests/php7/methods/mul.phpt
+index 8577034..5de56be 100644
+--- a/tests/php7/methods/mul.phpt
++++ b/tests/php7/methods/mul.phpt
+@@ -62,15 +62,15 @@ $tests = [
+ ],
+
+ /* Special numbers */
+- [new Decimal( "NAN"), "NAN", (string) (NAN * NAN), 28],
+- [new Decimal( "NAN"), "INF", (string) (NAN * INF), 28],
+- [new Decimal( "NAN"), "-INF", (string) (NAN * -INF), 28],
+- [new Decimal( "INF"), "NAN", (string) (INF * NAN), 28],
+- [new Decimal( "INF"), "INF", (string) (INF * INF), 28],
+- [new Decimal( "INF"), "-INF", (string) (INF * -INF), 28],
+- [new Decimal("-INF"), "NAN", (string) (-INF * NAN), 28],
+- [new Decimal("-INF"), "INF", (string) (-INF * INF), 28],
+- [new Decimal("-INF"), "-INF", (string) (-INF * -INF), 28],
++ [new Decimal( "NAN"), "NAN", @(string) (NAN * NAN), 28],
++ [new Decimal( "NAN"), "INF", @(string) (NAN * INF), 28],
++ [new Decimal( "NAN"), "-INF", @(string) (NAN * -INF), 28],
++ [new Decimal( "INF"), "NAN", @(string) (INF * NAN), 28],
++ [new Decimal( "INF"), "INF", @(string) (INF * INF), 28],
++ [new Decimal( "INF"), "-INF", @(string) (INF * -INF), 28],
++ [new Decimal("-INF"), "NAN", @(string) (-INF * NAN), 28],
++ [new Decimal("-INF"), "INF", @(string) (-INF * INF), 28],
++ [new Decimal("-INF"), "-INF", @(string) (-INF * -INF), 28],
+
+ [new Decimal( "NAN"), 0, "NAN", 28],
+ [new Decimal( "INF"), 0, "NAN", 28],
+diff --git a/tests/php7/methods/sub.phpt b/tests/php7/methods/sub.phpt
+index 525fe1a..d666c25 100644
+--- a/tests/php7/methods/sub.phpt
++++ b/tests/php7/methods/sub.phpt
+@@ -66,15 +66,15 @@ $tests = [
+ ],
+
+ /* Special numbers */
+- [new Decimal( "NAN"), "NAN", (string) (NAN - NAN), 28],
+- [new Decimal( "NAN"), "INF", (string) (NAN - INF), 28],
+- [new Decimal( "NAN"), "-INF", (string) (NAN - -INF), 28],
+- [new Decimal( "INF"), "NAN", (string) (INF - NAN), 28],
+- [new Decimal( "INF"), "INF", (string) (INF - INF), 28],
+- [new Decimal( "INF"), "-INF", (string) (INF - -INF), 28],
+- [new Decimal("-INF"), "NAN", (string) (-INF - NAN), 28],
+- [new Decimal("-INF"), "INF", (string) (-INF - INF), 28],
+- [new Decimal("-INF"), "-INF", (string) (-INF - -INF), 28],
++ [new Decimal( "NAN"), "NAN", @(string) (NAN - NAN), 28],
++ [new Decimal( "NAN"), "INF", @(string) (NAN - INF), 28],
++ [new Decimal( "NAN"), "-INF", @(string) (NAN - -INF), 28],
++ [new Decimal( "INF"), "NAN", @(string) (INF - NAN), 28],
++ [new Decimal( "INF"), "INF", @(string) (INF - INF), 28],
++ [new Decimal( "INF"), "-INF", @(string) (INF - -INF), 28],
++ [new Decimal("-INF"), "NAN", @(string) (-INF - NAN), 28],
++ [new Decimal("-INF"), "INF", @(string) (-INF - INF), 28],
++ [new Decimal("-INF"), "-INF", @(string) (-INF - -INF), 28],
+ ];
+
+ foreach ($tests as $index => $test) {
+--
+2.51.0
+
diff --git a/PHPINFO b/PHPINFO
index 80f81e4..7a0d7a8 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,5 +2,5 @@
decimal
decimal support => enabled
-decimal version => 1.4.0
-libmpdec version => 2.5.0
+decimal version => 1.5.0
+libmpdec version => 2.5.1
diff --git a/REFLECTION b/REFLECTION
index a842798..1a34827 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,7 +1,7 @@
-Extension [ <persistent> extension #121 decimal version 1.4.0 ] {
+Extension [ <persistent> extension #63 decimal version 1.5.0 ] {
- Classes [1] {
- Class [ <internal:decimal> final class Decimal\Decimal implements JsonSerializable ] {
+ Class [ <internal:decimal> final class Decimal\Decimal implements Stringable, JsonSerializable ] {
- Constants [13] {
Constant [ public int ROUND_UP ] { 101 }
@@ -27,7 +27,7 @@ Extension [ <persistent> extension #121 decimal version 1.4.0 ] {
- Parameters [2] {
Parameter #0 [ <required> $values ]
- Parameter #1 [ <optional> int or NULL $precision ]
+ Parameter #1 [ <optional> ?int $precision = <default> ]
}
- Return [ Decimal\Decimal ]
}
@@ -36,7 +36,7 @@ Extension [ <persistent> extension #121 decimal version 1.4.0 ] {
- Parameters [2] {
Parameter #0 [ <required> $values ]
- Parameter #1 [ <optional> int or NULL $precision ]
+ Parameter #1 [ <optional> ?int $precision = <default> ]
}
- Return [ Decimal\Decimal ]
}
@@ -49,8 +49,8 @@ Extension [ <persistent> extension #121 decimal version 1.4.0 ] {
Method [ <internal:decimal, ctor> public method __construct ] {
- Parameters [2] {
- Parameter #0 [ <optional> $value ]
- Parameter #1 [ <optional> int $precision ]
+ Parameter #0 [ <optional> $value = <default> ]
+ Parameter #1 [ <optional> int $precision = <default> ]
}
}
@@ -169,8 +169,8 @@ Extension [ <persistent> extension #121 decimal version 1.4.0 ] {
Method [ <internal:decimal> public method round ] {
- Parameters [2] {
- Parameter #0 [ <optional> int or NULL $places ]
- Parameter #1 [ <optional> int or NULL $rounding ]
+ Parameter #0 [ <optional> ?int $places = <default> ]
+ Parameter #1 [ <optional> ?int $rounding = <default> ]
}
- Return [ Decimal\Decimal ]
}
@@ -284,9 +284,9 @@ Extension [ <persistent> extension #121 decimal version 1.4.0 ] {
Method [ <internal:decimal> public method toFixed ] {
- Parameters [3] {
- Parameter #0 [ <optional> int or NULL $places ]
- Parameter #1 [ <optional> bool or NULL $commas ]
- Parameter #2 [ <optional> int or NULL $rounding ]
+ Parameter #0 [ <optional> ?int $places = <default> ]
+ Parameter #1 [ <optional> ?bool $commas = <default> ]
+ Parameter #2 [ <optional> ?int $rounding = <default> ]
}
- Return [ string ]
}
@@ -332,12 +332,12 @@ Extension [ <persistent> extension #121 decimal version 1.4.0 ] {
- Parameters [2] {
Parameter #0 [ <required> $op1 ]
- Parameter #1 [ <optional> $op2 ]
+ Parameter #1 [ <optional> $op2 = <default> ]
}
- Return [ bool ]
}
- Method [ <internal:decimal> public method __toString ] {
+ Method [ <internal:decimal, prototype Stringable> public method __toString ] {
- Parameters [0] {
}
diff --git a/php-pecl-decimal.spec b/php-pecl-decimal.spec
index 76000e3..27d09da 100644
--- a/php-pecl-decimal.spec
+++ b/php-pecl-decimal.spec
@@ -1,33 +1,34 @@
# remirepo spec file for php-pecl-decimal
#
-# Copyright (c) 2018-2021 Remi Collet
-# License: CC-BY-SA
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2018-2025 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
+%{?scl:%scl_package php-pecl-decimal}
-%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
-%scl_package php-pecl-decimal
-%endif
+%bcond_without tests
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global with_tests 0%{!?_without_tests:1}
%global pecl_name decimal
+%global pie_vend php-decimal
+%global pie_proj ext-decimal
# After 20-json.ini
%global ini_name 40-%{pecl_name}.ini
+%global sources %{pecl_name}-%{version}
+%global _configure ../%{sources}/configure
Summary: Arbitrary-precision floating-point decimal
-Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 1.4.0
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Name: %{?scl_prefix}php-pecl-%{pecl_name}
+Version: 1.5.0
+Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: MIT
URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Source0: https://pecl.php.net/get/%{sources}.tgz
+
+Patch0: 0001-Silent-unexpected-NAN-value-was-coerced-to-string-wa.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -39,36 +40,21 @@ BuildRequires: mpdecimal-devel >= 2.4
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: %{?scl_prefix}php-json%{?_isa}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
-
-Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
-Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
-%endif
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.1"
-Obsoletes: php81-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
+# Extension
+Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
+Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
+# PECL
+Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+# PIE
+Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version}
+Provides: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} = %{version}
%description
Adds support for correctly-rounded arbitrary precision decimal floating point
-arithmetic in PHP 7.
+arithmetic in PHP.
Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
@@ -77,12 +63,12 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%setup -q -c
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
-mv %{pecl_name}-%{version} NTS
+cd %{sources}
+%patch -P0 -p1
-cd NTS
# 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
@@ -91,9 +77,9 @@ if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
fi
cd ..
+mkdir NTS
%if %{with_zts}
-# Duplicate source tree for NTS / ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Create configuration file
@@ -106,21 +92,22 @@ EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
--with-decimal \
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
--with-decimal \
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -144,74 +131,38 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
# Documentation
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
-%endif
-
-
%check
-%if "%{php_version}" > "8.1"
-# ignore deprecated calls
-rm ?TS/tests/php8/methods/__construct.phpt
-%endif
-
-cd NTS
+cd %{sources}
OPT="-n"
[ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so"
# Minimal load test for NTS extension
%{__php} $OPT \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
-%if %{with_tests}
+%if %{with tests}
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="$OPT -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
+TEST_PHP_ARGS="$OPT -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{__php} -n run-tests.php --show-diff
+%{__php} -n run-tests.php -q --show-diff
%endif
%if %{with_zts}
-cd ../ZTS
# Minimal load test for ZTS extension
%{__ztsphp} $OPT \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
-
-%if %{with_tests}
-: Upstream test suite for ZTS extension
-TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \
-TEST_PHP_ARGS="$OPT -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
-REPORT_EXIT_STATUS=1 \
-%{_bindir}/zts-php -n run-tests.php --show-diff
-%endif
+ --modules | grep '^%{pecl_name}$'
%endif
%files
-%{?_licensedir:%license NTS/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -225,6 +176,18 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Mon Sep 29 2025 Remi Collet <remi@remirepo.net> - 1.5.0-3
+- fix test suite for PHP 8.5.0RC1 using patch from
+ https://github.com/php-decimal/ext-decimal/pull/89
+
+* Fri Sep 26 2025 Remi Collet <remi@remirepo.net> - 1.5.0-2
+- re-license spec file to CECILL-2.1
+- add pie virtual provides (php-decimal/ext-decimal)
+
+* Sat Jan 20 2024 Remi Collet <remi@remirepo.net> - 1.5.0-1
+- update to 1.5.0
+- build out of sources tree
+
* Thu Sep 9 2021 Remi Collet <remi@remirepo.net> - 1.4.0-2
- ignore 1 test for 8.1