summaryrefslogtreecommitdiffstats
path: root/phpunit7.spec
diff options
context:
space:
mode:
Diffstat (limited to 'phpunit7.spec')
-rw-r--r--phpunit7.spec210
1 files changed, 94 insertions, 116 deletions
diff --git a/phpunit7.spec b/phpunit7.spec
index 307f350..7dd189d 100644
--- a/phpunit7.spec
+++ b/phpunit7.spec
@@ -1,4 +1,4 @@
-# remirepo/fedora spec file for phpunit6
+# remirepo/fedora spec file for phpunit7
#
# Copyright (c) 2010-2018 Remi Collet
#
@@ -11,7 +11,7 @@
# For compatibility with SCL
%undefine __brp_mangle_shebangs
-%global gh_commit 3330ef26ade05359d006041316ed0fa9e8e3cefe
+%global gh_commit 9b3373439fdf2f3e9d1578f5e408a3a0d161c3bc
#global gh_date 20150927
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_vendor sebastianbergmann
@@ -20,11 +20,11 @@
%global pk_vendor phpunit
%global pk_project phpunit
# Namespace
-%global ns_vendor PHPUnit6
+%global ns_vendor PHPUnit7
%global php_home %{_datadir}/php
-%global ver_major 6
-%global ver_minor 5
-%global ver_patch 6
+%global ver_major 7
+%global ver_minor 0
+%global ver_patch 0
%global specrel 1
Name: %{pk_project}%{ver_major}
@@ -41,63 +41,45 @@ Source0: https://github.com/%{gh_vendor}/%{gh_project}/archive/%{gh_commi
Patch0: %{name}-rpm.patch
BuildArch: noarch
-BuildRequires: php(language) >= 7.0
+BuildRequires: php(language) >= 7.1
%if 0%{?fedora} >= 27
BuildRequires: (php-composer(myclabs/deep-copy) >= 1.6.1 with php-composer(myclabs/deep-copy) < 2)
BuildRequires: (php-composer(phar-io/manifest) >= 1.0.1 with php-composer(phar-io/manifest) < 2)
BuildRequires: (php-composer(phar-io/version) >= 1.0 with php-composer(phar-io/version) < 2)
BuildRequires: (php-composer(phpspec/prophecy) >= 1.7 with php-composer(phpspec/prophecy) < 2)
-BuildRequires: (php-composer(phpunit/php-code-coverage) >= 5.3 with php-composer(phpunit/php-code-coverage) < 6)
+BuildRequires: (php-composer(phpunit/php-code-coverage) >= 6.0 with php-composer(phpunit/php-code-coverage) < 7)
BuildRequires: (php-composer(phpunit/php-file-iterator) >= 1.4.3 with php-composer(phpunit/php-file-iterator) < 2)
BuildRequires: (php-composer(phpunit/php-text-template) >= 1.2.1 with php-composer(phpunit/php-text-template) < 2)
-BuildRequires: (php-composer(phpunit/php-timer) >= 1.0.9 with php-composer(phpunit/php-timer) < 2)
-BuildRequires: (php-composer(phpunit/phpunit-mock-objects) >= 5.0.5 with php-composer(phpunit/phpunit-mock-objects) < 6)
+BuildRequires: (php-composer(phpunit/php-timer) >= 2.0 with php-composer(phpunit/php-timer) < 3)
+BuildRequires: (php-composer(phpunit/phpunit-mock-objects) >= 6.0 with php-composer(phpunit/phpunit-mock-objects) < 7)
BuildRequires: (php-composer(sebastian/comparator) >= 2.0.2 with php-composer(sebastian/comparator) < 3)
-BuildRequires: (php-composer(sebastian/diff) >= 2.0 with php-composer(sebastian/diff) < 3)
+BuildRequires: (php-composer(sebastian/diff) >= 3.0 with php-composer(sebastian/diff) < 4)
BuildRequires: (php-composer(sebastian/environment) >= 3.1 with php-composer(sebastian/environment) < 4)
BuildRequires: (php-composer(sebastian/exporter) >= 3.1 with php-composer(sebastian/exporter) < 4)
BuildRequires: (php-composer(sebastian/global-state) >= 2.0 with php-composer(sebastian/global-state) < 3)
BuildRequires: (php-composer(sebastian/object-enumerator) >= 3.0.3 with php-composer(sebastian/object-enumerator) < 4)
BuildRequires: (php-composer(sebastian/resource-operations) >= 1.0 with php-composer(sebastian/resource-operations) < 2)
BuildRequires: (php-composer(sebastian/version) >= 2.0.1 with php-composer(sebastian/version) < 3)
-BuildRequires: (php-composer(phpunit/php-invoker) < 2 with php-composer(phpunit/php-invoker) >= 1.1)
+BuildRequires: (php-composer(phpunit/php-invoker) >= 2.0 with php-composer(phpunit/php-invoker) < 3)
%else
-BuildRequires: php-composer(myclabs/deep-copy) < 2
-BuildRequires: php-composer(myclabs/deep-copy) >= 1.6.1
-BuildRequires: php-composer(phar-io/manifest) < 2
-BuildRequires: php-composer(phar-io/manifest) >= 1.0.1
-BuildRequires: php-composer(phar-io/version) < 2
-BuildRequires: php-composer(phar-io/version) >= 1.0
-BuildRequires: php-composer(phpspec/prophecy) < 2
-BuildRequires: php-composer(phpspec/prophecy) >= 1.7
-BuildRequires: php-composer(phpunit/php-code-coverage) < 6
-BuildRequires: php-composer(phpunit/php-code-coverage) >= 5.3
-BuildRequires: php-composer(phpunit/php-file-iterator) < 2
-BuildRequires: php-composer(phpunit/php-file-iterator) >= 1.4.3
-BuildRequires: php-composer(phpunit/php-text-template) < 2
-BuildRequires: php-composer(phpunit/php-text-template) >= 1.2.1
-BuildRequires: php-composer(phpunit/php-timer) < 2
-BuildRequires: php-composer(phpunit/php-timer) >= 1.0.9
-BuildRequires: php-composer(phpunit/phpunit-mock-objects) < 6
-BuildRequires: php-composer(phpunit/phpunit-mock-objects) >= 5.0.5
-BuildRequires: php-composer(sebastian/comparator) < 3
-BuildRequires: php-composer(sebastian/comparator) >= 2.0.2
-BuildRequires: php-composer(sebastian/diff) < 3
-BuildRequires: php-composer(sebastian/diff) >= 2.0
-BuildRequires: php-composer(sebastian/environment) < 4
-BuildRequires: php-composer(sebastian/environment) >= 3.1
-BuildRequires: php-composer(sebastian/exporter) < 4
-BuildRequires: php-composer(sebastian/exporter) >= 3.1
-BuildRequires: php-composer(sebastian/global-state) < 3
-BuildRequires: php-composer(sebastian/global-state) >= 2.0
-BuildRequires: php-composer(sebastian/object-enumerator) < 4
-BuildRequires: php-composer(sebastian/object-enumerator) >= 3.0.3
-BuildRequires: php-composer(sebastian/resource-operations) < 2
-BuildRequires: php-composer(sebastian/resource-operations) >= 1.0
-BuildRequires: php-composer(sebastian/version) < 3
-BuildRequires: php-composer(sebastian/version) >= 2.0.1
-BuildRequires: php-composer(phpunit/php-invoker) < 2
-BuildRequires: php-composer(phpunit/php-invoker) >= 1.1.0
+BuildRequires: php-myclabs-deep-copy >= 1.6.1
+BuildRequires: php-phar-io-manifest >= 1.0.1
+BuildRequires: php-phar-io-version >= 1.0
+BuildRequires: php-phpspec-prophecy >= 1.7
+BuildRequires: php-phpunit-php-code-coverage6
+BuildRequires: php-phpunit-File-Iterator >= 1.4.3
+BuildRequires: php-phpunit-Text-Template >= 1.2.1
+BuildRequires: php-phpunit-php-timer2
+BuildRequires: php-phpunit-mock-objects6
+BuildRequires: php-sebastian-comparator2 >= 2.0.2
+BuildRequires: php-sebastian-diff3
+BuildRequires: php-sebastian-environment3 >= 3.1
+BuildRequires: php-sebastian-exporter3 >= 3.1
+BuildRequires: php-sebastian-global-state2
+BuildRequires: php-sebastian-object-enumerator3 >= 3.0.3
+BuildRequires: php-sebastian-resource-operations
+BuildRequires: php-phpunit-Version >= 2.0.1
+BuildRequires: php-phpunit-php-invoker2
%endif
BuildRequires: php-dom
BuildRequires: php-json
@@ -108,7 +90,7 @@ BuildRequires: php-libxml
BuildRequires: php-fedora-autoloader-devel >= 1.0.0
# From composer.json, "require": {
-# "php": "^7.0",
+# "php": "^7.1",
# "ext-dom": "*",
# "ext-json": "*",
# "ext-libxml": "*",
@@ -118,20 +100,20 @@ BuildRequires: php-fedora-autoloader-devel >= 1.0.0
# "phar-io/manifest": "^1.0.1",
# "phar-io/version": "^1.0",
# "phpspec/prophecy": "^1.7",
-# "phpunit/php-code-coverage": "^5.3",
+# "phpunit/php-code-coverage": "^6.0",
# "phpunit/php-file-iterator": "^1.4.3",
# "phpunit/php-text-template": "^1.2.1",
-# "phpunit/php-timer": "^1.0.9",
-# "phpunit/phpunit-mock-objects": "^5.0.5",
+# "phpunit/php-timer": "^2.0",
+# "phpunit/phpunit-mock-objects": "^6.0",
# "sebastian/comparator": "^2.0.2",
-# "sebastian/diff": "^2.0",
+# "sebastian/diff": "^3.0",
# "sebastian/environment": "^3.1",
# "sebastian/exporter": "^3.1",
# "sebastian/global-state": "^2.0",
# "sebastian/object-enumerator": "^3.0.3",
# "sebastian/resource-operations": "^1.0",
# "sebastian/version": "^2.0.1",
-Requires: php(language) >= 7.0
+Requires: php(language) >= 7.1
Requires: php-cli
Requires: php-dom
Requires: php-json
@@ -143,13 +125,13 @@ Requires: (php-composer(myclabs/deep-copy) >= 1.6.1 with php-co
Requires: (php-composer(phar-io/manifest) >= 1.0.1 with php-composer(phar-io/manifest) < 2)
Requires: (php-composer(phar-io/version) >= 1.0 with php-composer(phar-io/version) < 2)
Requires: (php-composer(phpspec/prophecy) >= 1.7 with php-composer(phpspec/prophecy) < 2)
-Requires: (php-composer(phpunit/php-code-coverage) >= 5.3 with php-composer(phpunit/php-code-coverage) < 6)
+Requires: (php-composer(phpunit/php-code-coverage) >= 6.0 with php-composer(phpunit/php-code-coverage) < 7)
Requires: (php-composer(phpunit/php-file-iterator) >= 1.4.3 with php-composer(phpunit/php-file-iterator) < 2)
Requires: (php-composer(phpunit/php-text-template) >= 1.2.1 with php-composer(phpunit/php-text-template) < 2)
-Requires: (php-composer(phpunit/php-timer) >= 1.0.9 with php-composer(phpunit/php-timer) < 2)
-Requires: (php-composer(phpunit/phpunit-mock-objects) >= 5.0.5 with php-composer(phpunit/phpunit-mock-objects) < 6)
+Requires: (php-composer(phpunit/php-timer) >= 2.0 with php-composer(phpunit/php-timer) < 3)
+Requires: (php-composer(phpunit/phpunit-mock-objects) >= 6.0 with php-composer(phpunit/phpunit-mock-objects) < 7)
Requires: (php-composer(sebastian/comparator) >= 2.0.2 with php-composer(sebastian/comparator) < 3)
-Requires: (php-composer(sebastian/diff) >= 2.0 with php-composer(sebastian/diff) < 3)
+Requires: (php-composer(sebastian/diff) >= 3.0 with php-composer(sebastian/diff) < 4)
Requires: (php-composer(sebastian/environment) >= 3.1 with php-composer(sebastian/environment) < 4)
Requires: (php-composer(sebastian/exporter) >= 3.1 with php-composer(sebastian/exporter) < 4)
Requires: (php-composer(sebastian/global-state) >= 2.0 with php-composer(sebastian/global-state) < 3)
@@ -157,46 +139,28 @@ Requires: (php-composer(sebastian/object-enumerator) >= 3.0.3 with php-co
Requires: (php-composer(sebastian/resource-operations) >= 1.0 with php-composer(sebastian/resource-operations) < 2)
Requires: (php-composer(sebastian/version) >= 2.0.1 with php-composer(sebastian/version) < 3)
# From composer.json, "suggest": {
-# "phpunit/php-invoker": "^1.1",
+# "phpunit/php-invoker": "^2.0",
# "ext-xdebug": "*"
-Requires: (php-composer(phpunit/php-invoker) < 2 with php-composer(phpunit/php-invoker) >= 1.1)
+Requires: (php-composer(phpunit/php-invoker) >= 2.0 with php-composer(phpunit/php-invoker) < 3)
%else
-Requires: php-composer(myclabs/deep-copy) < 2
-Requires: php-composer(myclabs/deep-copy) >= 1.6.1
-Requires: php-composer(phar-io/manifest) < 2
-Requires: php-composer(phar-io/manifest) >= 1.0.1
-Requires: php-composer(phar-io/version) < 2
-Requires: php-composer(phar-io/version) >= 1.0
-Requires: php-composer(phpspec/prophecy) < 2
-Requires: php-composer(phpspec/prophecy) >= 1.7
-Requires: php-composer(phpunit/php-code-coverage) < 6
-Requires: php-composer(phpunit/php-code-coverage) >= 5.3
-Requires: php-composer(phpunit/php-file-iterator) < 2
-Requires: php-composer(phpunit/php-file-iterator) >= 1.4.3
-Requires: php-composer(phpunit/php-text-template) < 2
-Requires: php-composer(phpunit/php-text-template) >= 1.2.1
-Requires: php-composer(phpunit/php-timer) < 2
-Requires: php-composer(phpunit/php-timer) >= 1.0.9
-Requires: php-composer(phpunit/phpunit-mock-objects) < 6
-Requires: php-composer(phpunit/phpunit-mock-objects) >= 5.0.5
-Requires: php-composer(sebastian/comparator) < 3
-Requires: php-composer(sebastian/comparator) >= 2.0.2
-Requires: php-composer(sebastian/diff) < 3
-Requires: php-composer(sebastian/diff) >= 2.0
-Requires: php-composer(sebastian/environment) < 4
-Requires: php-composer(sebastian/environment) >= 3.1
-Requires: php-composer(sebastian/exporter) < 4
-Requires: php-composer(sebastian/exporter) >= 3.1
-Requires: php-composer(sebastian/global-state) < 3
-Requires: php-composer(sebastian/global-state) >= 2.0
-Requires: php-composer(sebastian/object-enumerator) < 4
-Requires: php-composer(sebastian/object-enumerator) >= 3.0.3
-Requires: php-composer(sebastian/resource-operations) < 2
-Requires: php-composer(sebastian/resource-operations) >= 1.0
-Requires: php-composer(sebastian/version) < 3
-Requires: php-composer(sebastian/version) >= 2.0.1
-Requires: php-composer(phpunit/php-invoker) >= 1.1
-Requires: php-composer(phpunit/php-invoker) < 2
+Requires: php-myclabs-deep-copy >= 1.6.1
+Requires: php-phar-io-manifest >= 1.0.1
+Requires: php-phar-io-version >= 1.0
+Requires: php-phpspec-prophecy >= 1.7
+Requires: php-phpunit-php-code-coverage6
+Requires: php-phpunit-File-Iterator >= 1.4.3
+Requires: php-phpunit-Text-Template >= 1.2.1
+Requires: php-phpunit-php-timer2
+Requires: php-phpunit-mock-objects6
+Requires: php-sebastian-comparator2 >= 2.0.2
+Requires: php-sebastian-diff3
+Requires: php-sebastian-environment3 >= 3.1
+Requires: php-sebastian-exporter3 >= 3.1
+Requires: php-sebastian-global-state2
+Requires: php-sebastian-object-enumerator3 >= 3.0.3
+Requires: php-sebastian-resource-operations
+Requires: php-phpunit-Version >= 2.0.1
+Requires: php-phpunit-php-invoker2
%endif
# Autoloader
Requires: php-composer(fedora/autoloader)
@@ -241,24 +205,24 @@ It is an instance of the xUnit architecture for unit testing frameworks.
cat << 'EOF' | tee -a src/autoload.php
// Dependencies
\Fedora\Autoloader\Dependencies::required([
- 'File/Iterator/Autoload.php',
- 'Text/Template/Autoload.php',
- 'SebastianBergmann/CodeCoverage5/autoload.php',
- 'PHP/Timer/Autoload.php',
- '%{ns_vendor}/Framework/MockObject5/autoload.php',
- 'Prophecy/autoload.php',
- 'SebastianBergmann/Comparator2/autoload.php',
- 'SebastianBergmann/Diff2/autoload.php',
- 'SebastianBergmann/Environment3/autoload.php',
- 'SebastianBergmann/Exporter3/autoload.php',
- 'SebastianBergmann/GlobalState2/autoload.php',
- 'SebastianBergmann/ObjectEnumerator3/autoload.php',
- 'SebastianBergmann/ResourceOperations/autoload.php',
- 'SebastianBergmann/Version/autoload.php',
- 'DeepCopy/autoload.php',
- 'PHP/Invoker/Autoload.php',
- 'PharIo/Manifest/autoload.php',
- 'PharIo/Version/autoload.php',
+ '%{php_home}/File/Iterator/Autoload.php',
+ '%{php_home}/Text/Template/Autoload.php',
+ '%{php_home}/SebastianBergmann/CodeCoverage6/autoload.php',
+ '%{php_home}/SebastianBergmann/Timer/autoload.php',
+ '%{ns_vendor}/Framework/MockObject6/autoload.php',
+ '%{php_home}/Prophecy/autoload.php',
+ '%{php_home}/SebastianBergmann/Diff3/autoload.php', // Fedora comparator which allow v2
+ '%{php_home}/SebastianBergmann/Comparator2/autoload.php',
+ '%{php_home}/SebastianBergmann/Environment3/autoload.php',
+ '%{php_home}/SebastianBergmann/Exporter3/autoload.php',
+ '%{php_home}/SebastianBergmann/GlobalState2/autoload.php',
+ '%{php_home}/SebastianBergmann/ObjectEnumerator3/autoload.php',
+ '%{php_home}/SebastianBergmann/ResourceOperations/autoload.php',
+ '%{php_home}/SebastianBergmann/Version/autoload.php',
+ '%{php_home}/DeepCopy/autoload.php',
+ '%{php_home}/SebastianBergmann/Invoker/autoload.php',
+ '%{php_home}/PharIo/Manifest/autoload.php',
+ '%{php_home}/PharIo/Version/autoload.php',
]);
// Extensions
\Fedora\Autoloader\Dependencies::optional([
@@ -288,11 +252,12 @@ ln -s %{name} %{buildroot}%{_bindir}/phpunit
%check
OPT="--testsuite=small --no-coverage"
sed -e 's:@PATH@:%{buildroot}%{php_home}/%{ns_vendor}:' -i tests/bootstrap.php
+sed -e 's:%{php_home}/%{ns_vendor}:%{buildroot}%{php_home}/%{ns_vendor}:' -i phpunit
ret=0
-for cmd in php php70 php71 php72; do
+for cmd in php php71 php72; do
if which $cmd; then
- $cmd -d include_path=.:%{buildroot}%{php_home}:%{php_home} ./phpunit $OPT --verbose || ret=1
+ $cmd ./phpunit $OPT --verbose || ret=1
fi
done
exit $ret
@@ -311,6 +276,19 @@ exit $ret
%changelog
+* Fri Feb 2 2018 Remi Collet <remi@remirepo.net> - 7.0.0-1
+- Update to 7.0.0
+- rename to phpunit7
+- move to /usr/share/php/PHPUnit7
+- raise dependency on PHP 7.1
+- raise dependency on phpunit/php-code-coverage 6.0
+- raise dependency on phpunit/php-timer 2.0
+- raise dependency on phpunit/phpunit-mock-objects 6.0
+- raise dependency on sebastian/diff 3.0
+- raise dependency on phpunit/php-invoker 2.0
+- use range dependencies on F27+
+- use full path instead of relying on include_path
+
* Thu Feb 1 2018 Remi Collet <remi@remirepo.net> - 6.5.6-1
- Update to 6.5.6
- undefine __brp_mangle_shebangs