summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-doctrine-collections-phpunit.patch28
-rw-r--r--php-doctrine-collections.spec32
2 files changed, 49 insertions, 11 deletions
diff --git a/php-doctrine-collections-phpunit.patch b/php-doctrine-collections-phpunit.patch
new file mode 100644
index 0000000..d41d18d
--- /dev/null
+++ b/php-doctrine-collections-phpunit.patch
@@ -0,0 +1,28 @@
+From upstream:
+
+
+From bc598aa22269c32e2ad4bcdad2158b280c92132d Mon Sep 17 00:00:00 2001
+From: "Jonathan H. Wage" <jonwage@gmail.com>
+Date: Tue, 30 Apr 2019 17:39:05 -0500
+Subject: [PATCH] Upgrade to PHPUnit 8.
+
+---
+ .gitignore | 7 +-
+ composer.json | 2 +-
+ composer.lock | 79 ++++++++++---------
+ .../Common/Collections/BaseCollectionTest.php | 2 +-
+ 4 files changed, 46 insertions(+), 44 deletions(-)
+
+diff --git a/tests/Doctrine/Tests/Common/Collections/BaseCollectionTest.php b/tests/Doctrine/Tests/Common/Collections/BaseCollectionTest.php
+index 6f21cf56..d563ade5 100644
+--- a/tests/Doctrine/Tests/Common/Collections/BaseCollectionTest.php
++++ b/tests/Doctrine/Tests/Common/Collections/BaseCollectionTest.php
+@@ -205,7 +205,7 @@ public function testSlice() : void
+ $this->collection[] = 'three';
+
+ $slice = $this->collection->slice(0, 1);
+- self::assertInternalType('array', $slice);
++ self::assertIsArray($slice);
+ self::assertEquals(['one'], $slice);
+
+ $slice = $this->collection->slice(1);
diff --git a/php-doctrine-collections.spec b/php-doctrine-collections.spec
index ea93747..c3ddf18 100644
--- a/php-doctrine-collections.spec
+++ b/php-doctrine-collections.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-doctrine-collections
#
-# Copyright (c) 2013-2019 Shawn Iwinski <shawn.iwinski@gmail.com>
+# Copyright (c) 2013-2020 Shawn Iwinski <shawn.iwinski@gmail.com>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,8 +12,8 @@
%global github_owner doctrine
%global github_name collections
-%global github_version 1.6.6
-%global github_commit 5f0470363ff042d0057006ae7acabc5d7b5252d5
+%global github_version 1.6.7
+%global github_commit 55f8b799269a1a472457bd1a41b4f379d4cfba4a
%global composer_vendor doctrine
%global composer_project collections
@@ -39,11 +39,19 @@ URL: https://github.com/%{github_owner}/%{github_name}
Source0: %{name}-%{github_version}-%{github_commit}.tar.gz
Source1: %{name}-get-source.sh
+# Upstream patch for PHPUnit >= 8
+Patch0: %{name}-phpunit.patch
+
BuildArch: noarch
# Tests
%if %{with tests}
## composer.json
-BuildRequires: phpunit7
+%if 0%{?fedora} >= 32
+%global phpunit %{_bindir}/phpunit9
+%else
+%global phpunit %{_bindir}/phpunit8
+%endif
+BuildRequires: %{phpunit}
BuildRequires: php(language) >= %{php_min_ver}
## phpcompatinfo (computed from version 1.6.0)
BuildRequires: php-pcre
@@ -74,6 +82,7 @@ Autoloader: %{phpdir}/Doctrine/Common/Collections/autoload.php
%prep
%setup -qn %{github_name}-%{github_commit}
+%patch0 -p1
%build
@@ -106,9 +115,10 @@ BOOTSTRAP
: Upstream tests
SCL_RETURN_CODE=0
-for SCL in php php71 php72 php73 php74 php80; do
- if which $SCL; then
- $SCL %{_bindir}/phpunit7 --verbose --bootstrap bootstrap.php \
+for CMD in "php %{phpunit}" "php71 %{_bindir}/phpunit7" php72 php73 php74 "php80 %{_bindir}/phpunit9"; do
+ if which $CMD; then
+ set $CMD
+ $1 ${2:-%{_bindir}/phpunit8} --verbose --bootstrap bootstrap.php \
|| SCL_RETURN_CODE=1
fi
done
@@ -118,10 +128,6 @@ exit $SCL_RETURN_CODE
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
# remirepo:1
%{!?_licensedir:%global license %%doc}
@@ -134,6 +140,10 @@ rm -rf %{buildroot}
%changelog
+* Tue Aug 11 2020 Remi Collet <remi@remirepo.net> - 1.6.7-1
+- update to 1.6.7
+- add upstream patch for recent PHPUnit
+
* Mon Jul 20 2020 Remi Collet <remi@remirepo.net> - 1.6.6-1
- update to 1.6.6