From 742a368f23d58c4549de09cee87fbc873c75287c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 24 Oct 2017 12:30:10 +0200 Subject: fix FTBFS from Koschei, add patch for PHP 7.2 from https://github.com/zendframework/zend-log/pull/79 --- 79.patch | 36 ++++++++++++++++++++++++++++++++++++ php-zendframework-zend-log.spec | 12 +++++++++--- 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 79.patch diff --git a/79.patch b/79.patch new file mode 100644 index 0000000..aba4b16 --- /dev/null +++ b/79.patch @@ -0,0 +1,36 @@ +From c310b2920e0278e017df821144d27fd297980a73 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Tue, 24 Oct 2017 12:19:45 +0200 +Subject: [PATCH] Fix #76 incompatible prototype + +--- + src/Writer/FingersCrossed.php | 2 +- + src/Writer/MongoDB.php | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Writer/FingersCrossed.php b/src/Writer/FingersCrossed.php +index bfc9b863..b4abd971 100644 +--- a/src/Writer/FingersCrossed.php ++++ b/src/Writer/FingersCrossed.php +@@ -245,7 +245,7 @@ public function reset() + * @param string|FormatterInterface $formatter + * @return WriterInterface + */ +- public function setFormatter($formatter) ++ public function setFormatter($formatter, array $options = null) + { + return $this->writer; + } +diff --git a/src/Writer/MongoDB.php b/src/Writer/MongoDB.php +index 38157674..1ef4f23f 100644 +--- a/src/Writer/MongoDB.php ++++ b/src/Writer/MongoDB.php +@@ -104,7 +104,7 @@ public function __construct($manager, $database = null, $collection = null, $wri + * @param string|FormatterInterface $formatter + * @return WriterInterface + */ +- public function setFormatter($formatter) ++ public function setFormatter($formatter, array $options = null) + { + return $this; + } diff --git a/php-zendframework-zend-log.spec b/php-zendframework-zend-log.spec index af48b75..91b0b89 100644 --- a/php-zendframework-zend-log.spec +++ b/php-zendframework-zend-log.spec @@ -21,7 +21,7 @@ Name: php-%{gh_owner}-%{gh_project} Version: 2.9.2 -Release: 1%{?dist} +Release: 3%{?dist} Summary: Zend Framework %{library} component Group: Development/Libraries @@ -30,6 +30,8 @@ URL: https://zendframework.github.io/%{gh_project}/ Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh +Patch0: https://patch-diff.githubusercontent.com/raw/zendframework/zend-log/pull/79.patch + BuildArch: noarch # Tests %if %{with_tests} @@ -127,6 +129,7 @@ Documentation: https://zendframework.github.io/%{gh_project}/ %prep %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 mv LICENSE.md LICENSE @@ -162,8 +165,7 @@ EOF rm test/Writer/MongoDBTest.php ret=0 -# PHP 7.2: https://github.com/zendframework/zend-log/issues/76 -for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71; do +for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72; do if which $cmdarg; then set $cmdarg $1 ${2:-%{_bindir}/phpunit6} --verbose || ret=1 @@ -184,6 +186,10 @@ exit $ret %changelog +* Tue Oct 24 2017 Remi Collet - 2.9.2-3 +- fix FTBFS from Koschei, add patch for PHP 7.2 from + https://github.com/zendframework/zend-log/pull/79 + * Mon May 22 2017 Remi Collet - 2.9.2-1 - Update to 2.9.2 - use phpunit6 on F26+ -- cgit