summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-02-02 09:02:24 +0100
committerRemi Collet <remi@remirepo.net>2018-02-02 09:02:24 +0100
commit470645662c1c1d1c47237ca2ae567b0a6e8a2156 (patch)
treefe85a585c1907b36ae4c9d2a7495d5a2339763d6
parent6a4be794277d601553d71d01aa54d9f78eb769ef (diff)
Update to 2.1.3 (no change)
allow sebastian/diff v3 use range dependencies on F27+
-rw-r--r--composer.json2
-rw-r--r--php-sebastian-comparator2.spec43
2 files changed, 30 insertions, 15 deletions
diff --git a/composer.json b/composer.json
index f33bdce..17d5c60 100644
--- a/composer.json
+++ b/composer.json
@@ -25,7 +25,7 @@
"prefer-stable": true,
"require": {
"php": "^7.0",
- "sebastian/diff": "^2.0",
+ "sebastian/diff": "^2.0 || ^3.0",
"sebastian/exporter": "^3.1"
},
"require-dev": {
diff --git a/php-sebastian-comparator2.spec b/php-sebastian-comparator2.spec
index 7c5dfbf..ceb7d83 100644
--- a/php-sebastian-comparator2.spec
+++ b/php-sebastian-comparator2.spec
@@ -1,13 +1,13 @@
# remirepo/fedora spec file for php-sebastian-comparator2
#
-# Copyright (c) 2014-2017 Remi Collet
+# Copyright (c) 2014-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit 11c07feade1d65453e06df3b3b90171d6d982087
+%global gh_commit 34369daee48eafb2651bea869b4b15d75ccc35f9
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project comparator
@@ -24,7 +24,7 @@
%endif
Name: php-%{pk_vendor}-%{pk_project}%{major}
-Version: 2.1.2
+Version: 2.1.3
Release: 1%{?dist}
Summary: Compare PHP values for equality
@@ -35,10 +35,13 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
BuildArch: noarch
BuildRequires: php(language) >= 7.0
-BuildRequires: php-composer(%{pk_vendor}/diff) < 3
-BuildRequires: php-composer(%{pk_vendor}/diff) >= 2.0
-BuildRequires: php-composer(%{pk_vendor}/exporter) < 4
-BuildRequires: php-composer(%{pk_vendor}/exporter) >= 3.1
+%if 0%{?fedora} >= 27
+BuildRequires: (php-composer(%{pk_vendor}/diff) >= 2.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-exporter3 >= 3.1
+%endif
BuildRequires: php-fedora-autoloader-devel
%if %{with_tests}
# from composer.json, "require-dev": {
@@ -48,13 +51,16 @@ BuildRequires: phpunit6 >= 6.4
# from composer.json
# "php": "^7.0",
-# "sebastian/diff": "^2.0",
+# "sebastian/diff": "^2.0 || ^3.0",
# "sebastian/exporter": "^3.1"
Requires: php(language) >= 7.0
-Requires: php-composer(%{pk_vendor}/diff) >= 2.0
-Requires: php-composer(%{pk_vendor}/diff) < 3
-Requires: php-composer(%{pk_vendor}/exporter) >= 3.1
-Requires: php-composer(%{pk_vendor}/exporter) < 4
+%if 0%{?fedora} >= 27
+Requires: (php-composer(%{pk_vendor}/diff) >= 2.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-exporter3 >= 3.1
+%endif
# from phpcompatinfo report for version 2.1.0
Requires: php-date
Requires: php-dom
@@ -83,7 +89,11 @@ phpab --template fedora --output src/autoload.php src
cat <<EOF | tee -a src/autoload.php
// Dependencies' autoloaders
-require_once '%{ns_vendor}/Diff2/autoload.php';
+if (version_compare(PHP_VERSION, '7.1', '>') && 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';
EOF
@@ -103,7 +113,7 @@ 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}%{major}/autoload.php \
- %{_bindir}/phpunit6 --no-coverage --verbose || ret=1
+ %{_bindir}/phpunit6 --no-coverage --verbose || ret=1
fi
done
exit $ret
@@ -121,6 +131,11 @@ exit $ret
%changelog
+* Fri Feb 2 2018 Remi Collet <remi@remirepo.net> - 2.1.3-1
+- Update to 2.1.3 (no change)
+- allow sebastian/diff v3
+- use range dependencies on F27+
+
* Fri Jan 12 2018 Remi Collet <remi@remirepo.net> - 2.1.2-1
- Update to 2.1.2