summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json51
-rw-r--r--php-zendframework-zendservice-recaptcha-pr12.patch33
-rw-r--r--php-zendframework-zendservice-recaptcha.spec64
3 files changed, 81 insertions, 67 deletions
diff --git a/composer.json b/composer.json
index 2a53f91..fb02219 100644
--- a/composer.json
+++ b/composer.json
@@ -1,22 +1,18 @@
{
"name": "zendframework/zendservice-recaptcha",
"description": "OOP wrapper for the ReCaptcha web service",
- "type": "library",
+ "license": "BSD-3-Clause",
"keywords": [
- "zf2",
+ "zf",
+ "zendframework",
"recaptcha"
],
- "homepage": "http://packages.zendframework.com/",
- "license": "BSD-3-Clause",
- "autoload": {
- "psr-4": {
- "ZendService\\ReCaptcha\\": "src/"
- }
- },
- "autoload-dev": {
- "psr-4": {
- "ZendServiceTest\\ReCaptcha\\": "test/"
- }
+ "support": {
+ "issues": "https://github.com/zendframework/ZendService_ReCaptcha/issues",
+ "source": "https://github.com/zendframework/ZendService_ReCaptcha",
+ "rss": "https://github.com/zendframework/ZendService_ReCaptcha/releases.atom",
+ "chat": "https://zendframework-slack.herokuapp.com",
+ "forum": "https://discourse.zendframework.com/c/questions/components"
},
"require": {
"php": "^5.6 || ^7.0",
@@ -24,7 +20,7 @@
"zendframework/zend-json": "^2.6.1 || ^3.0"
},
"require-dev": {
- "phpunit/phpunit": "^5.7 || ^6.0",
+ "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.5",
"zendframework/zend-coding-standard": "~1.0.0",
"zendframework/zend-config": "^2.0",
"zendframework/zend-validator": "^2.8.2"
@@ -32,10 +28,33 @@
"suggest": {
"zendframework/zend-validator": "~2.0, if using ReCaptcha's Mailhide API"
},
+ "autoload": {
+ "psr-4": {
+ "ZendService\\ReCaptcha\\": "src/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "ZendServiceTest\\ReCaptcha\\": "test/"
+ }
+ },
+ "config": {
+ "sort-packages": true
+ },
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev",
- "dev-develop": "3.1-dev"
+ "dev-master": "3.1.x-dev",
+ "dev-develop": "3.2.x-dev"
}
+ },
+ "scripts": {
+ "check": [
+ "@cs-check",
+ "@test"
+ ],
+ "cs-check": "phpcs",
+ "cs-fix": "phpcbf",
+ "test": "phpunit --colors=always",
+ "test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
}
}
diff --git a/php-zendframework-zendservice-recaptcha-pr12.patch b/php-zendframework-zendservice-recaptcha-pr12.patch
deleted file mode 100644
index 9d8d668..0000000
--- a/php-zendframework-zendservice-recaptcha-pr12.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From a72b6a337c7567fd8825e3b3fcd571a117dfc4f8 Mon Sep 17 00:00:00 2001
-From: Remi Collet <fedora@famillecollet.com>
-Date: Thu, 2 Mar 2017 08:44:42 +0100
-Subject: [PATCH] tag online tests to be able to easily skip them
-
----
- test/ReCaptchaTest.php | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/test/ReCaptchaTest.php b/test/ReCaptchaTest.php
-index f79937d..8fd4032 100644
---- a/test/ReCaptchaTest.php
-+++ b/test/ReCaptchaTest.php
-@@ -268,6 +268,9 @@ public function testVerifyWithMissingIp()
- $this->reCaptcha->verify('challenge', 'response');
- }
-
-+ /**
-+ * @group online
-+ */
- public function testVerifyWithMissingChallengeField()
- {
- $this->reCaptcha->setSecretKey($this->secretKey);
-@@ -276,6 +279,9 @@ public function testVerifyWithMissingChallengeField()
- $this->assertFalse($response->getStatus());
- }
-
-+ /**
-+ * @group online
-+ */
- public function testVerifyWithMissingResponseField()
- {
- $this->reCaptcha->setSecretKey($this->secretKey);
diff --git a/php-zendframework-zendservice-recaptcha.spec b/php-zendframework-zendservice-recaptcha.spec
index 06cf20c..e15191c 100644
--- a/php-zendframework-zendservice-recaptcha.spec
+++ b/php-zendframework-zendservice-recaptcha.spec
@@ -1,12 +1,12 @@
# remirepo/Fedora spec file for php-zendframework-zendservice-recaptcha
#
-# 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 6c6877c07c8ac73b187911ea5d264a640b234361
+%global gh_commit 8caf28e3ab8c18d75534c0741ccd6949347d20e8
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner zendframework
%global gh_project ZendService_ReCaptcha
@@ -17,8 +17,8 @@
%global with_tests 0%{!?_without_tests:1}
Name: php-%{gh_owner}-%{pk_project}
-Version: 3.0.0
-Release: 5%{?dist}
+Version: 3.1.0
+Release: 2%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -27,9 +27,6 @@ URL: https://framework.zend.com/
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
-# See https://github.com/zendframework/ZendService_ReCaptcha/pull/12
-Patch0: %{name}-pr12.patch
-
BuildArch: noarch
# Tests
%if %{with_tests}
@@ -38,13 +35,31 @@ BuildRequires: php-json
BuildRequires: php-autoloader(%{gh_owner}/zend-http) >= 2.5.4
BuildRequires: php-autoloader(%{gh_owner}/zend-json) >= 2.6.1
# From composer.json, "require-dev": {
-# "phpunit/phpunit": "^5.7 || ^6.0",
+# "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.5",
# "zendframework/zend-coding-standard": "~1.0.0",
# "zendframework/zend-config": "^2.0",
# "zendframework/zend-validator": "^2.8.2"
-BuildRequires: php-composer(phpunit/phpunit) >= 5.7
+# remirepo:1
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-autoloader(%{gh_owner}/zend-http) >= 2.5.4 with php-autoloader(%{gh_owner}/zend-http) < 3)
+BuildRequires: (php-autoloader(%{gh_owner}/zend-json) >= 2.6.1 with php-autoloader(%{gh_owner}/zend-json) < 4)
+BuildRequires: (php-autoloader(%{gh_owner}/zend-config) >= 2.0 with php-autoloader(%{gh_owner}/zend-config) < 3)
+BuildRequires: (php-autoloader(%{gh_owner}/zend-validator) >= 2.8.2 with php-autoloader(%{gh_owner}/zend-validator) < 3)
+%global phpunit %{_bindir}/phpunit7
+BuildRequires: phpunit7 >= 7.1.5
+# remirepo:12
+%else
+BuildRequires: php-autoloader(%{gh_owner}/zend-http) < 3
+BuildRequires: php-autoloader(%{gh_owner}/zend-http) >= 2.5.4
+BuildRequires: php-autoloader(%{gh_owner}/zend-json) < 4
+BuildRequires: php-autoloader(%{gh_owner}/zend-json) >= 2.6.1
+BuildRequires: php-autoloader(%{gh_owner}/zend-config) < 3
BuildRequires: php-autoloader(%{gh_owner}/zend-config) >= 2.0
+BuildRequires: php-autoloader(%{gh_owner}/zend-validator) < 3
BuildRequires: php-autoloader(%{gh_owner}/zend-validator) >= 2.8.2
+%global phpunit %{_bindir}/phpunit6
+BuildRequires: phpunit6 >= 6.5.8
+%endif
%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
@@ -54,22 +69,27 @@ BuildRequires: php-fedora-autoloader-devel
# "zendframework/zend-http": "^2.5.4",
# "zendframework/zend-json": "^2.6.1 || ^3.0"
Requires: php(language) >= 5.6
-Requires: php-autoloader(%{gh_owner}/zend-http) >= 2.5.4
+# remirepo:1
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-autoloader(%{gh_owner}/zend-http) >= 2.5.4 with php-autoloader(%{gh_owner}/zend-http) < 3)
+Requires: (php-autoloader(%{gh_owner}/zend-json) >= 2.6.1 with php-autoloader(%{gh_owner}/zend-json) < 4)
+# remirepo:6
+%else
Requires: php-autoloader(%{gh_owner}/zend-http) < 3
-Requires: php-autoloader(%{gh_owner}/zend-json) >= 2.6.1
+Requires: php-autoloader(%{gh_owner}/zend-http) >= 2.5.4
Requires: php-autoloader(%{gh_owner}/zend-json) < 4
+Requires: php-autoloader(%{gh_owner}/zend-json) >= 2.6.1
+%endif
# From compsoer, "suggest": {
# "zendframework/zend-validator": "~2.0, if using ReCaptcha's Mailhide API"
-%if 0%{?fedora} >= 21
Suggests: php-autoloader(%{gh_owner}/zend-validator)
-%endif
# Autoloader
Requires: php-composer(fedora/autoloader)
# From phpcompatinfo report for version 3.0.0 (mcrypt is optional)
Requires: php-json
Provides: php-composer(%{gh_owner}/%{pk_project}) = %{version}
-Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version}
+Provides: php-autoloader(%{gh_owner}/%{pk_project}) = %{version}
%description
@@ -78,7 +98,6 @@ Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version}
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-%patch0 -p1
mv LICENSE.md LICENSE
@@ -128,9 +147,10 @@ require_once '%{buildroot}%{php_home}/%{namespace}/%{library}/autoload.php';
EOF
ret=0
-for cmd in php php56 php70 php71 php72; do
- if which $cmd; then
- $cmd %{_bindir}/phpunit --exclude online || ret=1
+for cmdarg in "php %{phpunit}" "php70 %{_bindir}/phpunit6" php71 php72; do
+ if which $cmdarg; then
+ set $cmdarg
+ $1 ${2:-%{_bindir}/phpunit7} --exclude online --verbose || ret=1
fi
done
exit $ret
@@ -150,6 +170,14 @@ exit $ret
%changelog
+* Mon May 14 2018 Remi Collet <remi@remirepo.net> - 3.1.0-2
+- update to 3.1.0
+- use range dependencies on F27+
+- switch to phpunit6 or phpunit7
+
+* Mon Dec 11 2017 Remi Collet <remi@remirepo.net> - 3.0.0-6
+- fix virtual provide
+
* Sat Dec 9 2017 Remi Collet <remi@remirepo.net> - 3.0.0-5
- switch from zend-loader to fedora/autoloader