diff options
author | Remi Collet <remi@remirepo.net> | 2020-08-12 08:55:53 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-08-12 08:55:53 +0200 |
commit | 3f671e4f4c32fb6ab4b9224df0d0a497cd1742c1 (patch) | |
tree | df5f98ccf50ea79c9b85d47febd86779c2f087d5 | |
parent | c1ff96766a65304354bf58638971821fd6d2e2d2 (diff) |
update to 8.0.0
sources from git snapshot
raise dependency on phpunit/phpunit 9.3
raise dependency on phpunit/php-code-coverage 9.1
drop dependency on Symfony
-rw-r--r-- | composer.json | 9 | ||||
-rw-r--r-- | phpcov-rpm.patch | 23 | ||||
-rw-r--r-- | phpcov.spec | 58 |
3 files changed, 43 insertions, 47 deletions
diff --git a/composer.json b/composer.json index 0d82aeb..475b30a 100644 --- a/composer.json +++ b/composer.json @@ -23,12 +23,11 @@ "prefer-stable": true, "require": { "php": "^7.3", - "phpunit/phpunit": "^9.0", - "phpunit/php-code-coverage": "^8.0", + "phpunit/phpunit": "^9.3", + "phpunit/php-code-coverage": "^9.1", "sebastian/diff": "^4.0", "sebastian/finder-facade": "^2.0", - "sebastian/version": "^3.0", - "symfony/console": "^3.0 || ^4.0 || ^5.0" + "sebastian/version": "^3.0" }, "autoload": { "classmap": [ @@ -40,7 +39,7 @@ ], "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-master": "8.0-dev" } } } diff --git a/phpcov-rpm.patch b/phpcov-rpm.patch index a181e10..d8cc948 100644 --- a/phpcov-rpm.patch +++ b/phpcov-rpm.patch @@ -1,6 +1,7 @@ ---- phpcov.rpm 2015-10-05 14:23:45.648930666 +0200 -+++ phpcov 2015-10-05 14:23:51.362957863 +0200 -@@ -9,23 +9,16 @@ +diff -up ./phpcov.rpm ./phpcov +--- ./phpcov.rpm 2020-08-12 08:34:40.537300187 +0200 ++++ ./phpcov 2020-08-12 08:35:58.538282816 +0200 +@@ -9,22 +9,6 @@ * file that was distributed with this source code. */ @@ -12,15 +13,8 @@ - $loaded = true; - break; - } -+// Ensure correct include_path for RHSCL -+$inc = get_include_path(); -+$dirs = explode(':', $inc); -+if (!in_array('/usr/share/php', $dirs)) { -+ $dirs[] = '/usr/share/php'; -+ set_include_path(implode(':', $dirs)); - } -+unset ($inc, $dirs); - +-} +- -if (!$loaded) { - die( - 'You need to set up the project dependencies using the following commands:' . PHP_EOL . @@ -28,7 +22,6 @@ - 'php composer.phar install' . PHP_EOL - ); -} -+require 'SebastianBergmann/PHPCOV/autoload.php'; ++require '/usr/share/php/SebastianBergmann/PHPCOV/autoload.php'; - $application = new SebastianBergmann\PHPCOV\Application; - $application->run(); + exit((new SebastianBergmann\PHPCOV\Application)->run($_SERVER['argv'])); diff --git a/phpcov.spec b/phpcov.spec index b68afda..25a627c 100644 --- a/phpcov.spec +++ b/phpcov.spec @@ -1,21 +1,22 @@ # fedora/remirepo spec file for phpcov # -# Copyright (c) 2013-2019 Remi Collet +# Copyright (c) 2013-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # +%bcond_without tests + # For compatibility with SCL %undefine __brp_mangle_shebangs -%global gh_commit b91ef1640a7571f32e2eb58b107865f4c87a2eef +%global gh_commit 0dc4b3f17f72402d1cbcb979520de80acf8ab094 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project phpcov %global php_home %{_datadir}/php -%global with_tests 0%{!?_without_tests:1} # Packagist %global pk_vendor phpunit %global pk_project phpcov @@ -25,13 +26,14 @@ Name: %{pk_project} -Version: 7.0.2 +Version: 8.0.0 Release: 1%{?dist} Summary: CLI frontend for PHP_CodeCoverage 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 +Source0: %{name}-%{version}-%{gh_short}.tgz +Source1: makesrc.sh # Fix autoload for RPM Patch0: %{gh_project}-rpm.patch @@ -39,22 +41,20 @@ Patch0: %{gh_project}-rpm.patch BuildArch: noarch BuildRequires: php(language) >= 7.3 BuildRequires: php-fedora-autoloader-devel -%if %{with_tests} -BuildRequires: phpunit9 +%if %{with tests} +BuildRequires: phpunit9 >= 9.3 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(phpunit/php-code-coverage) >= 8.0 with php-composer(phpunit/php-code-coverage) < 9) +BuildRequires: (php-composer(phpunit/php-code-coverage) >= 9.1 with php-composer(phpunit/php-code-coverage) < 10) BuildRequires: (php-composer(sebastian/diff) >= 4 with php-composer(sebastian/diff) < 5) BuildRequires: (php-composer(sebastian/finder-facade) >= 2.0 with php-composer(sebastian/finder-facade) < 3) BuildRequires: (php-composer(sebastian/version) >= 3.0 with php-composer(sebastian/version) < 4) -BuildRequires: (php-composer(symfony/console) >= 3.0 with php-composer(symfony/console) < 6) -# remirepo:7 +# remirepo:6 %else -BuildRequires: php-phpunit-php-code-coverage8 +BuildRequires: php-phpunit-php-code-coverage9 >= 9.1 BuildRequires: php-sebastian-diff4 BuildRequires: php-sebastian-finder-facade2 BuildRequires: php-sebastian-version3 -BuildRequires: php-symfony4-console %endif BuildRequires: php-pecl(Xdebug) %endif @@ -65,24 +65,21 @@ BuildRequires: php-pecl(Xdebug) # "phpunit/php-code-coverage": "^8.0", # "sebastian/diff": "^4.0", # "sebastian/finder-facade": "^2.0", -# "sebastian/version": "^3.0", -# "symfony/console": "^3.0 || ^4.0 || ^5.0" +# "sebastian/version": "^3.0" Requires: php(language) >= 7.3 -Requires: phpunit9 +Requires: phpunit9 >= 9.3 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(phpunit/php-code-coverage) >= 8.0 with php-composer(phpunit/php-code-coverage) < 9) +Requires: (php-composer(phpunit/php-code-coverage) >= 9.1 with php-composer(phpunit/php-code-coverage) < 10) Requires: (php-composer(sebastian/diff) >= 4 with php-composer(sebastian/diff) < 5) Requires: (php-composer(sebastian/finder-facade) >= 2.0 with php-composer(sebastian/finder-facade) < 3) Requires: (php-composer(sebastian/version) >= 3.0 with php-composer(sebastian/version) < 4) -Requires: (php-composer(symfony/console) >= 3.0 with php-composer(symfony/console) < 6) -# remirepo:7 +# remirepo:6 %else -Requires: php-phpunit-php-code-coverage8 +Requires: php-phpunit-php-code-coverage9 >= 9.1 Requires: php-sebastian-diff4 Requires: php-sebastian-finder-facade2 Requires: php-sebastian-version3 -Requires: php-symfony4-console %endif # from phpcompatinfo report for version 4.0.0 # none @@ -118,15 +115,10 @@ cat << 'EOF' | tee -a src/autoload.php // Dependencies \Fedora\Autoloader\Dependencies::required([ '%{php_home}/PHPUnit9/autoload.php', - '%{php_home}/%{ns_vendor}/CodeCoverage8/autoload.php', + '%{php_home}/%{ns_vendor}/CodeCoverage9/autoload.php', '%{php_home}/%{ns_vendor}/Diff4/autoload.php', '%{php_home}/%{ns_vendor}/FinderFacade2/autoload.php', '%{php_home}/%{ns_vendor}/Version3/autoload.php', - [ - '%{php_home}/Symfony5/Component/Console/autoload.php', - '%{php_home}/Symfony4/Component/Console/autoload.php', - '%{php_home}/Symfony3/Component/Console/autoload.php', - ] ]); EOF @@ -139,7 +131,7 @@ install -D -p -m 755 %{pk_project} %{buildroot}%{_bindir}/%{pk_project} %check -%if %{with_tests} +%if %{with tests} mkdir vendor ln -s %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php vendor/autoload.php @@ -147,6 +139,11 @@ if ! php -v | grep Xdebug then EXT="-d zend_extension=xdebug.so" fi +# test with hardcoded path in data +rm tests/end-to-end/execute/valid-script-argument-with-cli-include-with-text-report.phpt +rm tests/end-to-end/merge/valid-directory-with-text-report.phpt + +# TODO php80 when xdebug will be available ret=0 for cmd in php php73 php74; do if which $cmd; then @@ -170,6 +167,13 @@ exit $ret; %changelog +* Wed Aug 12 2020 Remi Collet <remi@remirepo.net> - 8.0.0-1 +- update to 8.0.0 +- sources from git snapshot +- raise dependency on phpunit/phpunit 9.3 +- raise dependency on phpunit/php-code-coverage 9.1 +- drop dependency on Symfony + * Thu Mar 5 2020 Remi Collet <remi@remirepo.net> - 7.0.2-1 - update to 7.0.2 |