From fb8dc6bde64bede6186edb611e324a6001873109 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 28 Sep 2020 15:53:19 +0200 Subject: add patch for test suite with PHP 8 from https://github.com/Imagick/imagick/pull/350 simpler warning --- 350.patch | 29 +++++++++++++++++++++++++++++ php-pecl-imagick.spec | 8 +++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 350.patch diff --git a/350.patch b/350.patch new file mode 100644 index 0000000..964cc72 --- /dev/null +++ b/350.patch @@ -0,0 +1,29 @@ +From 4ace7cf1db75577e9c8eeb4826c9a04ac9bef4a9 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 28 Sep 2020 15:06:14 +0200 +Subject: [PATCH] simpler warning to avoid DivisionByZeroError exception in 8 + +--- + tests/270_imagick_restoreErrorHandler.phpt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/270_imagick_restoreErrorHandler.phpt b/tests/270_imagick_restoreErrorHandler.phpt +index 77eeb17..ba2f5d1 100644 +--- a/tests/270_imagick_restoreErrorHandler.phpt ++++ b/tests/270_imagick_restoreErrorHandler.phpt +@@ -16,7 +16,7 @@ catch(ImagickException $ie) { + } + + try { +- $x = @(5 / 0); ++ $x = @$x; + echo "Normal warning is suppressed".PHP_EOL; + } + catch(\Exception $e) { +@@ -27,4 +27,4 @@ catch(\Exception $e) { + ?> + --EXPECTF-- + Normal exception +-Normal warning is suppressed +\ No newline at end of file ++Normal warning is suppressed diff --git a/php-pecl-imagick.spec b/php-pecl-imagick.spec index 908b1d6..3c940a1 100644 --- a/php-pecl-imagick.spec +++ b/php-pecl-imagick.spec @@ -37,7 +37,7 @@ Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} Release: 0.8.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz %else -Release: 12%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 13%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz %endif License: PHP @@ -47,6 +47,7 @@ Patch0: %{pecl_name}-php8.patch Patch1: https://patch-diff.githubusercontent.com/raw/Imagick/imagick/pull/346.patch Patch2: https://patch-diff.githubusercontent.com/raw/Imagick/imagick/pull/347.patch Patch3: https://patch-diff.githubusercontent.com/raw/Imagick/imagick/pull/348.patch +Patch4: https://patch-diff.githubusercontent.com/raw/Imagick/imagick/pull/350.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel > 5.4 @@ -164,6 +165,7 @@ cd NTS %patch1 -p1 -b .pr346 %patch2 -p1 -b .pr347 %patch3 -p1 -b .pr348 +%patch4 -p1 -b .pr350 extver=$(sed -n '/#define PHP_IMAGICK_VERSION/{s/.* "//;s/".*$//;p}' php_imagick.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then @@ -310,6 +312,10 @@ cd ../ZTS %changelog +* Mon Sep 28 2020 Remi Collet - 3.4.4-13 +- add patch for test suite with PHP 8 from + https://github.com/Imagick/imagick/pull/350 - simpler warning + * Fri Sep 4 2020 Remi Collet - 3.4.4-12 - add patches for PHP 8 from upstream and https://github.com/Imagick/imagick/pull/346 - SPL always there -- cgit