summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-zendframework-zend-db.spec23
1 files changed, 17 insertions, 6 deletions
diff --git a/php-zendframework-zend-db.spec b/php-zendframework-zend-db.spec
index 1d69368..e46788b 100644
--- a/php-zendframework-zend-db.spec
+++ b/php-zendframework-zend-db.spec
@@ -25,7 +25,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 2.9.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -52,7 +52,13 @@ BuildRequires: php-composer(%{gh_owner}/zend-stdlib) >= 2.7
BuildRequires: php-composer(%{gh_owner}/zend-eventmanager) >= 2.6.2
BuildRequires: php-composer(%{gh_owner}/zend-hydrator) >= 1.1
BuildRequires: php-composer(%{gh_owner}/zend-servicemanager) >= 2.7.5
-BuildRequires: php-composer(phpunit/phpunit) >= 4.0
+%if 0%{?fedora} >= 26
+%global phpunit %{_bindir}/phpunit6
+BuildRequires: phpunit6 >= 6.4.4
+%else
+%global phpunit %{_bindir}/phpunit
+BuildRequires: php-phpunit-PHPUnit >= 5.7.25
+%endif
# Autoloader
BuildRequires: php-composer(%{gh_owner}/zend-loader) >= 2.5
%endif
@@ -113,6 +119,8 @@ cp -pr src %{buildroot}%{php_home}/Zend/%{library}
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
+# comptibility layer before PSR-0 autoloader
+require_once dirname(__DIR__) . '/test/autoload.php';
require_once '%{php_home}/Zend/Loader/AutoloaderFactory.php';
Zend\Loader\AutoloaderFactory::factory(array(
'Zend\Loader\StandardAutoloader' => array(
@@ -121,13 +129,13 @@ Zend\Loader\AutoloaderFactory::factory(array(
'Zend\\%{library}' => '%{buildroot}%{php_home}/Zend/%{library}'
))));
require_once '%{php_home}/Zend/autoload.php';
-require_once dirname(__DIR__) . '/test/autoload.php';
EOF
ret=0
-for cmd in php php56 php70 php71 php72; do
- if which $cmd; then
- $cmd %{_bindir}/phpunit --include-path=%{buildroot}%{php_home} || ret=1
+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
fi
done
exit $ret
@@ -145,6 +153,9 @@ exit $ret
%changelog
+* Thu Dec 7 2017 Remi Collet <remi@remirepo.net> - 2.9.0-2
+- use phpunit6 on F26+
+
* Thu Dec 7 2017 Remi Collet <remi@remirepo.net> - 2.9.0-1
- Update to 2.9.0
- raise dependency on PHP 5.6