From ab5387f4d7748bf87948598d42e2df02070742d8 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 18 Apr 2018 17:45:39 +0200 Subject: update to 3.0.0 rename to php-sebastian-comparator3 raise dependency on PHP 7.1 raise dependency on sebastian/diff 3.0 use phpunit7 --- composer.json | 8 +++--- php-sebastian-comparator3.spec | 56 ++++++++++++++++++++++-------------------- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/composer.json b/composer.json index 17d5c60..e0658bc 100644 --- a/composer.json +++ b/composer.json @@ -24,12 +24,12 @@ ], "prefer-stable": true, "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", + "php": "^7.1", + "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^7.1" }, "config": { "optimize-autoloader": true, @@ -47,7 +47,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.0-dev" } } } diff --git a/php-sebastian-comparator3.spec b/php-sebastian-comparator3.spec index ceb7d83..6b4b783 100644 --- a/php-sebastian-comparator3.spec +++ b/php-sebastian-comparator3.spec @@ -1,4 +1,4 @@ -# remirepo/fedora spec file for php-sebastian-comparator2 +# remirepo/fedora spec file for php-sebastian-comparator3 # # Copyright (c) 2014-2018 Remi Collet # License: CC-BY-SA @@ -7,13 +7,13 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 34369daee48eafb2651bea869b4b15d75ccc35f9 +%global gh_commit ed5fd2281113729f1ebcc64d101ad66028aeb3d5 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project comparator %global pk_vendor sebastian %global pk_project %{gh_project} -%global major 2 +%global major 3 %global php_home %{_datadir}/php %global ns_vendor SebastianBergmann %global ns_project Comparator @@ -24,7 +24,7 @@ %endif Name: php-%{pk_vendor}-%{pk_project}%{major} -Version: 2.1.3 +Version: 3.0.0 Release: 1%{?dist} Summary: Compare PHP values for equality @@ -34,34 +34,34 @@ URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz BuildArch: noarch -BuildRequires: php(language) >= 7.0 -%if 0%{?fedora} >= 27 -BuildRequires: (php-composer(%{pk_vendor}/diff) >= 2.0 with php-composer(%{pk_vendor}/diff) < 4) +BuildRequires: php(language) >= 7.1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(%{pk_vendor}/diff) >= 3.0 with php-composer(%{pk_vendor}/diff) < 4) BuildRequires: (php-composer(%{pk_vendor}/exporter) >= 3.1 with php-composer(%{pk_vendor}/exporter) < 4) %else -BuildRequires: php-sebastian-diff2 +BuildRequires: php-sebastian-diff3 BuildRequires: php-sebastian-exporter3 >= 3.1 %endif BuildRequires: php-fedora-autoloader-devel %if %{with_tests} # from composer.json, "require-dev": { -# "phpunit/phpunit": "^6.4" -BuildRequires: phpunit6 >= 6.4 +# "phpunit/phpunit": "^7.1" +BuildRequires: phpunit7 >= 7.1 %endif # from composer.json -# "php": "^7.0", -# "sebastian/diff": "^2.0 || ^3.0", +# "php": "^7.1", +# "sebastian/diff": "^3.0", # "sebastian/exporter": "^3.1" -Requires: php(language) >= 7.0 -%if 0%{?fedora} >= 27 -Requires: (php-composer(%{pk_vendor}/diff) >= 2.0 with php-composer(%{pk_vendor}/diff) < 4) +Requires: php(language) >= 7.1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(%{pk_vendor}/diff) >= 3.0 with php-composer(%{pk_vendor}/diff) < 4) Requires: (php-composer(%{pk_vendor}/exporter) >= 3.1 with php-composer(%{pk_vendor}/exporter) < 4) %else -Requires: php-sebastian-diff2 +Requires: php-sebastian-diff3 Requires: php-sebastian-exporter3 >= 3.1 %endif -# from phpcompatinfo report for version 2.1.0 +# from phpcompatinfo report for version 3.0.0 Requires: php-date Requires: php-dom Requires: php-spl @@ -88,13 +88,10 @@ phpab --template fedora --output src/autoload.php src # Rely on include_path as in PHPUnit dependencies cat <') && stream_resolve_include_path('%{ns_vendor}/Diff3/autoload.php')) { - require_once '%{ns_vendor}/Diff3/autoload.php'; -} else { - require_once '%{ns_vendor}/Diff2/autoload.php'; -} -require_once '%{ns_vendor}/Exporter3/autoload.php'; +\Fedora\Autoloader\Dependencies::required([ + '%{php_home}/%{ns_vendor}/Diff3/autoload.php', + '%{php_home}/%{ns_vendor}/Exporter3/autoload.php', +]); EOF @@ -110,10 +107,10 @@ mkdir vendor : Run upstream test suite ret=0 -for cmd in php php70 php71 php72; do +for cmd in php php71 php72; do if which $cmd; then $cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \ - %{_bindir}/phpunit6 --no-coverage --verbose || ret=1 + %{_bindir}/phpunit7 --no-coverage --verbose || ret=1 fi done exit $ret @@ -131,6 +128,13 @@ exit $ret %changelog +* Wed Apr 18 2018 Remi Collet - 3.0.0-1 +- update to 3.0.0 +- rename to php-sebastian-comparator3 +- raise dependency on PHP 7.1 +- raise dependency on sebastian/diff 3.0 +- use phpunit7 + * Fri Feb 2 2018 Remi Collet - 2.1.3-1 - Update to 2.1.3 (no change) - allow sebastian/diff v3 -- cgit