diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | php-ringcentral-psr7-php8.patch | 22 | ||||
-rw-r--r-- | php-ringcentral-psr7.spec | 10 |
3 files changed, 30 insertions, 4 deletions
@@ -1,4 +1,4 @@ SRCDIR := $(shell pwd) NAME := $(shell basename $(SRCDIR)) -include ../../common/Makefile +include ../../../common/Makefile diff --git a/php-ringcentral-psr7-php8.patch b/php-ringcentral-psr7-php8.patch new file mode 100644 index 0000000..5c59740 --- /dev/null +++ b/php-ringcentral-psr7-php8.patch @@ -0,0 +1,22 @@ +From 71d80f11a91fcbe446f87351b67a9f42103d2dd6 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@famillecollet.com> +Date: Wed, 24 Mar 2021 08:28:45 +0100 +Subject: [PATCH] Fix sprintf format + +--- + src/LimitStream.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/LimitStream.php b/src/LimitStream.php +index 57eeca9..9df22b3 100644 +--- a/src/LimitStream.php ++++ b/src/LimitStream.php +@@ -71,7 +71,7 @@ public function seek($offset, $whence = SEEK_SET) + { + if ($whence !== SEEK_SET || $offset < 0) { + throw new \RuntimeException(sprintf( +- 'Cannot seek to offset % with whence %s', ++ 'Cannot seek to offset %d with whence %s', + $offset, + $whence + )); diff --git a/php-ringcentral-psr7.spec b/php-ringcentral-psr7.spec index 9b328d8..c504ffc 100644 --- a/php-ringcentral-psr7.spec +++ b/php-ringcentral-psr7.spec @@ -39,6 +39,9 @@ License: MIT URL: https://github.com/%{github_owner}/%{github_name} Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz +# For PHP 8 +Patch0: %{name}-php8.patch + BuildArch: noarch # Tests %if %{with_tests} @@ -92,7 +95,7 @@ Autoloader: %{phpdir}/RingCentral/Psr7/autoload.php %prep %setup -qn %{github_name}-%{github_commit} - +%patch0 -p1 %build : Create autoloader @@ -127,8 +130,7 @@ ln -s %{buildroot}%{phpdir}/RingCentral/Psr7/autoload.php vendor/autoload.php : Upstream tests RETURN_CODE=0 PHPUNIT=$(which phpunit) -# TODO php 8.0: "Method ReflectionParameter::isArray() is deprecated" -for PHP_EXEC in php %{?rhel:php54 php55 php56 php70 php71} php72 php73 php74; do +for PHP_EXEC in php %{?rhel:php54 php55 php56 php70 php71} php72 php73 php74 php80; do if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then $PHP_EXEC $PHPUNIT --verbose || RETURN_CODE=1 fi @@ -151,6 +153,8 @@ exit $RETURN_CODE %changelog * Thu Nov 5 2020 Remi Collet <remi@remirepo.net> - 1.3.0-1 - update to 1.3.0 +- add patch for PHP 8 from + https://github.com/ringcentral/psr7/pull/8 * Sat Apr 21 2018 Shawn Iwinski <shawn@iwin.ski> - 1.2.2-1 - Update to 1.2.2 |