From af35c42f2f6f5e5fb1bc89034cacda3bf0624484 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 5 Dec 2017 08:57:15 +0100 Subject: rename to php-mock2 Update to 2.0.0 raise dependency on PHP 5.6 --- composer.json | 9 ++++----- 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 - 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 - 1.0.1-4 - switch to fedora/autoloader -- cgit