diff options
author | Remi Collet <remi@remirepo.net> | 2017-12-05 08:57:15 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-12-05 08:57:15 +0100 |
commit | af35c42f2f6f5e5fb1bc89034cacda3bf0624484 (patch) | |
tree | f7fbcf49951e3fbcbd5c0df8fafc25e66c198567 | |
parent | d196f66ea509178763f3034bceafb6d4c6b36024 (diff) |
rename to php-mock2
Update to 2.0.0
raise dependency on PHP 5.6
-rw-r--r-- | composer.json | 9 | ||||
-rw-r--r-- | php-mock2.spec | 50 |
2 files changed, 31 insertions, 28 deletions
diff --git a/composer.json b/composer.json index b48be43..44e876b 100644 --- a/composer.json +++ b/composer.json @@ -15,22 +15,21 @@ ], "autoload": { "psr-4": { - "phpmock\\": ["classes/", "tests/unit/"] + "phpmock\\": ["classes/", "tests/"] } }, "require": { - "php": ">=5.5", + "php": ">=5.6", "phpunit/php-text-template": "^1" }, "require-dev": { - "phpunit/phpunit": "^4|^5" + "phpunit/phpunit": "^5.7" }, "replace": { "malkusch/php-mock": "*" }, "suggest": { - "php-mock/php-mock-phpunit": "Allows integration into PHPUnit testcase with the trait PHPMock.", - "php-mock/php-mock-mockery": "Allows using PHPMockery for Mockery integration" + "php-mock/php-mock-phpunit": "Allows integration into PHPUnit testcase with the trait PHPMock." }, "archive": { "exclude": ["/tests"] diff --git a/php-mock2.spec b/php-mock2.spec index c5de4fd..e26e994 100644 --- a/php-mock2.spec +++ b/php-mock2.spec @@ -1,4 +1,4 @@ -# remirepo/fedora spec file for php-mock +# remirepo/fedora spec file for php-mock2 # # Copyright (c) 2016-2017 Remi Collet # License: CC-BY-SA @@ -6,15 +6,16 @@ # # Please, preserve the changelog entries # -%global gh_commit bfa2d17d64dbf129073a7ba2051a96ce52749570 +%global gh_commit 22d297231118e6fd5b9db087fbe1ef866c2b95d2 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner php-mock %global gh_project php-mock %global with_tests 0%{!?_without_tests:1} +%global major 2 -Name: php-mock -Version: 1.0.1 -Release: 4%{?dist} +Name: php-mock%{major} +Version: 2.0.0 +Release: 1%{?dist} Summary: PHP-Mock can mock built-in PHP functions Group: Development/Libraries @@ -23,24 +24,24 @@ 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) >= 5.6 %if %{with_tests} # from composer.json, "require-dev": { -# "phpunit/phpunit": "^4|^5" +# "phpunit/phpunit": "^5.7" BuildRequires: php-composer(phpunit/php-text-template) < 2 BuildRequires: php-composer(phpunit/php-text-template) >= 1 -BuildRequires: php-composer(phpunit/phpunit) > 4 +BuildRequires: php-composer(phpunit/phpunit) > 5.7 %endif # For autoloader BuildRequires: php-composer(fedora/autoloader) # from composer.json, "require": { -# "php": ">=5.5", +# "php": ">=5.6", # "phpunit/php-text-template": "^1" -Requires: php(language) >= 5.5 +Requires: php(language) >= 5.6 Requires: php-composer(phpunit/php-text-template) >= 1 Requires: php-composer(phpunit/php-text-template) < 2 -# From phpcompatinfo report from version 1.0.1 +# From phpcompatinfo report from version 2.0.0 Requires: php-date Requires: php-reflection Requires: php-spl @@ -48,10 +49,8 @@ Requires: php-spl Requires: php-composer(fedora/autoloader) %if 0%{?fedora} > 21 # from composer.json, "suggest": { -# "php-mock/php-mock-phpunit": "Allows integration into PHPUnit testcase with the trait PHPMock.", -# "php-mock/php-mock-mockery": "Allows using PHPMockery for Mockery integration" +# "php-mock/php-mock-phpunit": "Allows integration into PHPUnit testcase with the trait PHPMock." Suggests: php-composer(php-mock/php-mock-phpunit) -Suggests: php-composer(php-mock/php-mock-mockery) %endif Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} @@ -62,7 +61,7 @@ PHP-Mock can mock built-in PHP functions (e.g. time()). PHP-Mock relies on PHP's namespace fallback policy. No further extension is needed. -Autoloader: %{_datadir}/php/phpmock/autoload.php +Autoloader: %{_datadir}/php/phpmock%{major}/autoload.php %prep @@ -80,7 +79,7 @@ require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php'; )); AUTOLOAD -cat << 'AUTOLOAD' | tee tests/unit/autoload.php +cat << 'AUTOLOAD' | tee tests/autoload.php <?php /* Autoloader for %{name} tests */ @@ -95,12 +94,12 @@ AUTOLOAD %install # Library -mkdir -p %{buildroot}%{_datadir}/php/ -cp -pr classes %{buildroot}%{_datadir}/php/phpmock +mkdir -p %{buildroot}%{_datadir}/php/ +cp -pr classes %{buildroot}%{_datadir}/php/phpmock%{major} # Unit tests -mkdir -p %{buildroot}%{_datadir}/tests -cp -pr tests/unit %{buildroot}%{_datadir}/tests/phpmock +mkdir -p %{buildroot}%{_datadir}/tests +cp -pr tests %{buildroot}%{_datadir}/tests/phpmock%{major} %check @@ -109,7 +108,7 @@ cp -pr tests/unit %{buildroot}%{_datadir}/tests/phpmock ret=0 for cmd in php php56 php70 php71 php72; do if which $cmd; then - %{_bindir}/phpunit --bootstrap %{buildroot}%{_datadir}/php/phpmock/autoload.php --verbose || ret=1 + $cmd %{_bindir}/phpunit --bootstrap %{buildroot}%{_datadir}/php/phpmock2/autoload.php --verbose || ret=1 fi done exit $ret @@ -123,11 +122,16 @@ exit $ret %license LICENSE %doc composer.json %doc *.md -%{_datadir}/php/phpmock -%{_datadir}/tests/phpmock +%{_datadir}/php/phpmock%{major} +%{_datadir}/tests/phpmock%{major} %changelog +* Tue Dec 5 2017 Remi Collet <remi@remirepo.net> - 2.0.0-1 +- rename to php-mock2 +- Update to 2.0.0 +- raise dependency on PHP 5.6 + * Thu May 11 2017 Remi Collet <remi@remirepo.net> - 1.0.1-4 - switch to fedora/autoloader |