summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-02-01 09:08:52 +0100
committerRemi Collet <remi@remirepo.net>2019-02-01 09:08:52 +0100
commit8b833aae7a3c9f40d41bb9f00992112fdfe2a787 (patch)
tree4070e970f085a8f39a16cd03ddfa0d8c6b109e8e
parenta744836547c990d67d57a021662841ce930a788b (diff)
rename to phpunit8
update to 8.0.0 add dependency on xmlwriter extension add weak dependency on soap, xdebug and pcov extensions raise dependency on PHP 7.2 raise dependency on phpunit/php-code-coverage 7.0 raise dependency on sebastian/environment 4.1 raise dependency on sebastian/global-state 3.0
-rw-r--r--composer.json16
-rw-r--r--phpunit8-rpm.patch20
-rw-r--r--phpunit8.spec80
3 files changed, 62 insertions, 54 deletions
diff --git a/composer.json b/composer.json
index 4104e42..4ef9090 100644
--- a/composer.json
+++ b/composer.json
@@ -21,26 +21,27 @@
},
"prefer-stable": true,
"require": {
- "php": "^7.1",
+ "php": "^7.2",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
+ "ext-xmlwriter": "*",
"doctrine/instantiator": "^1.1",
"myclabs/deep-copy": "^1.7",
"phar-io/manifest": "^1.0.2",
"phar-io/version": "^2.0",
"phpspec/prophecy": "^1.7",
- "phpunit/php-code-coverage": "^6.0.7",
+ "phpunit/php-code-coverage": "^7.0",
"phpunit/php-file-iterator": "^2.0.1",
"phpunit/php-text-template": "^1.2.1",
"phpunit/php-timer": "^2.0",
"sebastian/comparator": "^3.0",
"sebastian/diff": "^3.0",
- "sebastian/environment": "^4.0",
+ "sebastian/environment": "^4.1",
"sebastian/exporter": "^3.1",
- "sebastian/global-state": "^2.0",
+ "sebastian/global-state": "^3.0",
"sebastian/object-enumerator": "^3.0.3",
"sebastian/resource-operations": "^2.0",
"sebastian/version": "^2.0.1"
@@ -48,12 +49,9 @@
"require-dev": {
"ext-PDO": "*"
},
- "conflict": {
- "phpunit/phpunit-mock-objects": "*"
- },
"config": {
"platform": {
- "php": "7.1.0"
+ "php": "7.2.0"
},
"optimize-autoloader": true,
"sort-packages": true
@@ -84,7 +82,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "7.5-dev"
+ "dev-master": "8.0-dev"
}
}
}
diff --git a/phpunit8-rpm.patch b/phpunit8-rpm.patch
index bb75e19..8b70cbd 100644
--- a/phpunit8-rpm.patch
+++ b/phpunit8-rpm.patch
@@ -1,6 +1,6 @@
diff -up ./phpunit.rpm ./phpunit
---- ./phpunit.rpm 2019-01-15 09:19:08.000000000 +0100
-+++ ./phpunit 2019-01-15 11:49:08.859885786 +0100
+--- ./phpunit.rpm 2019-02-01 06:41:59.000000000 +0100
++++ ./phpunit 2019-02-01 08:43:27.079804951 +0100
@@ -27,25 +27,12 @@ if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'UTC');
}
@@ -29,7 +29,7 @@ diff -up ./phpunit.rpm ./phpunit
+ echo "\n==== Redirecting to composer installed version in vendor/phpunit ====\n\n";
+ define ('PHPUNIT_COMPOSER_INSTALL', realpath('./vendor/autoload.php'));
+} else {
-+ define ('PHPUNIT_COMPOSER_INSTALL', '/usr/share/php/PHPUnit7/autoload.php');
++ define ('PHPUNIT_COMPOSER_INSTALL', '/usr/share/php/PHPUnit8/autoload.php');
}
$options = getopt('', array('prepend:'));
@@ -44,9 +44,9 @@ diff -up ./phpunit.rpm ./phpunit
+ PHPUnit\TextUI\Command::main(); // PHPUnit v6 or newer
+}
diff -up ./src/Util/Configuration.php.rpm ./src/Util/Configuration.php
---- ./src/Util/Configuration.php.rpm 2019-01-15 09:19:08.000000000 +0100
-+++ ./src/Util/Configuration.php 2019-01-15 11:49:08.859885786 +0100
-@@ -1025,7 +1025,7 @@ final class Configuration
+--- ./src/Util/Configuration.php.rpm 2019-02-01 06:41:59.000000000 +0100
++++ ./src/Util/Configuration.php 2019-02-01 08:43:27.079804951 +0100
+@@ -899,7 +899,7 @@ final class Configuration
private function validateConfigurationAgainstSchema(): void
{
$original = \libxml_use_internal_errors(true);
@@ -56,11 +56,11 @@ diff -up ./src/Util/Configuration.php.rpm ./src/Util/Configuration.php
if (\defined('__PHPUNIT_PHAR_ROOT__')) {
$xsdFilename = __PHPUNIT_PHAR_ROOT__ . '/phpunit.xsd';
diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php
---- ./tests/bootstrap.php.rpm 2019-01-15 11:49:08.859885786 +0100
-+++ ./tests/bootstrap.php 2019-01-15 11:50:12.567276300 +0100
+--- ./tests/bootstrap.php.rpm 2019-02-01 08:43:27.080804957 +0100
++++ ./tests/bootstrap.php 2019-02-01 08:44:59.691284599 +0100
@@ -14,4 +14,9 @@ if (!\defined('TEST_FILES_PATH')) {
- \ini_set('precision', 14);
- \ini_set('serialize_precision', 14);
+ \ini_set('precision', '14');
+ \ini_set('serialize_precision', '14');
-require_once __DIR__ . '/../vendor/autoload.php';
+require_once '@PATH@/autoload.php';
diff --git a/phpunit8.spec b/phpunit8.spec
index f7aaa07..b06e10a 100644
--- a/phpunit8.spec
+++ b/phpunit8.spec
@@ -1,4 +1,4 @@
-# remirepo/fedora spec file for phpunit7
+# remirepo/fedora spec file for phpunit8
#
# Copyright (c) 2010-2019 Remi Collet
#
@@ -11,7 +11,7 @@
# For compatibility with SCL
%undefine __brp_mangle_shebangs
-%global gh_commit 2cb759721e53bc05f56487f628c6b9fbb6c18746
+%global gh_commit 130104cf796a88dd1547dc5beb8bd555c2deb55e
#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 PHPUnit7
+%global ns_vendor PHPUnit8
%global php_home %{_datadir}/php
-%global ver_major 7
-%global ver_minor 5
-%global ver_patch 3
+%global ver_major 8
+%global ver_minor 0
+%global ver_patch 0
%global specrel 1
Name: %{pk_project}%{ver_major}
@@ -40,7 +40,7 @@ Source0: https://github.com/%{gh_vendor}/%{gh_project}/archive/%{gh_commi
Patch0: %{name}-rpm.patch
BuildArch: noarch
-BuildRequires: php(language) >= 7.1
+BuildRequires: php(language) >= 7.2
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
BuildRequires: (php-composer(doctrine/instantiator) >= 1.1 with php-composer(doctrine/instantiator) < 2)
@@ -48,15 +48,15 @@ BuildRequires: (php-composer(myclabs/deep-copy) >= 1.7 with php-co
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) < 3)
BuildRequires: (php-composer(phpspec/prophecy) >= 1.7 with php-composer(phpspec/prophecy) < 2)
-BuildRequires: (php-composer(phpunit/php-code-coverage) >= 6.0.7 with php-composer(phpunit/php-code-coverage) < 7)
+BuildRequires: (php-composer(phpunit/php-code-coverage) >= 7.0 with php-composer(phpunit/php-code-coverage) < 8)
BuildRequires: (php-composer(phpunit/php-file-iterator) >= 2.0.1 with php-composer(phpunit/php-file-iterator) < 3)
BuildRequires: (php-composer(phpunit/php-text-template) >= 1.2.1 with php-composer(phpunit/php-text-template) < 2)
BuildRequires: (php-composer(phpunit/php-timer) >= 2.0 with php-composer(phpunit/php-timer) < 3)
BuildRequires: (php-composer(sebastian/comparator) >= 3.0 with php-composer(sebastian/comparator) < 4)
BuildRequires: (php-composer(sebastian/diff) >= 3.0 with php-composer(sebastian/diff) < 4)
-BuildRequires: (php-composer(sebastian/environment) >= 4.0 with php-composer(sebastian/environment) < 5)
+BuildRequires: (php-composer(sebastian/environment) >= 4.1 with php-composer(sebastian/environment) < 5)
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/global-state) >= 3.0 with php-composer(sebastian/global-state) < 4)
BuildRequires: (php-composer(sebastian/object-enumerator) >= 3.0.3 with php-composer(sebastian/object-enumerator) < 4)
BuildRequires: (php-composer(sebastian/resource-operations) >= 2.0 with php-composer(sebastian/resource-operations) < 3)
BuildRequires: (php-composer(sebastian/version) >= 2.0.1 with php-composer(sebastian/version) < 3)
@@ -68,15 +68,15 @@ BuildRequires: php-myclabs-deep-copy >= 1.7
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 >= 6.0.6
+BuildRequires: php-phpunit-php-code-coverage7
BuildRequires: php-phpunit-php-file-iterator2 >= 2.0.1
BuildRequires: php-phpunit-Text-Template >= 1.2.1
BuildRequires: php-phpunit-php-timer2
BuildRequires: php-sebastian-comparator3
BuildRequires: php-sebastian-diff3
-BuildRequires: php-sebastian-environment4
+BuildRequires: php-sebastian-environment4 >= 4.1
BuildRequires: php-sebastian-exporter3 >= 3.1
-BuildRequires: php-sebastian-global-state2
+BuildRequires: php-sebastian-global-state3
BuildRequires: php-sebastian-object-enumerator3 >= 3.0.3
BuildRequires: php-sebastian-resource-operations2
BuildRequires: php-phpunit-Version >= 2.0.1
@@ -87,41 +87,44 @@ BuildRequires: php-json
BuildRequires: php-mbstring
BuildRequires: php-xml
BuildRequires: php-libxml
+BuildRequires: php-xmlwriter
# Autoloader
BuildRequires: php-fedora-autoloader-devel >= 1.0.0
# From composer.json, "require": {
-# "php": "^7.1",
+# "php": "^7.2",
# "ext-dom": "*",
# "ext-json": "*",
# "ext-libxml": "*",
# "ext-mbstring": "*",
# "ext-xml": "*",
+# "ext-xmlwriter": "*",
# "doctrine/instantiator": "^1.1",
# "myclabs/deep-copy": "^1.7",
# ignore version range, test suite passes with manifest and version 1.0.1
# "phar-io/manifest": "^1.0.1",
# "phar-io/version": "^1.0",
# "phpspec/prophecy": "^1.7",
-# "phpunit/php-code-coverage": "^6.0.7",
+# "phpunit/php-code-coverage": "^7.0",
# "phpunit/php-file-iterator": "^2.0.1",
# "phpunit/php-text-template": "^1.2.1",
# "phpunit/php-timer": "^2.0",
# "sebastian/comparator": "^3.0",
# "sebastian/diff": "^3.0",
-# "sebastian/environment": "^4.0",
+# "sebastian/environment": "^4.1",
# "sebastian/exporter": "^3.1",
-# "sebastian/global-state": "^2.0",
+# "sebastian/global-state": "^3.0",
# "sebastian/object-enumerator": "^3.0.3",
# "sebastian/resource-operations": "^2.0",
# "sebastian/version": "^2.0.1",
-Requires: php(language) >= 7.1
+Requires: php(language) >= 7.2
Requires: php-cli
Requires: php-dom
Requires: php-json
Requires: php-libxml
Requires: php-mbstring
Requires: php-xml
+Requires: php-xmlwriter
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
Requires: (php-composer(doctrine/instantiator) >= 1.1 with php-composer(doctrine/instantiator) < 2)
@@ -129,22 +132,26 @@ Requires: (php-composer(myclabs/deep-copy) >= 1.7 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) < 3)
Requires: (php-composer(phpspec/prophecy) >= 1.7 with php-composer(phpspec/prophecy) < 2)
-Requires: (php-composer(phpunit/php-code-coverage) >= 6.0.7 with php-composer(phpunit/php-code-coverage) < 7)
+Requires: (php-composer(phpunit/php-code-coverage) >= 7.0 with php-composer(phpunit/php-code-coverage) < 8)
Requires: (php-composer(phpunit/php-file-iterator) >= 2.0.1 with php-composer(phpunit/php-file-iterator) < 3)
Requires: (php-composer(phpunit/php-text-template) >= 1.2.1 with php-composer(phpunit/php-text-template) < 2)
Requires: (php-composer(phpunit/php-timer) >= 2.0 with php-composer(phpunit/php-timer) < 3)
Requires: (php-composer(sebastian/comparator) >= 3.0 with php-composer(sebastian/comparator) < 4)
Requires: (php-composer(sebastian/diff) >= 3.0 with php-composer(sebastian/diff) < 4)
-Requires: (php-composer(sebastian/environment) >= 4.0 with php-composer(sebastian/environment) < 5)
+Requires: (php-composer(sebastian/environment) >= 4.1 with php-composer(sebastian/environment) < 5)
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)
+Requires: (php-composer(sebastian/global-state) >= 3.0 with php-composer(sebastian/global-state) < 4)
Requires: (php-composer(sebastian/object-enumerator) >= 3.0.3 with php-composer(sebastian/object-enumerator) < 4)
Requires: (php-composer(sebastian/resource-operations) >= 2.0 with php-composer(sebastian/resource-operations) < 3)
Requires: (php-composer(sebastian/version) >= 2.0.1 with php-composer(sebastian/version) < 3)
# From composer.json, "suggest": {
# "phpunit/php-invoker": "^2.0",
+# "ext-soap": "*",
# "ext-xdebug": "*"
Requires: (php-composer(phpunit/php-invoker) >= 2.0 with php-composer(phpunit/php-invoker) < 3)
+Suggests: php-soap
+Suggests: php-xdebug
+Suggests: php-pcov
# remirepo:20
%else
Requires: php-doctrine-instantiator11
@@ -152,15 +159,15 @@ Requires: php-myclabs-deep-copy >= 1.7
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 >= 6.0.6
+Requires: php-phpunit-php-code-coverage7
Requires: php-phpunit-php-file-iterator2 >= 2.0.1
Requires: php-phpunit-Text-Template >= 1.2.1
Requires: php-phpunit-php-timer2
Requires: php-sebastian-comparator3
Requires: php-sebastian-diff3
-Requires: php-sebastian-environment4
+Requires: php-sebastian-environment4 >= 4.1
Requires: php-sebastian-exporter3 >= 3.1
-Requires: php-sebastian-global-state2
+Requires: php-sebastian-global-state3
Requires: php-sebastian-object-enumerator3 >= 3.0.3
Requires: php-sebastian-resource-operations2
Requires: php-phpunit-Version >= 2.0.1
@@ -168,15 +175,13 @@ Requires: php-phpunit-php-invoker2
%endif
# Autoloader
Requires: php-composer(fedora/autoloader)
-# From phpcompatinfo report for version 5.6.0
+# From phpcompatinfo report for version 8.0.0
Requires: php-reflection
Requires: php-openssl
Requires: php-pcntl
Requires: php-pcre
Requires: php-phar
Requires: php-spl
-# projects have been merged
-Obsoletes: php-phpunit-mock-objects6 < 6.1.3
%description
@@ -200,14 +205,14 @@ cat << 'EOF' | tee -a src/autoload.php
\Fedora\Autoloader\Dependencies::required([
'%{php_home}/SebastianBergmann/FileIterator2/autoload.php',
'%{php_home}/Text/Template/Autoload.php',
- '%{php_home}/SebastianBergmann/CodeCoverage6/autoload.php',
+ '%{php_home}/SebastianBergmann/CodeCoverage7/autoload.php',
'%{php_home}/SebastianBergmann/Timer/autoload.php',
'%{php_home}/Prophecy/autoload.php',
'%{php_home}/SebastianBergmann/Diff3/autoload.php', // Before comparator which may load v2
'%{php_home}/SebastianBergmann/Comparator3/autoload.php',
'%{php_home}/SebastianBergmann/Environment4/autoload.php',
'%{php_home}/SebastianBergmann/Exporter3/autoload.php',
- '%{php_home}/SebastianBergmann/GlobalState2/autoload.php',
+ '%{php_home}/SebastianBergmann/GlobalState3/autoload.php',
'%{php_home}/SebastianBergmann/ObjectEnumerator3/autoload.php',
'%{php_home}/SebastianBergmann/ResourceOperations2/autoload.php',
'%{php_home}/SebastianBergmann/Version/autoload.php',
@@ -220,11 +225,6 @@ cat << 'EOF' | tee -a src/autoload.php
'%{php_home}/PharIo/Manifest/autoload.php',
'%{php_home}/PharIo/Version/autoload.php',
]);
-// Extensions
-\Fedora\Autoloader\Dependencies::optional([
- '%{php_home}/%{ns_vendor}/DbUnit/autoload.php',
- '%{php_home}/%{ns_vendor}/Extensions/SeleniumCommon/Autoload.php',
-]);
EOF
cat src/autoload.php
@@ -249,7 +249,7 @@ 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 php71 php72 php73; do
+for cmd in php php72 php73; do
if which $cmd; then
$cmd ./phpunit $OPT --verbose || ret=1
fi
@@ -267,6 +267,16 @@ exit $ret
%changelog
+* Fri Feb 1 2019 Remi Collet <remi@remirepo.net> - 8.0.0-1
+- rename to phpunit8
+- update to 8.0.0
+- add dependency on xmlwriter extension
+- add weak dependency on soap, xdebug and pcov extensions
+- raise dependency on PHP 7.2
+- raise dependency on phpunit/php-code-coverage 7.0
+- raise dependency on sebastian/environment 4.1
+- raise dependency on sebastian/global-state 3.0
+
* Fri Feb 1 2019 Remi Collet <remi@remirepo.net> - 7.5.3-1
- update to 7.5.3