summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-zendframework-zend-modulemanager-pr55.patch39
-rw-r--r--php-zendframework-zend-modulemanager.spec29
2 files changed, 63 insertions, 5 deletions
diff --git a/php-zendframework-zend-modulemanager-pr55.patch b/php-zendframework-zend-modulemanager-pr55.patch
new file mode 100644
index 0000000..ca929c5
--- /dev/null
+++ b/php-zendframework-zend-modulemanager-pr55.patch
@@ -0,0 +1,39 @@
+From 2ab82cecf9743c738f191dcf6dc687fc867867fe Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Wed, 22 Feb 2017 08:04:40 +0100
+Subject: [PATCH] fix proto and enable php 7.1 in travis
+
+---
+ .travis.yml | 5 +++++
+ test/Listener/TestAsset/SampleAbstractFactory.php | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/.travis.yml b/.travis.yml
+index 5a69e0a..a7cb6ab 100644
+--- a/.travis.yml
++++ b/.travis.yml
+@@ -47,6 +47,11 @@ matrix:
+ env:
+ - EVENT_MANAGER_VERSION="^2.6.2"
+ - SERVICE_MANAGER_VERSION="^2.7.5"
++ - php: 7.1
++ - php: 7.1
++ env:
++ - EVENT_MANAGER_VERSION="^2.6.2"
++ - SERVICE_MANAGER_VERSION="^2.7.5"
+ - php: hhvm
+ - php: hhvm
+ env:
+diff --git a/test/Listener/TestAsset/SampleAbstractFactory.php b/test/Listener/TestAsset/SampleAbstractFactory.php
+index a8aea3d..da555ee 100644
+--- a/test/Listener/TestAsset/SampleAbstractFactory.php
++++ b/test/Listener/TestAsset/SampleAbstractFactory.php
+@@ -26,7 +26,7 @@ public function canCreateServiceWithName(ServiceLocatorInterface $container, $na
+ return true;
+ }
+
+- public function __invoke(ContainerInterface $container, $name, array $options = [])
++ public function __invoke(ContainerInterface $container, $name, array $options = NULL)
+ {
+ return new stdClass;
+ }
diff --git a/php-zendframework-zend-modulemanager.spec b/php-zendframework-zend-modulemanager.spec
index a7d3059..8b395f5 100644
--- a/php-zendframework-zend-modulemanager.spec
+++ b/php-zendframework-zend-modulemanager.spec
@@ -21,7 +21,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 2.7.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -30,6 +30,9 @@ URL: https://zendframework.github.io/%{gh_project}/
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
+# https://github.com/zendframework/zend-modulemanager/pull/55
+Patch0: %{name}-pr55.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
# Tests
@@ -108,6 +111,7 @@ Documentation: https://zendframework.github.io/%{gh_project}/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p1
mv LICENSE.md LICENSE
@@ -138,11 +142,22 @@ Zend\Loader\AutoloaderFactory::factory(array(
require_once '%{php_home}/Zend/autoload.php';
EOF
-%{_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
+ php71 %{_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
@@ -162,6 +177,10 @@ rm -rf %{buildroot}
%changelog
+* Thu Feb 22 2017 Remi Collet <remi@fedoraproject.org> - 2.7.2-2
+- add fix for tests against PHP 7.1, fix FTBFS #1424086
+ from https://github.com/zendframework/zend-modulemanager/pull/55
+
* Tue May 17 2016 Remi Collet <remi@fedoraproject.org> - 2.7.2-1
- update to 2.7.2
- zend-config is now required