summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore9
-rw-r--r--Makefile4
-rw-r--r--php-ringcentral-psr7-php8.patch22
-rw-r--r--php-ringcentral-psr7.spec19
4 files changed, 49 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6f69818
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.bz2
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..13af741
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+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 a0374da..5b8e2d0 100644
--- a/php-ringcentral-psr7.spec
+++ b/php-ringcentral-psr7.spec
@@ -1,7 +1,8 @@
+# remirepo spec file for php-ringcentral-psr7, from:
#
# Fedora spec file for php-ringcentral-psr7
#
-# Copyright (c) 2018 Shawn Iwinski <shawn@iwin.ski>
+# Copyright (c) 2018-2021 Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -11,8 +12,8 @@
%global github_owner ringcentral
%global github_name psr7
-%global github_version 1.2.2
-%global github_commit dcd84bbb49b96c616d1dcc8bfb9bef3f2cd53d1c
+%global github_version 1.3.0
+%global github_commit 360faaec4b563958b673fb52bbe94e37f14bc686
%global composer_vendor ringcentral
%global composer_project psr7
@@ -38,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}
@@ -91,7 +95,7 @@ Autoloader: %{phpdir}/RingCentral/Psr7/autoload.php
%prep
%setup -qn %{github_name}-%{github_commit}
-
+%patch0 -p1
%build
: Create autoloader
@@ -126,7 +130,7 @@ ln -s %{buildroot}%{phpdir}/RingCentral/Psr7/autoload.php vendor/autoload.php
: Upstream tests
RETURN_CODE=0
PHPUNIT=$(which phpunit)
-for PHP_EXEC in php %{?rhel:php54 php55} php56 php70 php71 php72; 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
@@ -147,6 +151,11 @@ 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
- Add range version dependencies for Fedora >= 27 || RHEL >= 8