summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-11-15 14:00:56 +0100
committerRemi Collet <fedora@famillecollet.com>2016-11-15 14:00:56 +0100
commit44218ffa777fc3de4c3b90bf778fa3bf1bc212fc (patch)
tree5b95e8e6bbad3010378fd327a15ed21a3c36e1ec
parent96d94451338efc571f06c809ea41870038891824 (diff)
add patch for php 7.1
-rw-r--r--php-zendframework-zend-feed-pr35.patch35
-rw-r--r--php-zendframework-zend-feed.spec28
2 files changed, 58 insertions, 5 deletions
diff --git a/php-zendframework-zend-feed-pr35.patch b/php-zendframework-zend-feed-pr35.patch
new file mode 100644
index 0000000..c7eddf9
--- /dev/null
+++ b/php-zendframework-zend-feed-pr35.patch
@@ -0,0 +1,35 @@
+From 39a1255f47f849182f438e8f3d14a9e044925ca9 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Tue, 15 Nov 2016 13:47:28 +0100
+Subject: [PATCH] fix "A non-numeric value encountered" with PHP 7.1
+
+---
+ src/Reader/Extension/AbstractEntry.php | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/Reader/Extension/AbstractEntry.php b/src/Reader/Extension/AbstractEntry.php
+index c589146..aac03b9 100644
+--- a/src/Reader/Extension/AbstractEntry.php
++++ b/src/Reader/Extension/AbstractEntry.php
+@@ -135,18 +135,18 @@ public function setType($type)
+ if ($type === Reader\Reader::TYPE_RSS_10
+ || $type === Reader\Reader::TYPE_RSS_090
+ ) {
+- $this->setXpathPrefix('//rss:item[' . ($this->entryKey + 1) . ']');
++ $this->setXpathPrefix('//rss:item[' . ((int)$this->entryKey + 1) . ']');
+ return $this;
+ }
+
+ if ($type === Reader\Reader::TYPE_ATOM_10
+ || $type === Reader\Reader::TYPE_ATOM_03
+ ) {
+- $this->setXpathPrefix('//atom:entry[' . ($this->entryKey + 1) . ']');
++ $this->setXpathPrefix('//atom:entry[' . ((int)$this->entryKey + 1) . ']');
+ return $this;
+ }
+
+- $this->setXpathPrefix('//item[' . ($this->entryKey + 1) . ']');
++ $this->setXpathPrefix('//item[' . ((int)$this->entryKey + 1) . ']');
+ return $this;
+ }
+
diff --git a/php-zendframework-zend-feed.spec b/php-zendframework-zend-feed.spec
index 261259a..8954667 100644
--- a/php-zendframework-zend-feed.spec
+++ b/php-zendframework-zend-feed.spec
@@ -21,7 +21,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 2.7.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -30,6 +30,8 @@ URL: https://framework.zend.com/
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
+Patch0: %{name}-pr35.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
# Tests
@@ -120,6 +122,7 @@ Documentation: https://zendframework.github.io/%{gh_project}/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p1
mv LICENSE.md LICENSE
@@ -157,11 +160,22 @@ EOF
rm test/PubSubHubbub/Model/SubscriptionTest.php
%endif
-%{_bindir}/phpunit --include-path=%{buildroot}%{php_home}
-
-if which php70; then
- php70 %{_bindir}/phpunit --include-path=%{buildroot}%{php_home}
+# remirepo:11
+run=0
+ret=0
+if which php56; then
+ php56 %{_bindir}/phpunit || ret=1
+ run=1
+fi
+if which php71; then
+ php70 %{_bindir}/phpunit || ret=1
+ run=1
fi
+if [ $run -eq 0 ]; then
+%{_bindir}/phpunit --verbose
+# remirepo:2
+fi
+exit $ret
%else
: Test suite disabled
%endif
@@ -181,6 +195,10 @@ rm -rf %{buildroot}
%changelog
+* Tue Nov 15 2016 Remi Collet <remi@fedoraproject.org> - 2.7.0-2
+- add path for PHP 7.1
+ open https://github.com/zendframework/zend-feed/pull/35
+
* Fri Feb 12 2016 Remi Collet <remi@fedoraproject.org> - 2.7.0-1
- update to 2.7.0
- raise dependency on zend-stdlib >= 2.7