summaryrefslogtreecommitdiffstats
path: root/php-ramsey-uuid.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-11-06 09:08:25 +0100
committerRemi Collet <remi@remirepo.net>2020-11-06 09:08:25 +0100
commit8c7da2fd4ea1c17e6d5578adb5777da9e720db21 (patch)
tree4e92542b55e8399fc96c42772fd74534be29729f /php-ramsey-uuid.spec
parentb2c1e22019477e88ad09e9bf01ee729882505335 (diff)
add patch for PHP 8 from merged PR
https://github.com/ramsey/uuid/pull/352 switch to phpunit9 https://github.com/ramsey/uuid/pull/350 ignore 1 test with erratic result from review #1884542
Diffstat (limited to 'php-ramsey-uuid.spec')
-rw-r--r--php-ramsey-uuid.spec33
1 files changed, 26 insertions, 7 deletions
diff --git a/php-ramsey-uuid.spec b/php-ramsey-uuid.spec
index c34c107..f9317b9 100644
--- a/php-ramsey-uuid.spec
+++ b/php-ramsey-uuid.spec
@@ -23,7 +23,7 @@
Name: php-%{pk_vendor}-%{pk_name}
Version: 4.1.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Library for generating and working with UUIDs
License: MIT
@@ -34,6 +34,7 @@ Source1: makesrc.sh
# don't use codeception/aspect-mock
Patch0: %{name}-tests.patch
+Patch1: https://patch-diff.githubusercontent.com/raw/ramsey/uuid/pull/352.patch
BuildArch: noarch
@@ -77,7 +78,14 @@ BuildRequires: php-brick-math >= 0.8
BuildRequires: php-ramsey-collection >= 1.0
BuildRequires: php-mockery >= 1.3
%endif
+%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9
+# https://github.com/ramsey/uuid/pull/350
+BuildRequires: phpunit9
+%global phpunit %{_bindir}/phpunit9
+%else
BuildRequires: phpunit8 >= 8.5
+%global phpunit %{_bindir}/phpunit8
+%endif
%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
@@ -122,6 +130,7 @@ Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p1 -b .rpm
+%patch1 -p1 -b .pr352
%build
@@ -161,14 +170,17 @@ EOF
: Ignore tests using missing mocking libraries
find tests -type f -exec grep -Eq '(PHPMockery|Aspec|Moontoast)' {} \; -delete -print
+: Ignore test with erratic result on Koji
+FILTER="--filter '^((?!(testSerializationOfNodeProviderCollection)).)*$'"
+
: Run upstream test suite
ret=0
-# TODO php 8: phpunit and mockery not compatible
-for cmd in php php73 php74; do
- if which $cmd; then
- $cmd %{_bindir}/phpunit8 \
- --no-coverage \
- --verbose || ret=1
+for cmdarg in "php %{?phpunit}" php73 php74 php80; do
+ if which $cmdarg; then
+ set $cmdarg
+ $1 ${2:-%{_bindir}/phpunit9} \
+ --no-coverage \
+ --verbose $FILTER || ret=1
fi
done
exit $ret
@@ -186,5 +198,12 @@ exit $ret
%changelog
+* Fri Nov 6 2020 Remi Collet <remi@remirepo.net> - 4.1.1-2
+- add patch for PHP 8 from merged PR
+ https://github.com/ramsey/uuid/pull/352
+- switch to phpunit9
+ https://github.com/ramsey/uuid/pull/350
+- ignore 1 test with erratic result from review #1884542
+
* Fri Oct 2 2020 Remi Collet <remi@remirepo.net> - 4.1.1-1
- initial package