summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--95.patch22
-rw-r--r--php-pecl-yaml.spec14
2 files changed, 31 insertions, 5 deletions
diff --git a/95.patch b/95.patch
new file mode 100644
index 0000000..fbb37e4
--- /dev/null
+++ b/95.patch
@@ -0,0 +1,22 @@
+From e8069a1fcc62328410812acf9dccf656e7c7c5fd Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Sat, 27 Sep 2025 15:45:16 +0200
+Subject: [PATCH] avoid unexpected NAN value was coerced to string
+
+---
+ tests/bug_79866.phpt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/bug_79866.phpt b/tests/bug_79866.phpt
+index 2189b90..6dbc813 100644
+--- a/tests/bug_79866.phpt
++++ b/tests/bug_79866.phpt
+@@ -29,7 +29,7 @@ $floats = [
+ foreach( $floats as $idx => $float ) {
+ $float = floatval($float);
+ ob_start();
+- echo $float;
++ @print_r($float);
+ $native = ob_get_clean();
+
+ $expect = "--- {$native}\n...\n";
diff --git a/php-pecl-yaml.spec b/php-pecl-yaml.spec
index 4056962..c3c9b91 100644
--- a/php-pecl-yaml.spec
+++ b/php-pecl-yaml.spec
@@ -25,12 +25,14 @@
Summary: PHP Bindings for yaml
Name: %{?scl_prefix}php-pecl-yaml
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: MIT
URL: https://pecl.php.net/package/yaml
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Patch0: https://patch-diff.githubusercontent.com/raw/php/pecl-file_formats-yaml/pull/95.patch
+
ExcludeArch: %{ix86}
BuildRequires: make
@@ -66,6 +68,8 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd %{sources}
+%patch -P0 -p1
+
# Check upstream version (often broken)
extver=$(sed -n '/#define PHP_YAML_VERSION/{s/.* "//;s/".*$//;p}' php_yaml.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
@@ -154,10 +158,6 @@ done
%check
cd %{sources}
-%if "%{php_version}" > "8.5"
-# unexpected NAN value was coerced to string
-rm tests/bug_79866.phpt
-%endif
: Minimal load test for NTS extension
%{__php} --no-php-ini \
@@ -201,6 +201,10 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Sat Sep 27 2025 Remi Collet <remi@remirepo.net> - 2.2.5-3
+- add patch for PHP 8.5.0RC1 from
+ https://github.com/php/pecl-file_formats-yaml/pull/95
+
* Thu Sep 25 2025 Remi Collet <remi@remirepo.net> - 2.2.5-2
- rebuild for PHP 8.5.0RC1
- ignore 1 test with PHP 8.5 (NaN)