summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-11-12 10:12:31 +0100
committerRemi Collet <remi@remirepo.net>2018-11-12 10:12:31 +0100
commitf1feae7322bee4e523159ac8dc3dcb38a14c1616 (patch)
tree4c9140926e694146f458d7ab69f9ce056b76eb26
parent713c9248929ccec5e28076a1b7801a30c81799d4 (diff)
add patch for failed tests
-rw-r--r--55.patch64
-rw-r--r--php-pecl-psr.spec3
2 files changed, 67 insertions, 0 deletions
diff --git a/55.patch b/55.patch
new file mode 100644
index 0000000..4e8f03c
--- /dev/null
+++ b/55.patch
@@ -0,0 +1,64 @@
+From 0bb83c7e86e37667a643d581c2260e6a94b7585d Mon Sep 17 00:00:00 2001
+From: FlyingHail <flyinghail@msn.com>
+Date: Mon, 12 Nov 2018 17:00:19 +0800
+Subject: [PATCH] Fix: skip PSR-18 tests when PHP < 7
+
+---
+ tests/PsrHttpClientClientExceptionInterface.phpt | 2 +-
+ tests/PsrHttpClientClientInterface.phpt | 2 +-
+ tests/PsrHttpClientNetworkExceptionInterface.phpt | 2 +-
+ tests/PsrHttpClientRequestExceptionInterface.phpt | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tests/PsrHttpClientClientExceptionInterface.phpt b/tests/PsrHttpClientClientExceptionInterface.phpt
+index a02da4e..b270240 100644
+--- a/tests/PsrHttpClientClientExceptionInterface.phpt
++++ b/tests/PsrHttpClientClientExceptionInterface.phpt
+@@ -1,7 +1,7 @@
+ --TEST--
+ Psr\Http\Client\ClientExceptionInterface
+ --SKIPIF--
+-<?php if( !extension_loaded('psr') ) die('skip '); ?>
++<?php if( !extension_loaded('psr') || PHP_MAJOR_VERSION < 7 ) die('skip '); ?>
+ --FILE--
+ <?php
+ use Psr\Http\Client\ClientExceptionInterface;
+diff --git a/tests/PsrHttpClientClientInterface.phpt b/tests/PsrHttpClientClientInterface.phpt
+index 6aebb2a..ae12835 100644
+--- a/tests/PsrHttpClientClientInterface.phpt
++++ b/tests/PsrHttpClientClientInterface.phpt
+@@ -1,7 +1,7 @@
+ --TEST--
+ Psr\Http\Client\ClientInterface
+ --SKIPIF--
+-<?php if( !extension_loaded('psr') ) die('skip '); ?>
++<?php if( !extension_loaded('psr') || PHP_MAJOR_VERSION < 7 ) die('skip '); ?>
+ --FILE--
+ <?php
+ include __DIR__ . '/SampleMessage.inc';
+diff --git a/tests/PsrHttpClientNetworkExceptionInterface.phpt b/tests/PsrHttpClientNetworkExceptionInterface.phpt
+index 8ef9619..83803d2 100644
+--- a/tests/PsrHttpClientNetworkExceptionInterface.phpt
++++ b/tests/PsrHttpClientNetworkExceptionInterface.phpt
+@@ -1,7 +1,7 @@
+ --TEST--
+ Psr\Http\Client\NetworkExceptionInterface
+ --SKIPIF--
+-<?php if( !extension_loaded('psr') ) die('skip '); ?>
++<?php if( !extension_loaded('psr') || PHP_MAJOR_VERSION < 7 ) die('skip '); ?>
+ --FILE--
+ <?php
+ use Psr\Http\Message\RequestInterface;
+diff --git a/tests/PsrHttpClientRequestExceptionInterface.phpt b/tests/PsrHttpClientRequestExceptionInterface.phpt
+index a522466..f643b89 100644
+--- a/tests/PsrHttpClientRequestExceptionInterface.phpt
++++ b/tests/PsrHttpClientRequestExceptionInterface.phpt
+@@ -1,7 +1,7 @@
+ --TEST--
+ Psr\Http\Client\RequestExceptionInterface
+ --SKIPIF--
+-<?php if( !extension_loaded('psr') ) die('skip '); ?>
++<?php if( !extension_loaded('psr') || PHP_MAJOR_VERSION < 7 ) die('skip '); ?>
+ --FILE--
+ <?php
+ use Psr\Http\Message\RequestInterface;
diff --git a/php-pecl-psr.spec b/php-pecl-psr.spec
index adda1a0..a264282 100644
--- a/php-pecl-psr.spec
+++ b/php-pecl-psr.spec
@@ -30,6 +30,8 @@ Source0: http://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstre
License: BSD
URL: http://pecl.php.net/package/psr
+Patch0: https://patch-diff.githubusercontent.com/raw/jbboehr/php-psr/pull/55.patch
+
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 5.6
BuildRequires: %{?scl_prefix}php-pear
@@ -106,6 +108,7 @@ mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
cd NTS
+%patch0 -p1 -b .pr55
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_PSR_VERSION/{s/.* "//;s/".*$//;p}' php_psr.h)