diff options
author | Remi Collet <remi@remirepo.net> | 2017-12-05 09:35:48 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-12-05 09:35:48 +0100 |
commit | 29cb020648d16afc98e289e65570455460bc3e2d (patch) | |
tree | d49123321402aa5f12b084e050e1ae50f9c32907 | |
parent | 3142a0be530bcb72bbee1fe0e27454397001d56a (diff) |
rename to php-mock-phpunit2
Update to 2.0.1
raise dependency on PHP 7
raise dependency on php-mock-integration 2
switch top phpunit6
-rw-r--r-- | composer.json | 9 | ||||
-rw-r--r-- | php-mock-phpunit2.spec | 55 |
2 files changed, 34 insertions, 30 deletions
diff --git a/composer.json b/composer.json index 9a1aa20..bdb2f92 100644 --- a/composer.json +++ b/composer.json @@ -17,14 +17,11 @@ "psr-4": {"phpmock\\phpunit\\": "classes/"} }, "require": { - "php": ">=5.5", - "phpunit/phpunit": "^4.0.0 || ^5.0.0", - "php-mock/php-mock-integration": "^1" + "php": ">=7", + "phpunit/phpunit": "^6 <6.5", + "php-mock/php-mock-integration": "^2" }, "archive": { "exclude": ["/tests"] - }, - "conflict": { - "phpunit/phpunit-mock-objects": "3.2.0" } } diff --git a/php-mock-phpunit2.spec b/php-mock-phpunit2.spec index af998fc..4f1e6af 100644 --- a/php-mock-phpunit2.spec +++ b/php-mock-phpunit2.spec @@ -1,4 +1,4 @@ -# remirepo/fedora spec file for php-mock-phpunit +# remirepo/fedora spec file for php-mock-phpunit2 # # Copyright (c) 2016-2017 Remi Collet # License: CC-BY-SA @@ -6,15 +6,16 @@ # # Please, preserve the changelog entries # -%global gh_commit 359e3038c016cee4c8f8db6387bcab3fcdebada0 +%global gh_commit b42fc41ecb7538564067527f6c30b8854f149d32 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner php-mock %global gh_project php-mock-phpunit %global with_tests 0%{!?_without_tests:1} +%global major 2 -Name: php-mock-phpunit -Version: 1.1.2 -Release: 3%{?dist} +Name: php-mock-phpunit%{major} +Version: 2.0.1 +Release: 1%{?dist} Summary: Mock built-in PHP functions with PHPUnit. Group: Development/Libraries @@ -23,26 +24,25 @@ URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz BuildArch: noarch -BuildRequires: php(language) >= 5.5 +BuildRequires: php(language) >= 7 %if %{with_tests} -BuildRequires: php-composer(php-mock/php-mock-integration) < 2 -BuildRequires: php-composer(php-mock/php-mock-integration) >= 1 -BuildRequires: php-composer(phpunit/phpunit) > 4 +BuildRequires: php-composer(php-mock/php-mock-integration) < 3 +BuildRequires: php-composer(php-mock/php-mock-integration) >= 2 +BuildRequires: phpunit6 # For autoloader BuildRequires: php-composer(fedora/autoloader) %endif # from composer.json, "require": { -# "php": ">=5.5", -# "phpunit/phpunit": "^4.0.0 || ^5.0.0", -# "php-mock/php-mock-integration": "^1" +# "php": ">=7", +# "phpunit/phpunit": "^6 <6.5", +# "php-mock/php-mock-integration": "^2" # "conflict": { # "phpunit/phpunit-mock-objects": "3.2.0" -Requires: php(language) >= 5.5 -Requires: php-composer(phpunit/phpunit) >= 4 -Requires: php-composer(phpunit/phpunit) < 6 -Requires: php-composer(php-mock/php-mock-integration) >= 1 -Requires: php-composer(php-mock/php-mock-integration) < 2 +Requires: php(language) >= 7 +Requires: phpunit6 +Requires: php-composer(php-mock/php-mock-integration) < 3 +Requires: php-composer(php-mock/php-mock-integration) >= 2 # From phpcompatinfo report from version 1.1.1 # only Core @@ -67,8 +67,8 @@ No further extension is needed. %install mkdir -p %{buildroot}%{_datadir}/php/ -mkdir -p %{buildroot}%{_datadir}/php/phpmock -cp -pr classes %{buildroot}%{_datadir}/php/phpmock/phpunit +mkdir -p %{buildroot}%{_datadir}/php/phpmock%{major} +cp -pr classes %{buildroot}%{_datadir}/php/phpmock%{major}/phpunit %check @@ -77,14 +77,14 @@ mkdir vendor cat << 'EOF' | tee vendor/autoload.php <?php require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php'; -require_once '%{_datadir}/tests/phpmock/autoload.php'; -\Fedora\Autoloader\Autoload::addPsr4('phpmock\\', '%{buildroot}%{_datadir}/php/phpmock'); +require_once '%{_datadir}/tests/phpmock%{major}/autoload.php'; +\Fedora\Autoloader\Autoload::addPsr4('phpmock\\', '%{buildroot}%{_datadir}/php/phpmock%{major}'); EOF ret=0 -for cmd in php php56 php70 php71 php72; do +for cmd in php php70 php71 php72; do if which $cmd; then - %{_bindir}/phpunit --verbose || ret=1 + $cmd %{_bindir}/phpunit6 --verbose || ret=1 fi done exit $ret @@ -98,10 +98,17 @@ exit $ret %license LICENSE %doc composer.json %doc *.md -%{_datadir}/php/phpmock/phpunit +%{_datadir}/php/phpmock%{major}/phpunit %changelog +* Tue Dec 5 2017 Remi Collet <remi@remirepo.net> - 2.0.1-1 +- rename to php-mock-phpunit2 +- Update to 2.0.1 +- raise dependency on PHP 7 +- raise dependency on php-mock-integration 2 +- switch top phpunit6 + * Thu May 11 2017 Remi Collet <remi@remirepo.net> - 1.1.2-3 - switch to fedora/autoloader |