From e27a6ecf3341b5fcb897959a4bac9515aec7f106 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 19 Nov 2017 08:32:41 +0100 Subject: Update to 3.0.2 Allow Symfony 4 ensure current version is used by test suite --- composer.json | 2 +- php-phpunit-dbunit3.spec | 34 +++++++++++++++++++++++++++------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index daabc8f..2588fb9 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "require": { "php": "^7.0", "phpunit/phpunit": "^6.0", - "symfony/yaml": "^3.0", + "symfony/yaml": "^3.0 || ^4.0", "ext-pdo": "*", "ext-simplexml": "*" }, diff --git a/php-phpunit-dbunit3.spec b/php-phpunit-dbunit3.spec index 34a1bf7..3bd18db 100644 --- a/php-phpunit-dbunit3.spec +++ b/php-phpunit-dbunit3.spec @@ -6,7 +6,7 @@ # # Please, preserve the changelog entries # -%global gh_commit 6b9cec80dca8694243aade33bceb425ccafbbd0d +%global gh_commit 403350339b6aca748ee0067d027d85621992e21f %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project dbunit @@ -20,7 +20,7 @@ %global with_tests 0%{!?_without_tests:1} %global ver_major 3 %global ver_minor 0 -%global ver_patch 1 +%global ver_patch 2 %global specrel 1 Name: php-%{pk_vendor}-%{pk_project}%{ver_major} @@ -31,7 +31,7 @@ Summary: PHPUnit extension for database interaction testing 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}-%{gh_short}.tar.gz +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz BuildArch: noarch BuildRequires: php-fedora-autoloader-devel @@ -40,22 +40,30 @@ BuildRequires: php(language) >= 7.0 BuildRequires: php-pdo BuildRequires: php-simplexml BuildRequires: phpunit6 +%if 0%{?fedora} >= 26 +BuildRequires: php-composer(symfony/yaml) < 5 +%else BuildRequires: php-composer(symfony/yaml) < 4 +%endif BuildRequires: php-composer(symfony/yaml) >= 2.8 %endif # From composer.json # "php": "^7.0", # "phpunit/phpunit": "^6.0", -# "symfony/yaml": "^3.0", +# "symfony/yaml": "^3.0 || ^4.0", # "ext-pdo": "*", # "ext-simplexml": "*" Requires: php(language) >= 7.0 Requires: php-pdo Requires: php-simplexml Requires: phpunit6 -# ignore min version +%if 0%{?fedora} >= 26 +Requires: php-composer(symfony/yaml) < 5 +%else Requires: php-composer(symfony/yaml) < 4 +%endif +# ignore min version Requires: php-composer(symfony/yaml) >= 2.8 # From phpcompatinfo report for version 3.0.0 Requires: php-reflection @@ -109,10 +117,17 @@ cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project} %check : Generate tests autoloader mkdir vendor -ln -s %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php vendor/autoload.php +touch vendor/autoload.php : Run tests -%{_bindir}/phpunit6 --verbose +ret=0 +for cmd in php php70 php71 php72; do + if which $cmd; then + $cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php \ + %{_bindir}/phpunit6 --verbose || ret=1 + fi +done +exit $ret %endif @@ -125,6 +140,11 @@ ln -s %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php vendor/aut %changelog +* Sun Nov 19 2017 Remi Collet - 3.0.2-1 +- Update to 3.0.2 +- Allow Symfony 4 +- ensure current version is used by test suite + * Thu Oct 19 2017 Remi Collet - 3.0.1-1 - Update to 3.0.1 -- cgit