diff options
Diffstat (limited to 'php-mockery.spec')
-rw-r--r-- | php-mockery.spec | 114 |
1 files changed, 83 insertions, 31 deletions
diff --git a/php-mockery.spec b/php-mockery.spec index 1d9021f..28db6fc 100644 --- a/php-mockery.spec +++ b/php-mockery.spec @@ -7,20 +7,21 @@ # # Please preserve changelog entries # -%global gh_commit 9b6f117dd7d36dc3858d8d8ddf9b3d584fcae283 +%bcond_without tests + +%global gh_commit 81a161d0b135df89951abd52296adf97deb0723d %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner mockery %global gh_project mockery %global ns_project Mockery %global major 1 -%global with_tests 0%{!?_without_tests:1} Name: php-mockery -Version: 1.3.2 +Version: 1.6.11 Release: 1%{?dist} Summary: Mockery is a simple but flexible PHP mock object framework -License: BSD +License: BSD-3-Clause URL: https://github.com/%{gh_owner}/%{gh_project} Source0: %{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh @@ -29,38 +30,38 @@ Source1: makesrc.sh Patch0: %{gh_project}-tests.patch BuildArch: noarch -%if %{with_tests} -BuildRequires: php(language) >= 5.6.0 +%if %{with tests} +BuildRequires: php(language) >= 7.3 # From composer.json, "require-dev": { -# "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0|~9.0" +# "phpunit/phpunit": "^8.5 || ^9.6.17", +# "symplify/easy-coding-standard": "^12.1.4" +%global phpunit %{_bindir}/phpunit9 +BuildRequires: phpunit9 >= 9.6.17 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -%global phpunit %{_bindir}/phpunit9 -BuildRequires: phpunit9 -BuildRequires: (php-composer(hamcrest/hamcrest-php) >= 2.0.1 with php-composer(hamcrest/hamcrest-php) < 3) -# remirepo:5 +BuildRequires: (php-composer(hamcrest/hamcrest-php) >= 2.0.1 with php-composer(hamcrest/hamcrest-php) < 3) +# remirepo:3 %else -%global phpunit %{_bindir}/phpunit8 -BuildRequires: phpunit8 -BuildRequires: php-hamcrest2 >= 2.0.1 +BuildRequires: php-hamcrest2 >= 2.0.1 %endif +BuildRequires: php-pdo # Autoloader %endif BuildRequires: php-fedora-autoloader-devel # From composer.json, "require": { -# "php": ">=5.6.0", +# "php": ">=7.3", # "lib-pcre": ">=7.0", # "hamcrest/hamcrest-php": "~2.0" -Requires: php(language) >= 5.6.0 +Requires: php(language) >= 7.3 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(hamcrest/hamcrest-php) >= 2.0.1 with php-composer(hamcrest/hamcrest-php) < 3) +Requires: (php-composer(hamcrest/hamcrest-php) >= 2.0.1 with php-composer(hamcrest/hamcrest-php) < 3) # remirepo:3 %else -Requires: php-hamcrest2 >= 2.0.1 +Requires: php-hamcrest2 >= 2.0.1 %endif -# From phpcompatinfo report for version 1.0 +# From phpcompatinfo report for version 1.4.2 Requires: php-pcre Requires: php-spl Requires: php-reflection @@ -88,10 +89,11 @@ cat << 'EOF' | tee -a library/%{ns_project}/autoload.php \Fedora\Autoloader\Dependencies::required([ '/usr/share/php/Hamcrest2/autoload.php', + __DIR__ . '/helpers.php', ]); EOF -%patch0 -p0 -b .rpm +%patch -P0 -p0 -b .rpm rm -f docs/.gitignore @@ -106,25 +108,23 @@ cp -rp library/%{ns_project} %{buildroot}/%{_datadir}/php/%{ns_project}%{major} %check -%if %{with_tests} +%if %{with tests} : Use installed tree and our autoloader export COMPOSER_VENDOR_DIR=%{buildroot}%{_datadir}/php/%{ns_project}%{major} -phpab --output tests/classmap.php --exclude */SemiReservedWordsAsMethods.php tests/Mockery +phpab --output tests/classmap.php --exclude */SemiReservedWordsAsMethods.php tests/Mockery tests/Fixture : Run upstream test suite ret=0 -for cmd in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do + +# need investigation +rm tests/Mockery/MockeryCanMockClassesWithSemiReservedWordsTest.php + +for cmd in php php81 php82 php83; do if which $cmd; then - set $cmd - # see .travis.yml - if [ $($1 -r 'echo PHP_MAJOR_VERSION;') -lt 7 ] - then SUITE="Mockery Test Suite PHP56" - else SUITE="Mockery Test Suite" - fi - $1 ${2:-%{_bindir}/phpunit9} \ + $cmd %{_bindir}/phpunit9 \ --no-coverage \ - --verbose --testsuite="$SUITE" || ret=1 + --verbose || ret=1 fi done exit $ret @@ -141,10 +141,62 @@ exit $ret %changelog +* Fri Mar 22 2024 Remi Collet <remi@remirepo.net> - 1.6.11-1 +- update to 1.6.11 + +* Wed Mar 20 2024 Remi Collet <remi@remirepo.net> - 1.6.10-1 +- update to 1.6.10 + +* Wed Mar 13 2024 Remi Collet <remi@remirepo.net> - 1.6.9-1 +- update to 1.6.9 (revert to 1.6.7 code) + +* Tue Mar 12 2024 Remi Collet <remi@remirepo.net> - 1.6.8-1 +- update to 1.6.8 + +* Mon Dec 11 2023 Remi Collet <remi@remirepo.net> - 1.6.7-1 +- update to 1.6.7 + +* Thu Aug 24 2023 Remi Collet <remi@remirepo.net> - 1.6.6-1 +- update to 1.6.6 + +* Thu Jul 20 2023 Remi Collet <remi@remirepo.net> - 1.6.4-1 +- update to 1.6.4 + +* Wed Jul 19 2023 Remi Collet <remi@remirepo.net> - 1.6.3-1 +- update to 1.6.3 + +* Thu Jun 8 2023 Remi Collet <remi@remirepo.net> - 1.6.2-1 +- update to 1.6.2 + +* Tue Jun 6 2023 Remi Collet <remi@remirepo.net> - 1.6.1-1 +- update to 1.6.1 + +* Mon Sep 12 2022 Remi Collet <remi@remirepo.net> - 1.5.1-1 +- update to 1.5.1 + +* Fri Jan 21 2022 Remi Collet <remi@remirepo.net> - 1.5.0-1 +- update to 1.5.0 + +* Tue Sep 14 2021 Remi Collet <remi@remirepo.net> - 1.4.4-1 +- update to 1.4.4 + +* Wed Feb 24 2021 Remi Collet <remi@remirepo.net> - 1.4.3-1 +- update to 1.4.3 + +* Mon Oct 12 2020 Remi Collet <remi@remirepo.net> - 1.4.2-1 +- update to 1.4.2 +- raise dependency on PHP 7.3 +- drop compatibility with old phpunit 5, 6 and 7 +- run test suite with both phpunit 8 and 9 + +* Mon Aug 17 2020 Remi Collet <remi@remirepo.net> - 1.3.3-1 +- update to 1.3.3 + * Tue Jul 21 2020 Remi Collet <remi@remirepo.net> - 1.3.2-1 - update to 1.3.2 - switch to phpunit9 - raise dependency on hamcrest/hamcrest-php 2.0.1 +- sources from git snapshot * Fri Jan 3 2020 Remi Collet <remi@remirepo.net> - 1.3.1-1 - update to 1.3.1 |