diff options
author | Remi Collet <remi@remirepo.net> | 2018-02-06 13:31:01 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2018-02-06 13:31:01 +0100 |
commit | 2be823e647ff595d86ff64c0a3f02030159fcdf6 (patch) | |
tree | 208aa1f92a6c0503d8fde0e58dc40da9d935707e | |
parent | 458895a9c41b30a1a81e2c391414330902716899 (diff) |
Update to 4.0.0
rename to phpcpd (and obsolete php-phpunit-phpcpd)
raise dependency on PHP 7.1
raise dependency on phpunit/php-timer 2.0
use phpunit7 for test suite
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | composer.json | 8 | ||||
-rw-r--r-- | phpcpd.spec | 59 |
3 files changed, 45 insertions, 31 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6f69818 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +clog +package-*.xml +*.tgz +*.tar.gz +*.tar.bz2 +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/composer.json b/composer.json index 658e187..468546c 100644 --- a/composer.json +++ b/composer.json @@ -15,18 +15,18 @@ }, "config": { "platform": { - "php": "5.6.0" + "php": "7.1.0" }, "optimize-autoloader": true, "sort-packages": true }, "prefer-stable": true, "require": { - "php": "^5.6|^7.0", + "php": "^7.1", "sebastian/finder-facade": "^1.1", "sebastian/version": "^1.0|^2.0", "symfony/console": "^2.7|^3.0|^4.0", - "phpunit/php-timer": "^1.0.6" + "phpunit/php-timer": "^2.0" }, "autoload": { "classmap": [ @@ -38,7 +38,7 @@ ], "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } } } diff --git a/phpcpd.spec b/phpcpd.spec index 59929ad..0bd73fd 100644 --- a/phpcpd.spec +++ b/phpcpd.spec @@ -1,11 +1,11 @@ -# remirepo/fedora spec file for php-phpunit-phpcpd +# remirepo/fedora spec file for phpcpd # # License: MIT # http://opensource.org/licenses/MIT # # Please, preserve the changelog entries # -%global gh_commit dfed51c1288790fc957c9433e2f49ab152e8a564 +%global gh_commit bb7953b81fb28e55964d76d5fe2dbe725d43fab3 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project phpcpd @@ -18,12 +18,11 @@ %global ns_vendor SebastianBergmann %global ns_project PHPCPD -Name: php-phpunit-%{pk_project} -Version: 3.0.1 -Release: 2%{?dist} +Name: %{pk_project} +Version: 4.0.0 +Release: 1%{?dist} Summary: Copy/Paste Detector (CPD) for PHP code -Group: Development/Libraries License: BSD URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz @@ -31,42 +30,41 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit # Fix for RPM, use autoload Patch0: %{gh_project}-rpm.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -BuildRequires: php(language) >= 5.6 +BuildRequires: php(language) >= 7.1 BuildRequires: php-fedora-autoloader-devel %if %{with_tests} -BuildRequires: %{_bindir}/phpunit +BuildRequires: phpunit7 %if 0%{?fedora} >= 27 BuildRequires: (php-composer(sebastian/finder-facade) >= 1.1 with php-composer(sebastian/finder-facade) < 2) BuildRequires: (php-composer(sebastian/version) >= 1.0 with php-composer(sebastian/version) < 3) BuildRequires: (php-composer(symfony/console) >= 2.7 with php-composer(symfony/console) < 5) -BuildRequires: (php-composer(phpunit/php-timer) >= 1.0.6 with php-composer(phpunit/php-timer) < 2) +BuildRequires: (php-composer(phpunit/php-timer) >= 2.0 with php-composer(phpunit/php-timer) < 3) %else BuildRequires: php-phpunit-FinderFacade BuildRequires: php-phpunit-Version -BuildRequires: php-symfony3-console -BuildRequires: php-phpunit-PHP-Timer +BuildRequires: php-symfony4-console +BuildRequires: php-phpunit-php-timer2 %endif %endif # From composer.json, requires -# "php": "^5.6|^7.0", +# "php": "^7.1", # "sebastian/finder-facade": "^1.1", # "sebastian/version": "^1.0|^2.0", # "symfony/console": "^2.7|^3.0|^4.0", -# "phpunit/php-timer": "^1.0.6" -Requires: php(language) >= 5.6 +# "phpunit/php-timer": "^2.0" +Requires: php(language) >= 7.1 %if 0%{?fedora} >= 27 Requires: (php-composer(sebastian/finder-facade) >= 1.1 with php-composer(sebastian/finder-facade) < 2) Requires: (php-composer(sebastian/version) >= 1.0 with php-composer(sebastian/version) < 3) Requires: (php-composer(symfony/console) >= 2.7 with php-composer(symfony/console) < 5) -Requires: (php-composer(phpunit/php-timer) >= 1.0.6 with php-composer(phpunit/php-timer) < 2) +Requires: (php-composer(phpunit/php-timer) >= 2.0 with php-composer(phpunit/php-timer) < 3) %else Requires: php-phpunit-FinderFacade Requires: php-phpunit-Version -Requires: php-symfony3-console -Requires: php-phpunit-PHP-Timer +Requires: php-symfony4-console +Requires: php-phpunit-php-timer2 %endif # From phpcompatinfo report for version 3.0.0 Requires: php-cli @@ -77,7 +75,12 @@ Requires: php-spl Requires: php-tokenizer Requires: php-xml -Provides: %{pk_project} = %{version} +%if 0%{?fedora} >= 26 +Obsoletes: php-phpunit-%{pk_project} < 4 +Provides: php-phpunit-%{pk_project} = %{version} +%else +Conflicts: php-phpunit-%{pk_project} < 4 +%endif Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version} @@ -111,7 +114,7 @@ cat << 'EOF' | tee -a src/autoload.php '%{php_home}/Symfony3/Component/Console/autoload.php', '%{php_home}/Symfony/Component/Console/autoload.php', ], - '%{php_home}/PHP/Timer/Autoload.php', + '%{php_home}/SebastianBergmann/Timer/autoload.php', ]); EOF @@ -129,9 +132,9 @@ mkdir vendor ln -s %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php vendor/autoload.php ret=0; -for cmd in php php56 php70 php71 php72; do +for cmd in php php71 php72; do if which $cmd; then - $cmd %{_bindir}/phpunit --verbose || ret=1 + $cmd %{_bindir}/phpunit7 --verbose || ret=1 fi done exit $ret @@ -140,12 +143,7 @@ exit $ret %endif -%clean -rm -rf %{buildroot} - - %files -%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE %doc README.md composer.json @@ -154,6 +152,13 @@ rm -rf %{buildroot} %changelog +* Tue Feb 6 2018 Remi Collet <remi@remirepo.net> - 4.0.0-1 +- Update to 4.0.0 +- rename to phpcpd (and obsolete php-phpunit-phpcpd) +- raise dependency on PHP 7.1 +- raise dependency on phpunit/php-timer 2.0 +- use phpunit7 for test suite + * Tue Feb 6 2018 Remi Collet <remi@remirepo.net> - 3.0.1-2 - use range dependencies on F27+ |