From ae850eb0c0038ce005e9f1326186a6b37c22f64a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 9 Jun 2021 15:58:04 +0200 Subject: add fix for test suite with PHP 8.1 from https://github.com/php/pecl-file_formats-yaml/pull/59 --- php-pecl-yaml.spec | 13 ++++++++++++- yaml-php81.patch | 22 ++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 yaml-php81.patch diff --git a/php-pecl-yaml.spec b/php-pecl-yaml.spec index 9103996..87f3ce6 100644 --- a/php-pecl-yaml.spec +++ b/php-pecl-yaml.spec @@ -24,12 +24,14 @@ Summary: PHP Bindings for yaml Name: %{?sub_prefix}php-pecl-yaml Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 5%{?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}-php81.patch + BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.1 @@ -71,6 +73,9 @@ Obsoletes: php74-pecl-%{pecl_name} <= %{version} %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 @@ -93,6 +98,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -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 @@ -240,6 +247,10 @@ fi %changelog +* Wed Jun 9 2021 Remi Collet - 2.2.1-5 +- add fix for test suite with PHP 8.1 from + https://github.com/php/pecl-file_formats-yaml/pull/59 + * Thu Apr 29 2021 Remi Collet - 2.2.1-4 - F34 rebuild for https://github.com/remicollet/remirepo/issues/174 diff --git a/yaml-php81.patch b/yaml-php81.patch new file mode 100644 index 0000000..edeebcf --- /dev/null +++ b/yaml-php81.patch @@ -0,0 +1,22 @@ +From 53065f4a99d94c6576067df4bc34f1f6fd32d59a Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 9 Jun 2021 15:51:54 +0200 +Subject: [PATCH] relax test, hide deprecation message + +--- + tests/yaml_parse_file_002.phpt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/yaml_parse_file_002.phpt b/tests/yaml_parse_file_002.phpt +index 83c54c7..d626eab 100644 +--- a/tests/yaml_parse_file_002.phpt ++++ b/tests/yaml_parse_file_002.phpt +@@ -5,6 +5,8 @@ yaml_parse_file - error cases + --INI-- + yaml.decode_timestamp=1 + date.timezone=GMT ++; E_ALL - E_DEPRECATED to hide Deprecated: yaml_parse_file(): Passing null to parameter #1... ++error_reporting=24575 + --FILE-- +