From a638a000147eb1986af032b0b04bc43ce3a836dd Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 29 Jun 2017 07:04:24 +0200
Subject: v1.5.2

---
 composer.json             |  2 +-
 php-myclabs-php-enum.spec | 25 ++++++++++++++++---------
 2 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/composer.json b/composer.json
index 87a6119..e9769a3 100644
--- a/composer.json
+++ b/composer.json
@@ -25,7 +25,7 @@
         "php": ">=5.3"
     },
     "require-dev": {
-        "phpunit/phpunit": "4.*",
+        "phpunit/phpunit": "^4.8.35|^5.7|^6.0",
         "squizlabs/php_codesniffer": "1.*"
     }
 }
diff --git a/php-myclabs-php-enum.spec b/php-myclabs-php-enum.spec
index 8976866..0b22b05 100644
--- a/php-myclabs-php-enum.spec
+++ b/php-myclabs-php-enum.spec
@@ -6,7 +6,7 @@
 #
 # Please, preserve the changelog entries
 #
-%global gh_commit    61f4a24da5be216301447f3278ea6562609d61f5
+%global gh_commit    3ed7088cfd0a0e06534b7f8b0eee82acea574fac
 %global gh_short     %(c=%{gh_commit}; echo ${c:0:7})
 %global gh_owner     myclabs
 %global gh_project   php-enum
@@ -20,7 +20,7 @@
 %global with_tests   0%{!?_without_tests:1}
 
 Name:           php-%{pk_vendor}-%{pk_project}
-Version:        1.5.1
+Version:        1.5.2
 Release:        1%{?dist}
 Summary:        PHP Enum implementation
 
@@ -38,9 +38,14 @@ BuildRequires:  php(language) >= 5.3
 BuildRequires:  php-reflection
 BuildRequires:  php-spl
 # From composer.json, "require-dev": {
-#        "phpunit/phpunit": "4.*",
+#        "phpunit/phpunit": "^4.8.35|^5.7|^6.0",
 #        "squizlabs/php_codesniffer": "1.*"
-BuildRequires:  php-composer(phpunit/phpunit)
+%if 0%{?fedora} >= 26
+%global phpunit %{_bindir}/phpunit6
+%else
+%global phpunit %{_bindir}/phpunit
+%endif
+BuildRequires:  %{phpunit}
 # Required by autoloader
 BuildRequires:  php-composer(fedora/autoloader)
 %endif
@@ -66,9 +71,6 @@ Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}/autoload.php
 %prep
 %setup -q -n %{gh_project}-%{gh_commit}
 
-# https://github.com/myclabs/php-enum/pull/55
-chmod -x src/*php *md composer.json
-
 cat << 'EOF' | tee src/autoload.php
 <?php
 /* Autoloader for %{name} and its dependencies */
@@ -97,9 +99,10 @@ require '%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php';
 EOF
 
 ret=0
-for cmd in php php56 php70 php71 php72; do
+for cmd in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72; do
   if which $cmd; then
-    $cmd %{_bindir}/phpunit --verbose || ret=1
+    set $cmd
+    $1 ${2:-%{_bindir}/phpunit6} --verbose || ret=1
   fi
 done
 exit $ret
@@ -118,6 +121,10 @@ exit $ret
 
 
 %changelog
+* Thu Jun 29 2017 Remi Collet <remi@remirepo.net> - 1.5.2-1
+- Update to 1.5.2 (no change)
+- use phpunit6 on F26+
+
 * Tue Jun 27 2017 Remi Collet <remi@remirepo.net> - 1.5.1-1
 - initial package, version 1.5.1
 - open https://github.com/myclabs/php-enum/pull/55 - perms
-- 
cgit