summaryrefslogtreecommitdiffstats
path: root/php-zendframework-zend-loader.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-zendframework-zend-loader.spec')
-rw-r--r--php-zendframework-zend-loader.spec55
1 files changed, 45 insertions, 10 deletions
diff --git a/php-zendframework-zend-loader.spec b/php-zendframework-zend-loader.spec
index ed3842f..121c9cf 100644
--- a/php-zendframework-zend-loader.spec
+++ b/php-zendframework-zend-loader.spec
@@ -1,12 +1,12 @@
# remirepo/Fedora spec file for php-zendframework-zend-loader
#
-# Copyright (c) 2015-2017 Remi Collet
+# Copyright (c) 2015-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-%global gh_commit c5fd2f071bde071f4363def7dea8dec7393e135c
+%global gh_commit 78f11749ea340f6ca316bca5958eef80b38f9b6c
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner zendframework
%global gh_project zend-loader
@@ -15,28 +15,41 @@
%global with_tests 0%{!?_without_tests:1}
Name: php-%{gh_owner}-%{gh_project}
-Version: 2.5.1
-Release: 7%{?dist}
+Version: 2.6.0
+Release: 1%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
License: BSD
URL: https://zendframework.github.io/%{gh_project}/
-Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
+Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: %{name}-autoload.php
+Source2: makesrc.sh
BuildArch: noarch
# Tests
%if %{with_tests}
-BuildRequires: php(language) >= 5.3.23
-BuildRequires: php-cli
+BuildRequires: php(language) >= 5.6
+# From composer, "require-dev": {
+# "phpbench/phpbench": "^0.13",
+# "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4",
+# "zendframework/zend-coding-standard": "~1.0.0"
+# remirepo:1
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+%global phpunit %{_bindir}/phpunit7
+BuildRequires: phpunit7 >= 7.1.4
+# remirepo:4
+%else
+%global phpunit %{_bindir}/phpunit6
+BuildRequires: phpunit >= 5.7.27
+%endif
%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
-# "php": ">=5.3.23"
-Requires: php(language) >= 5.3.23
+# "php": "^5.6 || ^7.0"
+Requires: php(language) >= 5.6
# Autoloader
Requires: php-composer(fedora/autoloader)
# From phpcompatinfo report for version 2.5.1
@@ -77,7 +90,6 @@ cp -pr src %{buildroot}%{php_home}/Zend/%{library}
%check
-%if %{with_tests}
: Deprecated autoloader
%{_bindir}/php -r '
require "%{buildroot}%{php_home}/Zend/autoload.php";
@@ -88,6 +100,23 @@ cp -pr src %{buildroot}%{php_home}/Zend/%{library}
require "%{buildroot}%{php_home}/Zend/%{library}/autoload.php";
exit (class_exists("Zend\\Loader\\PluginClassLoader" ? 0 : 1));
'
+
+%if %{with_tests}
+mkdir vendor
+cat << 'EOF' | tee vendor/autoload.php
+<?php
+require_once '%{buildroot}%{php_home}/Zend/%{library}/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test');
+EOF
+
+ret=0
+for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" "php70 %{_bindir}/phpunit6" php71 php72; do
+ if which $cmdarg; then
+ set $cmdarg
+ $1 ${2:-%{_bindir}/phpunit7} --verbose || ret=1
+ fi
+done
+exit $ret
%else
: Test suite disabled
%endif
@@ -104,6 +133,12 @@ cp -pr src %{buildroot}%{php_home}/Zend/%{library}
%changelog
+* Wed May 2 2018 Remi Collet <remi@remirepo.net> - 2.6.0-1
+- update to 2.6.0
+- raise dependency on PHP 5.6
+- run upstream test suite
+- sources from git snapshot
+
* Wed Dec 6 2017 Remi Collet <remi@remirepo.net> - 2.5.1-7
- use fedora/autoloader