summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pecl-yaml.spec6
-rw-r--r--yaml-php81.patch28
2 files changed, 32 insertions, 2 deletions
diff --git a/php-pecl-yaml.spec b/php-pecl-yaml.spec
index 87f3ce6..0346b68 100644
--- a/php-pecl-yaml.spec
+++ b/php-pecl-yaml.spec
@@ -24,7 +24,7 @@
Summary: PHP Bindings for yaml
Name: %{?sub_prefix}php-pecl-yaml
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 6%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: MIT
URL: https://pecl.php.net/package/yaml
@@ -247,6 +247,10 @@ fi
%changelog
+* Fri Jul 23 2021 Remi Collet <remi@remirepo.net> - 2.2.1-6
+- add fix for PHP 8.1.0beta1 from
+ https://github.com/php/pecl-file_formats-yaml/pull/59
+
* Wed Jun 9 2021 Remi Collet <remi@remirepo.net> - 2.2.1-5
- add fix for test suite with PHP 8.1 from
https://github.com/php/pecl-file_formats-yaml/pull/59
diff --git a/yaml-php81.patch b/yaml-php81.patch
index edeebcf..7cee205 100644
--- a/yaml-php81.patch
+++ b/yaml-php81.patch
@@ -1,7 +1,7 @@
From 53065f4a99d94c6576067df4bc34f1f6fd32d59a Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Wed, 9 Jun 2021 15:51:54 +0200
-Subject: [PATCH] relax test, hide deprecation message
+Subject: [PATCH 1/2] relax test, hide deprecation message
---
tests/yaml_parse_file_002.phpt | 2 ++
@@ -20,3 +20,29 @@ index 83c54c7..d626eab 100644
--FILE--
<?php
try {
+
+From 0dbda266156a6d77496f28c5055131bcb4ca0b7f Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 23 Jul 2021 13:52:03 +0200
+Subject: [PATCH 2/2] fix ZEND_ATOL usage
+
+---
+ detect.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/detect.c b/detect.c
+index 1d650f7..0a18aba 100644
+--- a/detect.c
++++ b/detect.c
+@@ -542,7 +542,11 @@ scalar_is_numeric(const char *value, size_t length, zend_long *lval,
+ break;
+
+ default:
++#if PHP_VERSION_ID < 80100
+ ZEND_ATOL(*lval, buf);
++#else
++ *lval = ZEND_ATOL(buf);
++#endif
+ break;
+ }
+