From 27a1303c7f72b767a6bda6a2df4b76e2dcec5ade Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 9 Sep 2022 15:56:13 +0200 Subject: add upstream patch for test suite with PHP 8.2 --- php-pecl-yaml.spec | 7 ++++++- yaml-upstream.patch | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 yaml-upstream.patch diff --git a/php-pecl-yaml.spec b/php-pecl-yaml.spec index 25a47f0..7db8acc 100644 --- a/php-pecl-yaml.spec +++ b/php-pecl-yaml.spec @@ -24,13 +24,14 @@ Summary: PHP Bindings for yaml Name: %{?sub_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: %{pecl_name}-pr66.patch +Patch1: %{pecl_name}-upstream.patch BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -93,6 +94,7 @@ sed -e 's/role="test"/role="src"/' \ cd NTS %patch0 -p1 -b .pr66 +%patch1 -p1 -b .up # Check upstream version (often broken) extver=$(sed -n '/#define PHP_YAML_VERSION/{s/.* "//;s/".*$//;p}' php_yaml.h) @@ -237,6 +239,9 @@ fi %changelog +* Fri Sep 9 2022 Remi Collet - 2.2.2-3 +- add upstream patch for test suite with PHP 8.2 + * Tue Feb 22 2022 Remi Collet - 2.2.2-2 - fix gh#65 yaml_parse_url method not working using patch from https://github.com/php/pecl-file_formats-yaml/pull/66 diff --git a/yaml-upstream.patch b/yaml-upstream.patch new file mode 100644 index 0000000..9457a57 --- /dev/null +++ b/yaml-upstream.patch @@ -0,0 +1,22 @@ +From 534124b8227d26e0e914dabb05425ddc160d9f31 Mon Sep 17 00:00:00 2001 +From: Andy Postnikov +Date: Fri, 10 Jun 2022 12:42:20 +0300 +Subject: [PATCH] Fix test for PHP 8.2 + +--- + 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 8d8d62f..2189b90 100644 +--- a/tests/bug_79866.phpt ++++ b/tests/bug_79866.phpt +@@ -35,7 +35,7 @@ foreach( $floats as $idx => $float ) { + $expect = "--- {$native}\n...\n"; + $got = yaml_emit($float); + if ( $got !== $expect ) { +- echo "== FAIL! ${idx} ==\n"; ++ echo "== FAIL! {$idx} ==\n"; + echo "expected:\n{$expect}\n"; + echo "got:{$got}\n"; + } -- cgit