From 8eb62a02ecd8acb747f015d4cb0a10b42fabb82c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 5 Oct 2015 14:40:26 +0200 Subject: php-phpunit-phpcov: 2.0.2 --- autoload.php.in | 8 ++------ php-phpunit-phpcov.spec | 22 +++++++++++----------- phpcov-rpm.patch | 19 +++++++++++++------ 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/autoload.php.in b/autoload.php.in index f4358a0..2b7fe1d 100644 --- a/autoload.php.in +++ b/autoload.php.in @@ -2,14 +2,11 @@ /* Inspired from autoload from version 1.2.0 */ require 'PHPUnit/Autoload.php'; -require 'Symfony/Component/Console/autoloader.php'; -require 'SebastianBergmann/FinderFacade/autoload.php'; -/* -already required in PHPUnit require 'PHP/CodeCoverage/Autoload.php'; require 'SebastianBergmann/Diff/autoload.php'; +require 'SebastianBergmann/FinderFacade/autoload.php'; require 'SebastianBergmann/Version/autoload.php'; -*/ +require 'Symfony/Component/Console/autoloader.php'; spl_autoload_register( function($class) { @@ -25,4 +22,3 @@ spl_autoload_register( } } ); - diff --git a/php-phpunit-phpcov.spec b/php-phpunit-phpcov.spec index ede78d4..f83c32e 100644 --- a/php-phpunit-phpcov.spec +++ b/php-phpunit-phpcov.spec @@ -6,7 +6,7 @@ # # Please, preserve the changelog entries # -%global gh_commit 85d3c38f0b455aa7097512b8f3256f796e9b4db6 +%global gh_commit 9ef291483ff65eefd8639584d61bbfb044d747f3 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project phpcov @@ -18,14 +18,14 @@ Name: php-phpunit-phpcov -Version: 2.0.1 +Version: 2.0.2 Release: 1%{?dist} Summary: TextUI front-end for PHP_CodeCoverage Group: Development/Libraries License: BSD URL: https://github.com/%{gh_owner}/%{gh_project} -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}.tar.gz +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz # Autoload template Source1: autoload.php.in @@ -39,9 +39,7 @@ BuildRequires: php(language) >= 5.3.3 BuildRequires: %{_bindir}/phpab %if %{with_tests} BuildRequires: php-composer(phpunit/phpunit) >= 4.1 -BuildRequires: php-composer(phpunit/phpunit) < 5 BuildRequires: php-composer(phpunit/php-code-coverage) >= 2.0 -BuildRequires: php-composer(phpunit/php-code-coverage) < 3 BuildRequires: php-composer(sebastian/diff) >= 1.1 BuildRequires: php-composer(sebastian/diff) < 2 BuildRequires: php-composer(sebastian/finder-facade) >= 1.1 @@ -53,23 +51,21 @@ BuildRequires: php-symfony-console >= 2.2 # from composer.json # "php": ">=5.3.3", -# "phpunit/phpunit": "~4.1", +# "phpunit/phpunit": ">=4.1", # "phpunit/php-code-coverage": "~2.0", # "sebastian/diff": "~1.1", # "sebastian/finder-facade": "~1.1", -# "sebastian/version": "~1.0.3", +# "sebastian/version": "~1.0", # "symfony/console": "~2.2" Requires: php(language) >= 5.3.3 Requires: php-composer(phpunit/phpunit) >= 4.1 -Requires: php-composer(phpunit/phpunit) < 5 Requires: php-composer(phpunit/php-code-coverage) >= 2.0 -Requires: php-composer(phpunit/php-code-coverage) < 3 Requires: php-composer(sebastian/diff) >= 1.1 Requires: php-composer(sebastian/diff) < 2 Requires: php-composer(sebastian/finder-facade) >= 1.1 Requires: php-composer(sebastian/finder-facade) < 2 -Requires: php-composer(sebastian/version) >= 1.0.3 -Requires: php-composer(sebastian/version) < 1.1 +Requires: php-composer(sebastian/version) >= 1.0 +Requires: php-composer(sebastian/version) < 2 Requires: php-symfony-console >= 2.2 # from phpcompatinfo report for version 1.1.0 Requires: php-reflection @@ -135,6 +131,10 @@ fi %changelog +* Mon Oct 5 2015 Remi Collet - 2.0.2-1 +- update to 2.0.2 +- allow PHPUnit 5 + * Wed Jun 25 2014 Remi Collet - 2.0.1-1 - update to 2.0.1 - composer dependencies diff --git a/phpcov-rpm.patch b/phpcov-rpm.patch index 062caeb..a181e10 100644 --- a/phpcov-rpm.patch +++ b/phpcov-rpm.patch @@ -1,7 +1,7 @@ ---- phpcov.rpm 2014-04-30 15:53:58.000000000 +0200 -+++ phpcov 2014-04-30 15:55:08.000000000 +0200 -@@ -42,23 +42,7 @@ - * @since File available since Release 1.0.0 +--- phpcov.rpm 2015-10-05 14:23:45.648930666 +0200 ++++ phpcov 2015-10-05 14:23:51.362957863 +0200 +@@ -9,23 +9,16 @@ + * file that was distributed with this source code. */ -$loaded = false; @@ -12,8 +12,15 @@ - $loaded = true; - break; - } --} -- ++// Ensure correct include_path for RHSCL ++$inc = get_include_path(); ++$dirs = explode(':', $inc); ++if (!in_array('/usr/share/php', $dirs)) { ++ $dirs[] = '/usr/share/php'; ++ set_include_path(implode(':', $dirs)); + } ++unset ($inc, $dirs); + -if (!$loaded) { - die( - 'You need to set up the project dependencies using the following commands:' . PHP_EOL . -- cgit