From 42c6789a4badb9dd94780d7fad3d39e72a905505 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 6 Nov 2017 08:39:16 +0100 Subject: Update to 5.2.3 raise dependency on phpunit/php-token-stream 2.0 --- composer.json | 2 +- php-phpunit-php-code-coverage5.spec | 27 ++++++++++++++++----------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index 5eec7a3..7cc4f8c 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "ext-dom": "*", "ext-xmlwriter": "*", "phpunit/php-file-iterator": "^1.4.2", - "phpunit/php-token-stream": "^1.4.11 || ^2.0", + "phpunit/php-token-stream": "^2.0", "phpunit/php-text-template": "^1.2.1", "sebastian/code-unit-reverse-lookup": "^1.0.1", "sebastian/environment": "^3.0", diff --git a/php-phpunit-php-code-coverage5.spec b/php-phpunit-php-code-coverage5.spec index fec4509..affb586 100644 --- a/php-phpunit-php-code-coverage5.spec +++ b/php-phpunit-php-code-coverage5.spec @@ -9,7 +9,7 @@ %global bootstrap 0 # Github -%global gh_commit 8ed1902a57849e117b5651fc1a5c48110946c06b +%global gh_commit 8e1d2397d8adf59a3f12b2878a3aaa66d1ab189d #global gh_date 20150924 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_vendor sebastianbergmann @@ -23,8 +23,8 @@ %global php_home %{_datadir}/php %global ver_major 5 %global ver_minor 2 -%global ver_patch 2 -%global specrel 3 +%global ver_patch 3 +%global specrel 1 %if %{bootstrap} %global with_tests 0%{?_with_tests:1} %else @@ -48,8 +48,6 @@ Source0: https://github.com/%{gh_vendor}/%{gh_project}/archive/%{gh_commi # RPM specific changes: use system .ttf file Patch0: %{name}-fonts.patch -Patch1: https://patch-diff.githubusercontent.com/raw/sebastianbergmann/php-code-coverage/pull/554.patch - BuildArch: noarch BuildRequires: php-fedora-autoloader-devel >= 1.0.0 %if %{with_tests} @@ -57,7 +55,7 @@ BuildRequires: php(language) >= 7.0 BuildRequires: php-composer(phpunit/php-file-iterator) < 2 BuildRequires: php-composer(phpunit/php-file-iterator) >= 1.4.2 BuildRequires: php-composer(phpunit/php-token-stream) < 3 -BuildRequires: php-composer(phpunit/php-token-stream) >= 1.4.11 +BuildRequires: php-composer(phpunit/php-token-stream) >= 2.0 BuildRequires: php-composer(phpunit/php-text-template) < 2 BuildRequires: php-composer(phpunit/php-text-template) >= 1.2.1 BuildRequires: php-composer(sebastian/code-unit-reverse-lookup) < 2 @@ -80,7 +78,7 @@ BuildRequires: php-pecl-xdebug >= 2.5.5 # "ext-dom": "*", # "ext-xmlwriter": "*", # "phpunit/php-file-iterator": "^1.4.2", -# "phpunit/php-token-stream": "^1.4.11 || ^2.0", +# "phpunit/php-token-stream": "^2.0", # "phpunit/php-text-template": "^1.2.1", # "sebastian/code-unit-reverse-lookup": "^1.0.1", # "sebastian/environment": "^3.0", @@ -92,7 +90,7 @@ Requires: php-xmlwriter Requires: php-composer(phpunit/php-file-iterator) < 2 Requires: php-composer(phpunit/php-file-iterator) >= 1.4.2 Requires: php-composer(phpunit/php-token-stream) < 3 -Requires: php-composer(phpunit/php-token-stream) >= 1.4.11 +Requires: php-composer(phpunit/php-token-stream) >= 2.0 Requires: php-composer(phpunit/php-text-template) < 2 Requires: php-composer(phpunit/php-text-template) >= 1.2.1 Requires: php-composer(sebastian/code-unit-reverse-lookup) < 2 @@ -142,7 +140,6 @@ Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}%{ver_major}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} -%patch1 -p1 %if %{with_glyphicons} %patch0 -p0 -b .rpm @@ -157,10 +154,14 @@ rm src/Report/Html/Renderer/Template/fonts/glyphicons-halflings-regular.ttf --output src/autoload.php \ src +# Temporarily keep fallback on old phpunit/php-token-stream cat << 'EOF' | tee -a src/autoload.php \Fedora\Autoloader\Dependencies::required([ 'File/Iterator/Autoload.php', - 'PHP/Token/Stream/Autoload.php', + [ + 'SebastianBergmann/PhpTokenStream2/autoload.php', + 'PHP/Token/Stream/Autoload.php', + ], 'Text/Template/Autoload.php', '%{ns_vendor}/CodeUnitReverseLookup/autoload.php', '%{ns_vendor}/Environment3/autoload.php', @@ -196,7 +197,7 @@ for cmd in php php70 php71 php72; do -d include_path=.:%{buildroot}%{php_home}:%{php_home} \ %{_bindir}/phpunit6 \ --filter '^((?!(testForClassWithAnonymousFunction|testTextForClassWithAnonymousFunction|testGetLinesToBeIgnored3|testCloverForClassWithAnonymousFunction)).)*$' \ - --no-coverage --verbose || ret=1 + --verbose || ret=1 fi done exit $ret @@ -213,6 +214,10 @@ exit $ret %changelog +* Mon Nov 6 2017 Remi Collet - 5.2.3-1 +- Update to 5.2.3 +- raise dependency on phpunit/php-token-stream 2.0 + * Fri Nov 3 2017 Remi Collet - 5.2.2-3 - fix FTBFS from Koschei, add patch for PHP 7.2 from https://github.com/sebastianbergmann/php-code-coverage/pull/554 -- cgit