summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json6
-rw-r--r--php-mock-phpunit2.spec71
2 files changed, 42 insertions, 35 deletions
diff --git a/composer.json b/composer.json
index ef911d4..3683e25 100644
--- a/composer.json
+++ b/composer.json
@@ -19,11 +19,11 @@
},
"require": {
"php": ">=7",
- "phpunit/phpunit": "^6 || ^7 || ^8 || ^9",
- "php-mock/php-mock-integration": "^2.1"
+ "phpunit/phpunit": "^6 || ^7 || ^8 || ^9 || ^10",
+ "php-mock/php-mock-integration": "^2.2.1"
},
"require-dev": {
- "phpspec/prophecy": "^1.10.3"
+ "mockery/mockery": "^1.3.6"
},
"archive": {
"exclude": ["/tests"]
diff --git a/php-mock-phpunit2.spec b/php-mock-phpunit2.spec
index 63a384a..b2df105 100644
--- a/php-mock-phpunit2.spec
+++ b/php-mock-phpunit2.spec
@@ -1,12 +1,12 @@
# remirepo/fedora spec file for php-mock-phpunit2
#
-# Copyright (c) 2016-2022 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2016-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-%global gh_commit b9ba2db21e7e1c7deba98bc86dcfc6425fb4647d
+%global gh_commit 97b3278e65863e53066f31adb85d92334c0ea07b
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner php-mock
%global gh_project php-mock-phpunit
@@ -14,7 +14,7 @@
%global major 2
Name: php-mock-phpunit%{major}
-Version: 2.6.1
+Version: 2.7.0
Release: 1%{?dist}
Summary: Mock built-in PHP functions with PHPUnit.
@@ -27,25 +27,24 @@ BuildRequires: php(language) >= 7
%if %{with_tests}
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(php-mock/php-mock-integration) >= 2.1 with php-composer(php-mock/php-mock-integration) < 3)
+BuildRequires: (php-composer(php-mock/php-mock-integration) >= 2.2.1 with php-composer(php-mock/php-mock-integration) < 3)
BuildRequires: (php-composer(php-mock/php-mock) >= 2.2 with php-composer(php-mock/php-mock) < 3)
# From composer.json "require-dev": {
-# "phpspec/prophecy": "^1.10.3"
-BuildRequires: (php-composer(phpspec/prophecy) >= 1.10.3 with php-composer(phpspec/prophecy) < 2)
+# "mockery/mockery": "^1.3.6"
+BuildRequires: (php-composer(mockery/mockery) >= 1.3.6 with php-composer(mockery/mockery) < 2)
# remirepo:5
%else
-BuildRequires: php-mock-integration2 >= 2.1
+BuildRequires: php-mock-integration2 >= 2.2.1
BuildRequires: php-mock2 >= 2.2
-BuildRequires: php-phpspec-prophecy >= 1.10.3
+BuildRequires: php-mockery >= 1.3.6
%endif
-%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8
BuildRequires: phpunit8
-%endif
-# remirepo:6
-%if 0%{?fedora} >= 31 || 0%{?rhel} >= 8
BuildRequires: phpunit9
+# remirepo:6
+# phpunit10 waiting for review
+%if 0%{?fedora} >= 38 || 0%{?rhel} >= 10
+BuildRequires: phpunit10
%else
-BuildRequires: phpunit6
BuildRequires: phpunit7
%endif
# For autoloader
@@ -54,19 +53,19 @@ BuildRequires: php-composer(fedora/autoloader)
# from composer.json, "require": {
# "php": ">=7",
-# "phpunit/phpunit": "^6 || ^7 || ^8 || ^9",
-# "php-mock/php-mock-integration": "^2.1"
+# "phpunit/phpunit": "^6 || ^7 || ^8 || ^9 || ^10",
+# "php-mock/php-mock-integration": "^2.2.1"
# "conflict": {
# "phpunit/phpunit-mock-objects": "3.2.0"
Requires: php(language) >= 7
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (phpunit8 or phpunit9)
-Requires: (php-composer(php-mock/php-mock-integration) >= 2.1 with php-composer(php-mock/php-mock-integration) < 3)
+Recommends: (phpunit8 or phpunit9 or phpunit10)
+Requires: (php-composer(php-mock/php-mock-integration) >= 2.2.1 with php-composer(php-mock/php-mock-integration) < 3)
Requires: (php-composer(php-mock/php-mock) >= 2.2 with php-composer(php-mock/php-mock) < 3)
# remirepo:4
%else
-Requires: php-mock-integration2 >= 2.1
+Requires: php-mock-integration2 >= 2.2.1
Requires: php-mock2 >= 2.2
%endif
# From phpcompatinfo report from version 2.1.0
@@ -118,22 +117,14 @@ cat << 'EOF' | tee vendor/autoload.php
<?php
require_once '%{buildroot}%{_datadir}/php/phpmock%{major}/phpunit/autoload.php';
require_once '%{_datadir}/php/phpmock%{major}/autoload.php';
-require_once '%{_datadir}/php/Prophecy/autoload.php';
+require_once '%{_datadir}/php/Mockery1/autoload.php';
EOF
ret=0
-: Run upstream test suite with phpunit6
-if [ -x %{_bindir}/phpunit6 ]; then
-for cmd in php php72 php73; do
- if which $cmd; then
- $cmd %{_bindir}/phpunit6 --verbose || ret=1
- fi
-done
-fi
if [ -x %{_bindir}/phpunit7 ]; then
: Run upstream test suite with phpunit7
-for cmd in php php73 php74; do
+for cmd in php php80 php81 php82; do
if which $cmd; then
$cmd %{_bindir}/phpunit7 --verbose || ret=1
fi
@@ -142,7 +133,7 @@ fi
if [ -x %{_bindir}/phpunit8 ]; then
: Run upstream test suite with phpunit8
-for cmd in php php73 php74 php80; do
+for cmd in php php80 php81 php82; do
if which $cmd; then
$cmd %{_bindir}/phpunit8 --verbose || ret=1
fi
@@ -151,12 +142,21 @@ fi
if [ -x %{_bindir}/phpunit9 ]; then
: Run upstream test suite with phpunit9
-for cmd in php php73 php74 php80 php81 php82; do
+for cmd in php php80 php81 php82; do
if which $cmd; then
$cmd %{_bindir}/phpunit9 --verbose || ret=1
fi
done
fi
+
+if [ -x %{_bindir}/phpunit10 ]; then
+: Run upstream test suite with phpunit10
+for cmd in php php81 php82; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit10 || ret=1
+ fi
+done
+fi
exit $ret
%else
: bootstrap build with test suite disabled
@@ -173,9 +173,16 @@ exit $ret
%changelog
+* Tue Mar 7 2023 Remi Collet <remi@remirepo.net> - 2.7.0-1
+- update to 2.7.0
+- raise dependency on php-mock-integration2 2.2.1
+- allow phpunit10
+- drop build dependency on phpspec/prophecy
+- add build dependency on mockery/mockery
+
* Mon Sep 12 2022 Remi Collet <remi@remirepo.net> - 2.6.1-1
- update to 2.6.1
-- add dependency on phpspec/prophecy
+- add build dependency on phpspec/prophecy
* Tue Mar 23 2021 Remi Collet <remi@remirepo.net> - 2.6.0-4
- drop dependency on phpunit6