From 90b18b14295d5cb09088c76929ecb97628f6be9a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 13 Sep 2022 09:30:10 +0200 Subject: add patch for test suite with PHP 8.2 from https://github.com/census-instrumentation/opencensus-php/pull/286 --- .gitignore | 2 ++ opencensus-tests.patch | 36 ++++++++++++++++++++++++++++++++++++ php-pecl-opencensus.spec | 35 ++++++++++------------------------- 3 files changed, 48 insertions(+), 25 deletions(-) create mode 100644 opencensus-tests.patch diff --git a/.gitignore b/.gitignore index 1ab5c4f..01f0400 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ +clog package-*.xml *.tgz +*.tar.bz2 *.tar.gz *.tar.xz *.tar.xz.asc diff --git a/opencensus-tests.patch b/opencensus-tests.patch new file mode 100644 index 0000000..fde5970 --- /dev/null +++ b/opencensus-tests.patch @@ -0,0 +1,36 @@ +From 294a85ebe3f183680ae0f8ad18f122afad588127 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Tue, 13 Sep 2022 09:18:32 +0200 +Subject: [PATCH] fix 8.2 deprecation + +--- + ext/tests/basic_context.phpt | 2 +- + ext/tests/inherit_context.phpt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ext/tests/basic_context.phpt b/ext/tests/basic_context.phpt +index 8f162aa26..832103e50 100644 +--- a/ext/tests/basic_context.phpt ++++ b/ext/tests/basic_context.phpt +@@ -4,7 +4,7 @@ OpenCensus Trace: Basic Context Test + "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 %description @@ -93,7 +74,7 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -sed -e 's/ZVAL_DESTRUCTOR/zval_dtor/' -i *.c +%patch0 -p2 # Sanity check, really often broken extver=$(sed -n '/#define PHP_OPENCENSUS_VERSION/{s/.* "//;s/".*$//;p}' php_opencensus.h) @@ -233,6 +214,10 @@ fi %changelog +* Tue Sep 13 2022 Remi Collet - 0.3.0-3 +- add patch for test suite with PHP 8.2 from + https://github.com/census-instrumentation/opencensus-php/pull/286 + * Wed Sep 01 2021 Remi Collet - 0.3.0-2 - rebuild for 8.1.0RC1 -- cgit