From 4ae9ce046d007648d0fda271560d1ab01ab3a167 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 20 Feb 2020 17:06:49 +0100 Subject: update to 5.0.1 raise depency on PHP 7.3 raise depency on sebastian/finder-facade 2 raise depency on sebastian/version 2 raise depency on symfony/console 4 use phpunit8 for test suite --- composer.json | 13 +++++++------ phpcpd.spec | 51 +++++++++++++++++++++++++++++---------------------- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/composer.json b/composer.json index 4725df9..32461f5 100644 --- a/composer.json +++ b/composer.json @@ -15,18 +15,19 @@ }, "config": { "platform": { - "php": "7.1.0" + "php": "7.3.0" }, "optimize-autoloader": true, "sort-packages": true }, + "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": "^7.1", + "php": "^7.3", "ext-dom": "*", - "sebastian/finder-facade": "^1.1", - "sebastian/version": "^1.0|^2.0", - "symfony/console": "^2.7|^3.0|^4.0", + "sebastian/finder-facade": "^2.0", + "sebastian/version": "^2.0", + "symfony/console": "^4.0|^5.0", "phpunit/php-timer": "^2.0" }, "autoload": { @@ -39,7 +40,7 @@ ], "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "5.0-dev" } } } diff --git a/phpcpd.spec b/phpcpd.spec index 3a5ac2e..2c760b8 100644 --- a/phpcpd.spec +++ b/phpcpd.spec @@ -9,7 +9,7 @@ # For compatibility with SCL %undefine __brp_mangle_shebangs -%global gh_commit 0d9afa762f2400de077b2192f4a9d127de0bb78e +%global gh_commit 3a31ace06211582ef963327bfb47d20af032ff9f %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project phpcpd @@ -23,7 +23,7 @@ %global ns_project PHPCPD Name: %{pk_project} -Version: 4.1.0 +Version: 5.0.1 Release: 1%{?dist} Summary: Copy/Paste Detector (CPD) for PHP code @@ -35,19 +35,19 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit Patch0: %{gh_project}-rpm.patch BuildArch: noarch -BuildRequires: php(language) >= 7.1 +BuildRequires: php(language) >= 7.3 BuildRequires: php-fedora-autoloader-devel %if %{with_tests} -BuildRequires: phpunit7 +BuildRequires: phpunit8 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -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(sebastian/finder-facade) >= 2.0 with php-composer(sebastian/finder-facade) < 3) +BuildRequires: (php-composer(sebastian/version) >= 2.0 with php-composer(sebastian/version) < 3) +BuildRequires: (php-composer(symfony/console) >= 4.0 with php-composer(symfony/console) < 6) BuildRequires: (php-composer(phpunit/php-timer) >= 2.0 with php-composer(phpunit/php-timer) < 3) # remirepo:6 %else -BuildRequires: php-phpunit-FinderFacade +BuildRequires: php-sebastian-finder-facade2 BuildRequires: php-phpunit-Version BuildRequires: php-symfony4-console BuildRequires: php-phpunit-php-timer2 @@ -55,23 +55,23 @@ BuildRequires: php-phpunit-php-timer2 %endif # From composer.json, requires -# "php": "^7.1", +# "php": "^7.3", # "ext-dom": "*", -# "sebastian/finder-facade": "^1.1", -# "sebastian/version": "^1.0|^2.0", -# "symfony/console": "^2.7|^3.0|^4.0", +# "sebastian/finder-facade": "^2.0", +# "sebastian/version": "^2.0", +# "symfony/console": "^4.0|^5.0", # "phpunit/php-timer": "^2.0" -Requires: php(language) >= 7.1 +Requires: php(language) >= 7.3 Requires: php-dom # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -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(sebastian/finder-facade) >= 2.0 with php-composer(sebastian/finder-facade) < 3) +Requires: (php-composer(sebastian/version) >= 2.0 with php-composer(sebastian/version) < 3) +Requires: (php-composer(symfony/console) >= 4.0 with php-composer(symfony/console) < 6) Requires: (php-composer(phpunit/php-timer) >= 2.0 with php-composer(phpunit/php-timer) < 3) # remirepo:6 %else -Requires: php-phpunit-FinderFacade +Requires: php-sebastian-finder-facade2 Requires: php-phpunit-Version Requires: php-symfony4-console Requires: php-phpunit-php-timer2 @@ -118,12 +118,11 @@ phpab \ cat << 'EOF' | tee -a src/autoload.php // Dependencies \Fedora\Autoloader\Dependencies::required([ - '%{php_home}/%{ns_vendor}/FinderFacade/autoload.php', + '%{php_home}/%{ns_vendor}/FinderFacade2/autoload.php', '%{php_home}/%{ns_vendor}/Version/autoload.php', [ + '%{php_home}/Symfony5/Component/Console/autoload.php', '%{php_home}/Symfony4/Component/Console/autoload.php', - '%{php_home}/Symfony3/Component/Console/autoload.php', - '%{php_home}/Symfony/Component/Console/autoload.php', ], '%{php_home}/SebastianBergmann/Timer/autoload.php', ]); @@ -143,9 +142,9 @@ mkdir vendor ln -s %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php vendor/autoload.php ret=0; -for cmd in php php71 php72 php73; do +for cmd in php php73 php74; do if which $cmd; then - $cmd %{_bindir}/phpunit7 --verbose || ret=1 + $cmd %{_bindir}/phpunit8 --verbose || ret=1 fi done exit $ret @@ -164,6 +163,14 @@ exit $ret %changelog +* Thu Feb 20 2020 Remi Collet - 5.0.1-1 +- update to 5.0.1 +- raise depency on PHP 7.3 +- raise depency on sebastian/finder-facade 2 +- raise depency on sebastian/version 2 +- raise depency on symfony/console 4 +- use phpunit8 for test suite + * Tue Sep 18 2018 Remi Collet - 4.1.0-1 - update to 4.1.0 -- cgit