summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--77.patch33
-rw-r--r--87855e941d39fc9ebcee3a84f0f73ce4103d236d.patch167
-rw-r--r--PHPINFO4
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-psr.spec14
6 files changed, 11 insertions, 211 deletions
diff --git a/.gitignore b/.gitignore
index 1ab5c4f..01f0400 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
+clog
package-*.xml
*.tgz
+*.tar.bz2
*.tar.gz
*.tar.xz
*.tar.xz.asc
diff --git a/77.patch b/77.patch
deleted file mode 100644
index 6426b71..0000000
--- a/77.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 497db8e1d8a6da4d1005bba07d76de994ae7a82d Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Mon, 24 Aug 2020 11:43:47 +0200
-Subject: [PATCH] fix for upcoming PHP 8
-
----
- psr_log.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/psr_log.c b/psr_log.c
-index 182da66..17b3246 100644
---- a/psr_log.c
-+++ b/psr_log.c
-@@ -101,7 +101,6 @@ static void php_psr_PsrLogAbstractLogger_log(const char * level_str, size_t leve
- zval * _this_zval = getThis();
- zval * message;
- zval * context = NULL;
-- zend_class_entry * expected_ce = NULL; // PsrLogAbstractLogger_ce_ptr
- zval fname = {0};
- zval fparams[3];
-
-@@ -252,7 +251,11 @@ PHP_METHOD(PsrLogLoggerAwareTrait, setLogger)
- Z_PARAM_OBJECT_OF_CLASS(logger, PsrLogLoggerInterface_ce_ptr)
- ZEND_PARSE_PARAMETERS_END();
-
-+#if PHP_VERSION_ID < 80000
- zend_update_property(Z_OBJCE_P(_this_zval), _this_zval, "logger", sizeof("logger")-1, logger);
-+#else
-+ zend_update_property(Z_OBJCE_P(_this_zval), Z_OBJ_P(_this_zval), "logger", sizeof("logger")-1, logger);
-+#endif
- }
-
- static zend_function_entry PsrLogLoggerAwareTrait_methods[] = {
diff --git a/87855e941d39fc9ebcee3a84f0f73ce4103d236d.patch b/87855e941d39fc9ebcee3a84f0f73ce4103d236d.patch
deleted file mode 100644
index e4aeeb5..0000000
--- a/87855e941d39fc9ebcee3a84f0f73ce4103d236d.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-From 87855e941d39fc9ebcee3a84f0f73ce4103d236d Mon Sep 17 00:00:00 2001
-From: John Boehr <john@johnboehr.is>
-Date: Sat, 27 Jun 2020 21:23:13 -0700
-Subject: [PATCH] Patch tests to pass on latest PHP master (8.0.0alpha1)
-
----
- tests/PsrHttpClientClientExceptionInterface.phpt | 7 ++-----
- tests/PsrHttpClientNetworkExceptionInterface.phpt | 11 ++++-------
- tests/PsrHttpClientRequestExceptionInterface.phpt | 11 ++++-------
- tests/PsrHttpMessageStreamInterface.phpt | 10 ++++------
- tests/PsrHttpMessageUriInterface.phpt | 10 ++++------
- tests/SampleStream.inc | 1 +
- 6 files changed, 19 insertions(+), 31 deletions(-)
-
-diff --git a/tests/PsrHttpClientClientExceptionInterface.phpt b/tests/PsrHttpClientClientExceptionInterface.phpt
-index 52a06be..4a01f16 100644
---- a/tests/PsrHttpClientClientExceptionInterface.phpt
-+++ b/tests/PsrHttpClientClientExceptionInterface.phpt
-@@ -5,7 +5,7 @@ Psr\Http\Client\ClientExceptionInterface
- --FILE--
- <?php
- use Psr\Http\Client\ClientExceptionInterface;
--var_dump(class_implements('Psr\Http\Client\ClientExceptionInterface', false));
-+var_dump(is_subclass_of(ClientExceptionInterface::class, Throwable::class));
- class MyException extends Exception implements ClientExceptionInterface {}
- $ex = new MyException('test');
- var_dump($ex instanceof ClientExceptionInterface);
-@@ -17,10 +17,7 @@ try {
- var_dump($e->getMessage());
- }
- --EXPECT--
--array(1) {
-- ["Throwable"]=>
-- string(9) "Throwable"
--}
-+bool(true)
- bool(true)
- bool(true)
- bool(true)
-diff --git a/tests/PsrHttpClientNetworkExceptionInterface.phpt b/tests/PsrHttpClientNetworkExceptionInterface.phpt
-index 4ad60b7..eb2aafa 100644
---- a/tests/PsrHttpClientNetworkExceptionInterface.phpt
-+++ b/tests/PsrHttpClientNetworkExceptionInterface.phpt
-@@ -8,7 +8,8 @@ use Psr\Http\Message\RequestInterface;
- use Psr\Http\Client\NetworkExceptionInterface;
- include __DIR__ . '/SampleMessage.inc';
- include __DIR__ . '/SampleRequest.inc';
--var_dump(class_implements('Psr\Http\Client\NetworkExceptionInterface', false));
-+var_dump(is_subclass_of(NetworkExceptionInterface::class, Psr\Http\Client\ClientExceptionInterface::class));
-+var_dump(is_subclass_of(NetworkExceptionInterface::class, Throwable::class));
- class MyException extends Exception implements NetworkExceptionInterface {
- public function getRequest(): RequestInterface {
- var_dump(__METHOD__);
-@@ -27,12 +28,8 @@ try {
- var_dump($e->getRequest());
- }
- --EXPECTF--
--array(2) {
-- ["Psr\Http\Client\ClientExceptionInterface"]=>
-- string(40) "Psr\Http\Client\ClientExceptionInterface"
-- ["Throwable"]=>
-- string(9) "Throwable"
--}
-+bool(true)
-+bool(true)
- bool(true)
- bool(true)
- bool(true)
-diff --git a/tests/PsrHttpClientRequestExceptionInterface.phpt b/tests/PsrHttpClientRequestExceptionInterface.phpt
-index 248d882..e927ccf 100644
---- a/tests/PsrHttpClientRequestExceptionInterface.phpt
-+++ b/tests/PsrHttpClientRequestExceptionInterface.phpt
-@@ -8,7 +8,8 @@ use Psr\Http\Message\RequestInterface;
- use Psr\Http\Client\RequestExceptionInterface;
- include __DIR__ . '/SampleMessage.inc';
- include __DIR__ . '/SampleRequest.inc';
--var_dump(class_implements('Psr\Http\Client\RequestExceptionInterface', false));
-+var_dump(is_subclass_of(RequestExceptionInterface::class, Psr\Http\Client\ClientExceptionInterface::class));
-+var_dump(is_subclass_of(RequestExceptionInterface::class, Throwable::class));
- class MyException extends Exception implements RequestExceptionInterface {
- public function getRequest(): RequestInterface {
- var_dump(__METHOD__);
-@@ -27,12 +28,8 @@ try {
- var_dump($e->getRequest());
- }
- --EXPECTF--
--array(2) {
-- ["Psr\Http\Client\ClientExceptionInterface"]=>
-- string(40) "Psr\Http\Client\ClientExceptionInterface"
-- ["Throwable"]=>
-- string(9) "Throwable"
--}
-+bool(true)
-+bool(true)
- bool(true)
- bool(true)
- bool(true)
-diff --git a/tests/PsrHttpMessageStreamInterface.phpt b/tests/PsrHttpMessageStreamInterface.phpt
-index 3232bfc..62d6b79 100644
---- a/tests/PsrHttpMessageStreamInterface.phpt
-+++ b/tests/PsrHttpMessageStreamInterface.phpt
-@@ -4,9 +4,10 @@ Psr\Http\Message\StreamInterface
- <?php include('skip.inc'); ?>
- --FILE--
- <?php
-+use Psr\Http\Message\StreamInterface;
- include __DIR__ . '/SampleStream.inc';
--var_dump(interface_exists('\\Psr\\Http\\Message\\StreamInterface', false));
--var_dump(class_implements('SampleStream', false));
-+var_dump(interface_exists(StreamInterface::class, false));
-+var_dump(is_subclass_of(SampleStream::class, StreamInterface::class));
- $stream = new SampleStream();
- $stream->__toString();
- $stream->close();
-@@ -25,10 +26,7 @@ $stream->getContents();
- $stream->getMetadata();
- --EXPECTF--
- bool(true)
--array(1) {
-- ["Psr\Http\Message\StreamInterface"]=>
-- string(32) "Psr\Http\Message\StreamInterface"
--}
-+bool(true)
- string(24) "SampleStream::__toString"
- string(19) "SampleStream::close"
- string(20) "SampleStream::detach"
-diff --git a/tests/PsrHttpMessageUriInterface.phpt b/tests/PsrHttpMessageUriInterface.phpt
-index 8ed65f8..278ed69 100644
---- a/tests/PsrHttpMessageUriInterface.phpt
-+++ b/tests/PsrHttpMessageUriInterface.phpt
-@@ -4,9 +4,10 @@ Psr\Http\Message\UriInterface
- <?php include('skip.inc'); ?>
- --FILE--
- <?php
-+use Psr\Http\Message\UriInterface;
- include __DIR__ . '/SampleUri.inc';
--var_dump(interface_exists('\\Psr\\Http\\Message\\UriInterface', false));
--var_dump(class_implements('SampleUri', false));
-+var_dump(interface_exists(UriInterface::class, false));
-+var_dump(is_subclass_of(SampleUri::class, UriInterface::class));
- $uri = new SampleUri();
- $uri->getScheme();
- $uri->getAuthority();
-@@ -26,10 +27,7 @@ $uri->withFragment('');
- $uri->__toString();
- --EXPECT--
- bool(true)
--array(1) {
-- ["Psr\Http\Message\UriInterface"]=>
-- string(29) "Psr\Http\Message\UriInterface"
--}
-+bool(true)
- string(20) "SampleUri::getScheme"
- string(23) "SampleUri::getAuthority"
- string(22) "SampleUri::getUserInfo"
-diff --git a/tests/SampleStream.inc b/tests/SampleStream.inc
-index 311236f..96a0bb0 100644
---- a/tests/SampleStream.inc
-+++ b/tests/SampleStream.inc
-@@ -7,6 +7,7 @@ class SampleStream implements StreamInterface
- public function __toString()
- {
- var_dump(__METHOD__);
-+ return __METHOD__;
- }
-
- public function close()
diff --git a/PHPINFO b/PHPINFO
index 195be45..cfa825c 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -1,8 +1,8 @@
psr
-Version => 1.0.0
-Released => 2020-02-18
+Version => 1.0.1
+Released => 2020-11-12
Authors => John Boehr <jbboehr@gmail.com> (lead)
PSR-3 Log Version => 1.0.0
PSR-6 Cache Version => 1.0.0
diff --git a/REFLECTION b/REFLECTION
index fccaf07..8aee883 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #89 psr version 1.0.0 ] {
+Extension [ <persistent> extension #94 psr version 1.0.1 ] {
- Dependencies {
Dependency [ spl (Required) ]
diff --git a/php-pecl-psr.spec b/php-pecl-psr.spec
index d9cb3b1..e552efe 100644
--- a/php-pecl-psr.spec
+++ b/php-pecl-psr.spec
@@ -19,20 +19,17 @@
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global with_tests 0%{!?_without_tests:1}
%global ini_name 40-%{pecl_name}.ini
-%global upstream_version 1.0.0
+%global upstream_version 1.0.1
#global upstream_prever RC4
Summary: PSR interfaces
Name: %{?sub_prefix}php-pecl-psr
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
License: BSD
URL: https://pecl.php.net/package/psr
-Patch0: https://github.com/jbboehr/php-psr/commit/87855e941d39fc9ebcee3a84f0f73ce4103d236d.patch
-Patch1: https://patch-diff.githubusercontent.com/raw/jbboehr/php-psr/pull/77.patch
-
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
@@ -106,9 +103,6 @@ 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 .up
-%patch1 -p1 -b .pr77
-
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_PSR_VERSION/{s/.* "//;s/".*$//;p}' php_psr.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
@@ -254,6 +248,10 @@ fi
%changelog
+* Fri Nov 13 2020 Remi Collet <remi@remirepo.net> - 1.0.1-1
+- update to 1.0.1
+- drop patch merged upstream
+
* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 1.0.0-5
- rebuild for PHP 8.0.0RC1