From 11c12cbf0330727dfad20d35318b3853f876277d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 30 Jun 2022 09:09:32 +0200 Subject: add upstream patch for 8.2 skip test suite with PHP >= 8.1 --- php-mikey179-vfsstream.spec | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'php-mikey179-vfsstream.spec') diff --git a/php-mikey179-vfsstream.spec b/php-mikey179-vfsstream.spec index 583d528..7574a8e 100644 --- a/php-mikey179-vfsstream.spec +++ b/php-mikey179-vfsstream.spec @@ -1,6 +1,6 @@ # spec file for php-mikey179-vfsstream # -# Copyright (c) 2014-2019 Remi Collet +# Copyright (c) 2014-2022 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -16,13 +16,16 @@ Name: php-%{pk_owner}-%{pk_project} Version: 1.6.10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: PHP stream wrapper for a virtual file system License: BSD 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 +# From https://github.com/bovigo/vfsStream/commits/v1.6 +Patch0: %{name}-upstream.patch + BuildArch: noarch BuildRequires: php(language) >= 5.3 BuildRequires: %{_bindir}/phpab @@ -61,6 +64,7 @@ To use this library, you just have to add, in your project: %prep %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 %build @@ -83,14 +87,16 @@ rm src/test/php/org/bovigo/vfs/vfsStreamWrapperLargeFileTestCase.php mkdir vendor ln -s %{buildroot}%{_datadir}/php/org/bovigo/vfs/autoload.php vendor/autoload.php -# issue with PHP 8 and phpunit 5: unregisterThirdPartyVfsScheme|unregisterWhenNotInRegisteredState -# TODO PHP 8.1 ret=0 -for cmd in php php73 php74 php80; do +for cmd in php php74 php80; do if which $cmd; then - $cmd %{_bindir}/phpunit \ + VER=$($cmd -r 'echo PHP_VERSION_ID;') + if [ $VER -ge 80100 ]; then + echo skip test with PHP $ver + else $cmd %{_bindir}/phpunit \ --filter '^((?!(unregisterThirdPartyVfsScheme|unregisterWhenNotInRegisteredState)).)*$' \ - --verbose || ret=1 + --verbose --no-coverage || ret=1 + fi fi done exit $ret @@ -109,6 +115,10 @@ exit $ret %changelog +* Thu Jun 30 2022 Remi Collet - 1.6.10-2 +- add upstream patch for 8.2 +- skip test suite with PHP >= 8.1 + * Mon Sep 27 2021 Remi Collet - 1.6.10-1 - update to 1.6.10 -- cgit