summaryrefslogtreecommitdiffstats
path: root/php-zendframework-zend-ldap.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-zendframework-zend-ldap.spec')
-rw-r--r--php-zendframework-zend-ldap.spec65
1 files changed, 40 insertions, 25 deletions
diff --git a/php-zendframework-zend-ldap.spec b/php-zendframework-zend-ldap.spec
index 83a2f50..c113a82 100644
--- a/php-zendframework-zend-ldap.spec
+++ b/php-zendframework-zend-ldap.spec
@@ -1,13 +1,13 @@
# remirepo/Fedora spec file for php-zendframework-zend-ldap
#
-# 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 bootstrap 0
-%global gh_commit a9284a7440e17ce0ba697670bb4db1baf2340acd
+%global gh_commit eced1c5d82890800c75db2e5c6dfac829ed844e1
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner zendframework
%global gh_project zend-ldap
@@ -20,11 +20,10 @@
%endif
Name: php-%{gh_owner}-%{gh_project}
-Version: 2.8.0
-Release: 3%{?dist}
+Version: 2.9.0
+Release: 2%{?dist}
Summary: Zend Framework %{library} component
-Group: Development/Libraries
License: BSD
URL: https://zendframework.github.io/%{gh_project}/
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
@@ -33,7 +32,7 @@ Source1: makesrc.sh
BuildArch: noarch
# Tests
%if %{with_tests}
-BuildRequires: php(language) >= 5.5
+BuildRequires: php(language) >= 5.6
BuildRequires: php-ldap
BuildRequires: php-date
BuildRequires: php-iconv
@@ -42,41 +41,48 @@ BuildRequires: php-mbstring
BuildRequires: php-pcre
BuildRequires: php-spl
# From composer, "require-dev": {
+# "php-mock/php-mock-phpunit": "^1.1.2 || ^2.1.1",
+# "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2",
+# "zendframework/zend-coding-standard": "~1.0.0",
# "zendframework/zend-config": "^2.5",
# "zendframework/zend-eventmanager": "^2.6.3 || ^3.0.1",
-# "zendframework/zend-stdlib": "^2.7 || ^3.0",
-# "phpunit/PHPUnit": "^4.5",
-# "php-mock/php-mock-phpunit": "~0.3",
-# "zendframework/zend-coding-standard": "~1.0.0",
-# "phpunit/phpunit": "^4.6"
+# "zendframework/zend-stdlib": "^2.7 || ^3.0"
BuildRequires: php-autoloader(%{gh_owner}/zend-config) >= 2.5
BuildRequires: php-autoloader(%{gh_owner}/zend-eventmanager) >= 2.6.3
BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
-BuildRequires: php-composer(php-mock/php-mock-phpunit) >= 0.3
+# remirepo:1
+%if 0%{?fedora} >= 27 || 0%{?rhel8}
+%global phpunit %{_bindir}/phpunit7
+BuildRequires: phpunit7 >= 7.1.2
+BuildRequires: (php-mock-phpunit2 >= 2.1.1 with php-mock-phpunit2 < 3)
+# remirepo:5
+%else
+%global phpunit %{_bindir}/phpunit6
+BuildRequires: phpunit6 >= 6.5.8
+BuildRequires: php-mock-phpunit2 >= 2.1.1
+%endif
BuildRequires: php-composer(phpunit/phpunit) >= 4.6
%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
-# "php": "^5.5 || ^7.0",
+# "php": "^5.6 || ^7.0",
# "ext-ldap": "*"
-Requires: php(language) >= 5.5
+Requires: php(language) >= 5.6
Requires: php-ldap
%if ! %{bootstrap}
# From composer, "suggest": {
-# "zendframework/zend-config": "^2.5",
-# "zendframework/zend-eventmanager": "^2.6.3 || ^3.0.1",
-# "zendframework/zend-stdlib": "^2.7 || ^3.0",
-%if 0%{?fedora} >= 21
-Suggests: php-autoloader(%{gh_owner}/zend-config) >= 2.5
+# "zendframework/zend-eventmanager": "Zend\\EventManager component"
+# remirepo:1
+%if 0%{?fedora} >= 21 || 0%{?rhel8}
Suggests: php-autoloader(%{gh_owner}/zend-eventmanager) >= 2.6.3
-Suggests: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
+# remirepo:1
%endif
%endif
# Autoloader
Requires: php-composer(fedora/autoloader)
-# From phpcompatinfo report for version 2.5.2
+# From phpcompatinfo report for version 2.9.0
Requires: php-date
Requires: php-iconv
Requires: php-json
@@ -104,6 +110,7 @@ mv LICENSE.md LICENSE
%build
+: Generate autoloader
phpab --template fedora --output src/autoload.php src
cat << 'EOF' | tee -a src/autoload.php
\Fedora\Autoloader\Dependencies::optional([
@@ -126,15 +133,18 @@ cat << 'EOF' | tee vendor/autoload.php
<?php
require_once '%{buildroot}%{php_home}/Zend/%{library}/autoload.php';
\Fedora\Autoloader\Dependencies::required([
- '%{php_home}/phpmock/autoload.php',
+ '%{php_home}/phpmock2/phpunit/autoload.php',
]);
\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test');
EOF
+# Need investigation
+sed -e 's/PHPUnit_Util_ErrorHandler/IGNORE_PHPUnit_Util_ErrorHandler/' -i test/ErrorHandlerTest.php
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}" "php70 %{_bindir}/phpunit6" php71 php72; do
+ if which $cmdarg; then
+ set $cmdarg
+ $1 ${2:-%{_bindir}/phpunit7} || ret=1
fi
done
exit $ret
@@ -153,6 +163,11 @@ exit $ret
%changelog
+* Wed Apr 25 2018 Remi Collet <remi@remirepo.net> - 2.9.0-2
+- update to 2.9.0
+- raise dependency on PHP 5.6
+- switch to phpunit6 or phpunit7
+
* Thu Dec 7 2017 Remi Collet <remi@remirepo.net> - 2.8.0-3
- switch from zend-loader to fedora/autoloader