diff options
| -rw-r--r-- | msgpack-php81.patch | 68 | ||||
| -rw-r--r-- | php-pecl-msgpack.spec | 22 | 
2 files changed, 82 insertions, 8 deletions
diff --git a/msgpack-php81.patch b/msgpack-php81.patch new file mode 100644 index 0000000..7538a98 --- /dev/null +++ b/msgpack-php81.patch @@ -0,0 +1,68 @@ +From fff660a6f85b69e5dfe090f767cad13531d4ce3e Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Thu, 10 Jun 2021 10:15:13 +0200 +Subject: [PATCH] Fix The Serializable interface is deprecated... + +--- + tests/021.phpt | 8 ++++++++ + tests/031.phpt | 8 ++++++++ + tests/042.phpt | 8 ++++++++ + 3 files changed, 24 insertions(+) + +diff --git a/tests/021.phpt b/tests/021.phpt +index 137d100..c5cb364 100644 +--- a/tests/021.phpt ++++ b/tests/021.phpt +@@ -38,6 +38,14 @@ class Obj implements Serializable { +         $tmp = unpack('N*', $serialized); +         $this->__construct($tmp[1], $tmp[2]); +     } ++ ++    public function __serialize() { ++        return $this->serialize(); ++    } ++ ++    public function __unserialize($serialized) { ++        return $this->unserialize(); ++    } + } +  + $o = new Obj(1, 2); +diff --git a/tests/031.phpt b/tests/031.phpt +index ce3a7c4..f178851 100644 +--- a/tests/031.phpt ++++ b/tests/031.phpt +@@ -46,6 +46,14 @@ class Obj implements Serializable { +             throw new Exception("exception in unserialize $c"); +         } +     } ++ ++    public function __serialize() { ++        return $this->serialize(); ++    } ++ ++    public function __unserialize($serialized) { ++        return $this->unserialize(); ++    } + } +  + $a = new Obj(1, 0); +diff --git a/tests/042.phpt b/tests/042.phpt +index 83e8bc7..4717a18 100644 +--- a/tests/042.phpt ++++ b/tests/042.phpt +@@ -23,6 +23,14 @@ class Foo implements Serializable { +     public function unserialize($str) { +         echo "Should not be run.\n"; +     } ++ ++    public function __serialize() { ++        return $this->serialize(); ++    } ++ ++    public function __unserialize($serialized) { ++        return $this->unserialize(); ++    } + } +  + $array = array($closure, new Foo()); diff --git a/php-pecl-msgpack.spec b/php-pecl-msgpack.spec index 76e42d5..75e4a1f 100644 --- a/php-pecl-msgpack.spec +++ b/php-pecl-msgpack.spec @@ -42,13 +42,15 @@ URL:           https://pecl.php.net/package/msgpack  Release:       0.6.%{gh_date}.%{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:       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;')}}  Source:        https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz  %endif +Patch0:        %{pecl_name}-php81.patch +  BuildRequires: make  BuildRequires: %{?dtsprefix}gcc -BuildRequires: %{?scl_prefix}php-devel >= 7 +BuildRequires: %{?scl_prefix}php-devel >= 7.0  BuildRequires: %{?scl_prefix}php-pear  %if %{with_msgpack}  BuildRequires: msgpack-devel @@ -128,6 +130,8 @@ mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS  %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}  cd NTS +%patch0 -p1 +  %if %{with_msgpack}  # use system library  rm -rf msgpack @@ -215,9 +219,8 @@ cd NTS  : Upstream test suite  for NTS extension  TEST_PHP_EXECUTABLE=%{__php} \  TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ -NO_INTERACTION=1 \ -REPORT_EXIT_STATUS=0 \ -%{__php} -n run-tests.php --show-diff +REPORT_EXIT_STATUS=1 \ +%{__php} -n run-tests.php -q --show-diff  %if %{with_zts}  cd ../ZTS @@ -229,9 +232,8 @@ cd ../ZTS  : Upstream test suite  for ZTS extension  TEST_PHP_EXECUTABLE=%{__ztsphp} \  TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ -NO_INTERACTION=1 \ -REPORT_EXIT_STATUS=0 \ -%{__ztsphp} -n run-tests.php --show-diff +REPORT_EXIT_STATUS=1 \ +%{__ztsphp} -n run-tests.php -q --show-diff  %endif @@ -279,6 +281,10 @@ fi  %changelog +* Thu Jun 10 2021 Remi Collet <remi@remirepo.net> - 2.1.2-3 +- add patch for test suite with PHP 8.1 from +  https://github.com/msgpack/msgpack-php/pull/156 +  * Wed Apr 28 2021 Remi Collet <remi@remirepo.net> - 2.1.2-2  - F34 rebuild for https://github.com/remicollet/remirepo/issues/174  | 
