From 8519b6cd5fefc38822c5896f24b408c213d5d00b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 15 Mar 2017 19:52:36 +0100 Subject: phpunit6: 6.0.9 --- composer.json | 8 ++--- phpunit6-rpm.patch | 18 +++++----- phpunit6.spec | 102 +++++++++++++++++++++++++++++++++-------------------- 3 files changed, 78 insertions(+), 50 deletions(-) diff --git a/composer.json b/composer.json index c623596..5b7ff8d 100644 --- a/composer.json +++ b/composer.json @@ -27,18 +27,18 @@ "ext-mbstring": "*", "ext-xml": "*", "myclabs/deep-copy": "^1.3", - "phpspec/prophecy": "^1.6.2", + "phpspec/prophecy": "^1.7", "phpunit/php-code-coverage": "^5.0", "phpunit/php-file-iterator": "^1.4", "phpunit/php-text-template": "^1.2", "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "^4.0", - "sebastian/comparator": "^1.2.4 || ^2.0", + "sebastian/comparator": "^2.0", "sebastian/diff": "^1.2", "sebastian/environment": "^2.0", - "sebastian/exporter": "^2.0 || ^3.0", + "sebastian/exporter": "^3.0", "sebastian/global-state": "^1.1 || ^2.0", - "sebastian/object-enumerator": "^2.0 || ^3.0", + "sebastian/object-enumerator": "^3.0.2", "sebastian/resource-operations": "^1.0", "sebastian/version": "^2.0" }, diff --git a/phpunit6-rpm.patch b/phpunit6-rpm.patch index 09234ad..c03c25d 100644 --- a/phpunit6-rpm.patch +++ b/phpunit6-rpm.patch @@ -48,16 +48,18 @@ diff -up ./phpunit.rpm ./phpunit + PHPUnit\TextUI\Command::main(); // PHPUnit v6 or newer +} ---- ./tests/bootstrap.php.rpm 2017-02-07 16:15:02.226336155 +0100 -+++ ./tests/bootstrap.php 2017-02-07 16:15:06.656354953 +0100 -@@ -1,6 +1,9 @@ - = 7.0 -BuildRequires: php-composer(phpunit/php-file-iterator) >= 1.4 -BuildRequires: php-composer(phpunit/php-text-template) >= 1.2 +BuildRequires: php-composer(myclabs/deep-copy) < 2 +BuildRequires: php-composer(myclabs/deep-copy) >= 1.3 +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.0 +BuildRequires: php-composer(phpunit/php-file-iterator) < 2 +BuildRequires: php-composer(phpunit/php-file-iterator) >= 1.4 +BuildRequires: php-composer(phpunit/php-text-template) < 2 +BuildRequires: php-composer(phpunit/php-text-template) >= 1.2 +BuildRequires: php-composer(phpunit/php-timer) < 2 BuildRequires: php-composer(phpunit/php-timer) >= 1.0.6 BuildRequires: php-composer(phpunit/phpunit-mock-objects) < 5 BuildRequires: php-composer(phpunit/phpunit-mock-objects) >= 4 -BuildRequires: php-composer(phpspec/prophecy) >= 1.6.2 -BuildRequires: php-composer(sebastian/comparator) >= 1.2.4 +BuildRequires: php-composer(sebastian/comparator) < 3 +BuildRequires: php-composer(sebastian/comparator) >= 2.0 +BuildRequires: php-composer(sebastian/diff) < 2 BuildRequires: php-composer(sebastian/diff) >= 1.2 -BuildRequires: php-composer(sebastian/environment) >= 1.3.4 -BuildRequires: php-composer(sebastian/exporter) >= 2.0 -BuildRequires: php-composer(sebastian/recursion-context) >= 2.0 +BuildRequires: php-composer(sebastian/environment) < 3 +BuildRequires: php-composer(sebastian/environment) >= 2.0 +BuildRequires: php-composer(sebastian/exporter) < 4 +BuildRequires: php-composer(sebastian/exporter) >= 3.0 +BuildRequires: php-composer(sebastian/global-state) < 3 BuildRequires: php-composer(sebastian/global-state) >= 1.1 -BuildRequires: php-composer(sebastian/object-enumerator) >= 2.0 +BuildRequires: php-composer(sebastian/object-enumerator) < 4 +BuildRequires: php-composer(sebastian/object-enumerator) >= 3.0.2 +BuildRequires: php-composer(sebastian/resource-operations) < 2 BuildRequires: php-composer(sebastian/resource-operations) >= 1.0 -BuildRequires: php-composer(sebastian/version) >= 1.0 -BuildRequires: php-composer(myclabs/deep-copy) >= 1.3 +BuildRequires: php-composer(sebastian/version) < 3 +BuildRequires: php-composer(sebastian/version) >= 2.0 BuildRequires: php-dom BuildRequires: php-json BuildRequires: php-mbstring @@ -73,18 +85,18 @@ BuildRequires: php-fedora-autoloader-devel # "ext-mbstring": "*", # "ext-xml": "*", # "myclabs/deep-copy": "^1.3", -# "phpspec/prophecy": "^1.6.2", +# "phpspec/prophecy": "^1.7", # "phpunit/php-code-coverage": "^5.0", # "phpunit/php-file-iterator": "^1.4", # "phpunit/php-text-template": "^1.2", # "phpunit/php-timer": "^1.0.6", # "phpunit/phpunit-mock-objects": "^4.0", -# "sebastian/comparator": "^1.2.4 || ^2.0", +# "sebastian/comparator": "^2.0", # "sebastian/diff": "^1.2", # "sebastian/environment": "^2.0", -# "sebastian/exporter": "^2.0 || ^3.0", +# "sebastian/exporter": "^3.0", # "sebastian/global-state": "^1.1 || ^2.0", -# "sebastian/object-enumerator": "^2.0 || ^3.0", +# "sebastian/object-enumerator": "^3.0.2", # "sebastian/resource-operations": "^1.0", # "sebastian/version": "^2.0", Requires: php(language) >= 7.0 @@ -94,36 +106,36 @@ Requires: php-json Requires: php-libxml Requires: php-mbstring Requires: php-xml -Requires: php-composer(phpunit/php-file-iterator) >= 1.4 +Requires: php-composer(myclabs/deep-copy) < 2 +Requires: php-composer(myclabs/deep-copy) >= 1.3 +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.0 Requires: php-composer(phpunit/php-file-iterator) < 2 -Requires: php-composer(phpunit/php-text-template) >= 1.2 +Requires: php-composer(phpunit/php-file-iterator) >= 1.4 Requires: php-composer(phpunit/php-text-template) < 2 -Requires: php-composer(phpunit/php-code-coverage) >= 5.0 -Requires: php-composer(phpunit/php-code-coverage) < 6 -Requires: php-composer(phpunit/php-timer) >= 1.0.6 +Requires: php-composer(phpunit/php-text-template) >= 1.2 Requires: php-composer(phpunit/php-timer) < 2 -Requires: php-composer(phpunit/phpunit-mock-objects) >= 4.0 +Requires: php-composer(phpunit/php-timer) >= 1.0.6 Requires: php-composer(phpunit/phpunit-mock-objects) < 5 -Requires: php-composer(phpspec/prophecy) >= 1.6.2 -Requires: php-composer(phpspec/prophecy) < 2 -Requires: php-composer(sebastian/comparator) >= 1.2.4 +Requires: php-composer(phpunit/phpunit-mock-objects) >= 4.0 Requires: php-composer(sebastian/comparator) < 3 -Requires: php-composer(sebastian/diff) >= 1.2 +Requires: php-composer(sebastian/comparator) >= 2.0 Requires: php-composer(sebastian/diff) < 2 +Requires: php-composer(sebastian/diff) >= 1.2 Requires: php-composer(sebastian/environment) >= 2.0 Requires: php-composer(sebastian/environment) < 3 -Requires: php-composer(sebastian/exporter) >= 2.0 Requires: php-composer(sebastian/exporter) < 4 -Requires: php-composer(sebastian/global-state) >= 1.1 +Requires: php-composer(sebastian/exporter) >= 3.0 Requires: php-composer(sebastian/global-state) < 3 -Requires: php-composer(sebastian/object-enumerator) >= 2.0 +Requires: php-composer(sebastian/global-state) >= 1.1 Requires: php-composer(sebastian/object-enumerator) < 4 -Requires: php-composer(sebastian/resource-operations) >= 1.0 +Requires: php-composer(sebastian/object-enumerator) >= 3.0.2 Requires: php-composer(sebastian/resource-operations) < 2 -Requires: php-composer(sebastian/version) >= 2.0 +Requires: php-composer(sebastian/resource-operations) >= 1.0 Requires: php-composer(sebastian/version) < 3 -Requires: php-composer(myclabs/deep-copy) >= 1.3 -Requires: php-composer(myclabs/deep-copy) < 2 +Requires: php-composer(sebastian/version) >= 2.0 # From composer.json, "suggest": { # "phpunit/php-invoker": "^1.1", # "ext-xdebug": "*" @@ -167,6 +179,11 @@ It is an instance of the xUnit architecture for unit testing frameworks. --template fedora \ --output src/autoload.php \ src + +# Rely on include_path as in PHPUnit dependencies +# TODO use template2 with fedora/autoloader 1.0.0 +sed -e 's:/usr/share/php/::' -i src/autoload.php + cat << 'EOF' | tee -a src/autoload.php /* dependencies */ require_once 'File/Iterator/Autoload.php'; @@ -175,12 +192,12 @@ require_once 'SebastianBergmann/CodeCoverage5/autoload.php'; require_once 'PHP/Timer/Autoload.php'; require_once '%{ns_vendor}/Framework/MockObject/autoload.php'; require_once 'Prophecy/autoload.php'; -require_once (stream_resolve_include_path('SebastianBergmann/Comparator2/autoload.php') ?: 'SebastianBergmann/Comparator/autoload.php'); +require_once 'SebastianBergmann/Comparator2/autoload.php'; require_once 'SebastianBergmann/Diff/autoload.php'; require_once 'SebastianBergmann/Environment/autoload.php'; -require_once (stream_resolve_include_path('SebastianBergmann/Exporter3/autoload.php') ?: 'SebastianBergmann/Exporter/autoload.php'); +require_once 'SebastianBergmann/Exporter3/autoload.php'; require_once (stream_resolve_include_path('SebastianBergmann/GlobalState2/autoload.php') ?: 'SebastianBergmann/GlobalState/autoload.php'); -require_once (stream_resolve_include_path('SebastianBergmann/ObjectEnumerator3/autoload.php') ?: 'SebastianBergmann/ObjectEnumerator/autoload.php'); +require_once 'SebastianBergmann/ObjectEnumerator3/autoload.php'; require_once 'SebastianBergmann/ResourceOperations/autoload.php'; require_once 'SebastianBergmann/Version/autoload.php'; require_once 'DeepCopy/autoload.php'; @@ -191,7 +208,7 @@ require_once 'PHP/Invoker/Autoload.php'; '%{php_home}/%{ns_vendor}/DbUnit/autoload.php', ]); EOF - +cat src/autoload.php %{_bindir}/phpab \ --output tests/autoload.php \ @@ -236,6 +253,15 @@ exit $ret %changelog +* Wed Mar 15 2017 Remi Collet - 6.0.9-1 +- Update to 6.0.9 +- raise dependency on phpspec/prophecy 1.7 +- raise dependency on sebastian/comparator 2.0 +- raise dependency on sebastian/exporter 3.0 +- raise dependency on sebastian/object-enumerator 3.0.2 +- more explicit dependencies +- fix autoloader to only rely on include_path + * Fri Mar 3 2017 Remi Collet - 6.0.8-2 - fix autoloader for dep. with multiple versions -- cgit