Compare commits
12 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06c9445805 | ||
|
|
bb0f9ab3d3 | ||
|
|
322882e2d1 | ||
|
|
d7eda9203a | ||
|
|
0454434e6b | ||
|
|
d3fb1c9fa0 | ||
|
|
2d67f99df2 | ||
|
|
1367371ff4 | ||
|
|
f67f3d64e9 | ||
|
|
d5bf29f550 | ||
|
|
90596556af | ||
|
|
02ab5a687d |
1 changed files with 60 additions and 7 deletions
|
|
@ -21,15 +21,23 @@
|
|||
%global php_min_ver 7.3
|
||||
# "phpunit/phpunit": "^8.5|^9.0"
|
||||
%global phpunit8_min_ver 8.5
|
||||
%global phpunit9_min_ver 9.0
|
||||
|
||||
# Build using "--without tests" to disable tests
|
||||
%global with_tests 0%{!?_without_tests:1}
|
||||
|
||||
# Rich dependencies supported?
|
||||
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
|
||||
%global with_rich_dependencies 1
|
||||
%else
|
||||
%global with_rich_dependencies 0
|
||||
%endif
|
||||
|
||||
%{!?phpdir: %global phpdir %{_datadir}/php}
|
||||
|
||||
Name: php-%{composer_vendor}-%{composer_project}
|
||||
Version: %{github_version}
|
||||
Release: 1%{?github_release}%{?dist}
|
||||
Release: 13%{?github_release}%{?dist}
|
||||
Summary: Helpers to build PHPUnit mocks
|
||||
|
||||
License: MIT
|
||||
|
|
@ -45,7 +53,9 @@ BuildArch: noarch
|
|||
%if %{with_tests}
|
||||
## composer.json
|
||||
BuildRequires: php(language) >= %{php_min_ver}
|
||||
# test suite run with all allowed versions
|
||||
BuildRequires: phpunit8 >= %{phpunit8_min_ver}
|
||||
BuildRequires: phpunit9 >= %{phpunit9_min_ver}
|
||||
## phpcompatinfo (computed from version 1.3.0)
|
||||
BuildRequires: php-reflection
|
||||
## Autoloader
|
||||
|
|
@ -54,7 +64,11 @@ BuildRequires: php-composer(fedora/autoloader)
|
|||
|
||||
# composer.json
|
||||
Requires: php(language) >= %{php_min_ver}
|
||||
Requires: phpunit8 >= %{phpunit8_min_ver}
|
||||
#
|
||||
%if %{with_rich_dependencies}
|
||||
# Single version required at runtime
|
||||
Requires: (phpunit8 >= %{phpunit8_min_ver} or phpunit9 >= %{phpunit9_min_ver})
|
||||
%endif
|
||||
# phpcompatinfo (computed from version 1.3.0)
|
||||
# <none>
|
||||
# Autoloader
|
||||
|
|
@ -85,10 +99,6 @@ cat <<'AUTOLOAD' | tee src/autoload.php
|
|||
require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
|
||||
|
||||
\Fedora\Autoloader\Autoload::addPsr4('EasyMock\\', __DIR__);
|
||||
|
||||
\Fedora\Autoloader\Dependencies::required([
|
||||
'%{phpdir}/PHPUnit8/autoload.php',
|
||||
]);
|
||||
AUTOLOAD
|
||||
|
||||
|
||||
|
|
@ -109,7 +119,14 @@ BOOTSTRAP
|
|||
: Upstream tests
|
||||
RETURN_CODE=0
|
||||
PHPUNIT=$(which phpunit8)
|
||||
for PHP_EXEC in "" php74; do
|
||||
for PHP_EXEC in "" php73 php74; do
|
||||
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
|
||||
$PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
|
||||
|| RETURN_CODE=1
|
||||
fi
|
||||
done
|
||||
PHPUNIT=$(which phpunit9)
|
||||
for PHP_EXEC in "" php73 php74 php80; do
|
||||
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
|
||||
$PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
|
||||
|| RETURN_CODE=1
|
||||
|
|
@ -130,6 +147,42 @@ exit $RETURN_CODE
|
|||
|
||||
|
||||
%changelog
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Mon Aug 24 2020 Remi Collet <remirepo.net> -1.3.0-2
|
||||
- allow phpunit8 and phpunit9
|
||||
|
||||
* Fri Aug 21 2020 Shawn Iwinski <shawn@iwin.ski> - 1.3.0-1
|
||||
- Update to 1.3.0 (RHBZ #1784948)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue