From 5bf8b4b9e314d9afaef176bb4f7ddfbc72108f7c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 10 Jun 2021 10:20:40 +0200 Subject: add patch for test suite with PHP 8.1 from https://github.com/msgpack/msgpack-php/pull/156 --- msgpack-php81.patch | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 msgpack-php81.patch (limited to 'msgpack-php81.patch') 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 +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()); -- cgit