summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-02-02 14:59:15 +0100
committerRemi Collet <remi@remirepo.net>2018-02-02 14:59:15 +0100
commit6d417d88328bfaf201da20e7eba64ef87ffd036f (patch)
tree4671ca12b98d7d0da97efa506f172454aa12c08e
parente48f28c8da7f9d9d98e9b88e4e9965b12513803b (diff)
Update to 4.0.5
allow phpunit7 use package names on EL and Fedora < 27
-rw-r--r--composer.json4
-rw-r--r--phpcov.spec93
2 files changed, 65 insertions, 32 deletions
diff --git a/composer.json b/composer.json
index 43df529..d9030df 100644
--- a/composer.json
+++ b/composer.json
@@ -23,8 +23,8 @@
"prefer-stable": true,
"require": {
"php": "^7.0",
- "phpunit/phpunit": "^6.0",
- "phpunit/php-code-coverage": "^5.2.1",
+ "phpunit/phpunit": "^6.0 || ^7.0",
+ "phpunit/php-code-coverage": "^5.2.1 || ^6.0",
"sebastian/diff": "^1.1 || ^2.0",
"sebastian/finder-facade": "^1.1",
"sebastian/version": "^2.0",
diff --git a/phpcov.spec b/phpcov.spec
index 31745d4..59a0f00 100644
--- a/phpcov.spec
+++ b/phpcov.spec
@@ -6,7 +6,11 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 1fc7ed3179a3ed27a386cd2336e91d8e747a3d71
+
+# For compatibility with SCL
+%undefine __brp_mangle_shebangs
+
+%global gh_commit 19b5781ddfb0be9d6fec6ac515f3f2da27dcfbb5
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project phpcov
@@ -21,7 +25,7 @@
Name: %{pk_project}
-Version: 4.0.4
+Version: 4.0.5
Release: 1%{?dist}
Summary: CLI frontend for PHP_CodeCoverage
@@ -37,22 +41,19 @@ BuildArch: noarch
BuildRequires: php(language) >= 7.0
BuildRequires: php-fedora-autoloader-devel
%if %{with_tests}
-BuildRequires: phpunit6
%if 0%{?fedora} >= 27
-BuildRequires: (php-composer(phpunit/php-code-coverage) >= 5.2.1 with php-composer(phpunit/php-code-coverage) < 6)
+BuildRequires: (phpunit6 or phpunit7)
+BuildRequires: (php-composer(phpunit/php-code-coverage) >= 5.2.1 with php-composer(phpunit/php-code-coverage) < 7)
BuildRequires: (php-composer(sebastian/diff) >= 2 with php-composer(sebastian/diff) < 3)
BuildRequires: (php-composer(sebastian/finder-facade) >= 1.1 with php-composer(sebastian/finder-facade) < 2)
BuildRequires: (php-composer(sebastian/version) >= 2.0 with php-composer(sebastian/version) < 3)
BuildRequires: (php-composer(symfony/console) >= 3.0 with php-composer(symfony/console) < 5)
%else
-BuildRequires: php-composer(phpunit/php-code-coverage) < 6
-BuildRequires: php-composer(phpunit/php-code-coverage) >= 5.2.1
-BuildRequires: php-composer(sebastian/diff) < 3
-BuildRequires: php-composer(sebastian/diff) >= 2
-BuildRequires: php-composer(sebastian/finder-facade) < 2
-BuildRequires: php-composer(sebastian/finder-facade) >= 1.1
-BuildRequires: php-composer(sebastian/version) < 3
-BuildRequires: php-composer(sebastian/version) >= 2.0
+BuildRequires: phpunit6
+BuildRequires: php-phpunit-php-code-coverage5 >= 5.2.1
+BuildRequires: php-sebastian-diff2
+BuildRequires: php-phpunit-FinderFacade >= 1.1
+BuildRequires: php-phpunit-Version >= 2.0
BuildRequires: php-symfony3-console
%endif
BuildRequires: php-pecl(Xdebug)
@@ -60,29 +61,26 @@ BuildRequires: php-pecl(Xdebug)
# from composer.json
# "php": "^7.0",
-# "phpunit/phpunit": "^6.0",
-# "phpunit/php-code-coverage": "^5.2.1",
+# "phpunit/phpunit": "^6.0 || ^7.0",
+# "phpunit/php-code-coverage": "^5.2.1 || ^6.0",
# "sebastian/diff": "^1.1 || ^2.0",
# "sebastian/finder-facade": "^1.1",
# "sebastian/version": "^2.0",
# "symfony/console": "^3.0|^4.0"
Requires: php(language) >= 7.0
-Requires: phpunit6
%if 0%{?fedora} >= 27
-Requires: (php-composer(phpunit/php-code-coverage) >= 5.2.1 with php-composer(phpunit/php-code-coverage) < 6)
+Requires: (phpunit6 or phpunit7)
+Requires: (php-composer(phpunit/php-code-coverage) >= 5.2.1 with php-composer(phpunit/php-code-coverage) < 7)
Requires: (php-composer(sebastian/diff) >= 2 with php-composer(sebastian/diff) < 3)
Requires: (php-composer(sebastian/finder-facade) >= 1.1 with php-composer(sebastian/finder-facade) < 2)
Requires: (php-composer(sebastian/version) >= 2.0 with php-composer(sebastian/version) < 3)
Requires: (php-composer(symfony/console) >= 3.0 with php-composer(symfony/console) < 5)
%else
-Requires: php-composer(phpunit/php-code-coverage) < 6
-Requires: php-composer(phpunit/php-code-coverage) >= 5.2.1
-Requires: php-composer(sebastian/diff) < 3
-Requires: php-composer(sebastian/diff) >= 2
-Requires: php-composer(sebastian/finder-facade) < 2
-Requires: php-composer(sebastian/finder-facade) >= 1.1
-Requires: php-composer(sebastian/version) < 3
-Requires: php-composer(sebastian/version) >= 2.0
+Requires: phpunit6
+Requires: php-phpunit-php-code-coverage5 >= 5.2.1
+Requires: php-sebastian-diff2
+Requires: php-phpunit-FinderFacade >= 1.1
+Requires: php-phpunit-Version >= 2.0
Requires: php-symfony3-console
%endif
# from phpcompatinfo report for version 4.0.0
@@ -115,7 +113,25 @@ phpab \
cat << 'EOF' | tee -a src/autoload.php
// Dependencies
-\Fedora\Autoloader\Dependencies::required([
+if (version_compare(PHP_VERSION, '7.1', '>')) {
+ \Fedora\Autoloader\Dependencies::required([
+ [
+ '%{php_home}/PHPUnit7/autoload.php',
+ '%{php_home}/PHPUnit6/autoload.php',
+ ], [
+ '%{php_home}/%{ns_vendor}/CodeCoverage6/autoload.php',
+ '%{php_home}/%{ns_vendor}/CodeCoverage5/autoload.php',
+ ],
+ '%{php_home}/%{ns_vendor}/Diff2/autoload.php',
+ '%{php_home}/%{ns_vendor}/FinderFacade/autoload.php',
+ '%{php_home}/%{ns_vendor}/Version/autoload.php',
+ [
+ '%{php_home}/Symfony4/Component/Console/autoload.php',
+ '%{php_home}/Symfony3/Component/Console/autoload.php',
+ ]
+]);
+} else {
+ \Fedora\Autoloader\Dependencies::required([
'%{php_home}/PHPUnit6/autoload.php',
'%{php_home}/%{ns_vendor}/CodeCoverage5/autoload.php',
'%{php_home}/%{ns_vendor}/Diff2/autoload.php',
@@ -126,6 +142,7 @@ cat << 'EOF' | tee -a src/autoload.php
'%{php_home}/Symfony3/Component/Console/autoload.php',
]
]);
+}
EOF
@@ -141,11 +158,22 @@ install -D -p -m 755 %{pk_project} %{buildroot}%{_bindir}/%{pk_project}
mkdir vendor
ln -s %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php vendor/autoload.php
-for cmd in php php70 php71 php72; do
- if which $cmd; then
- $cmd %{_bindir}/phpunit6 --verbose
- fi
-done
+ret=0
+if which phpunit6; then
+ for cmd in php php70 php71 php72; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit6 --verbose || ret=1
+ fi
+ done
+fi
+if which phpunit7; then
+ for cmd in php php71 php72; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit7 --verbose || ret=1
+ fi
+ done
+fi
+exit $ret;
%else
: Test suite skipped
%endif
@@ -161,6 +189,11 @@ done
%changelog
+* Fri Feb 2 2018 Remi Collet <remi@remirepo.net> - 4.0.5-1
+- Update to 4.0.5
+- allow phpunit7
+- use package names on EL and Fedora < 27
+
* Thu Jan 18 2018 Remi Collet <remi@remirepo.net> - 4.0.4-1
- Update to 4.0.4 (no change)
- raise dependency on symfony/console 3