summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2025-10-10 07:29:28 +0200
committerRemi Collet <remi@php.net>2025-10-10 07:29:28 +0200
commit6f9691de247e20612cd7f99fa1910eb3d4b22ec1 (patch)
treed8f148d22795548e9ba9ae32c7d257b87539c7b6
parent3940441d94ff617bc11c8780e41d566eb7267a1e (diff)
update to 2.0.10HEADmaster
drop patch merged upstream
-rw-r--r--0001-restore-7.0-compatibility.patch28
-rw-r--r--35.patch98
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-oauth.spec15
5 files changed, 10 insertions, 135 deletions
diff --git a/0001-restore-7.0-compatibility.patch b/0001-restore-7.0-compatibility.patch
deleted file mode 100644
index 766e600..0000000
--- a/0001-restore-7.0-compatibility.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 70f260f6e395af7c6061e2b07ea91b85b28532f1 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@php.net>
-Date: Tue, 8 Oct 2024 10:31:48 +0200
-Subject: [PATCH] restore 7.0 compatibility
-
----
- provider.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/provider.c b/provider.c
-index f1f8e2a..5f988b5 100644
---- a/provider.c
-+++ b/provider.c
-@@ -960,7 +960,11 @@ SOP_METHOD(generateToken)
- php_error_docref(NULL, E_WARNING, "Could not gather enough random data, falling back on rand()");
- }
- while (reaped < size) {
-+#if PHP_VERSION_ID < 70100
-+ iv[reaped++] = (char) (255.0 * php_rand() / RAND_MAX);
-+#else
- iv[reaped++] = (char)php_mt_rand_range(0, 255);
-+#endif
- }
- }
-
---
-2.46.2
-
diff --git a/35.patch b/35.patch
deleted file mode 100644
index fe1116f..0000000
--- a/35.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From 633d0a55cd23d17c6a2e964d7671348b682af761 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Fri, 4 Jul 2025 14:45:20 +0200
-Subject: [PATCH 1/3] arg_separators.input is an zend_string in 8.5
-
----
- oauth.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/oauth.c b/oauth.c
-index 1493eb7..a7fd6cc 100644
---- a/oauth.c
-+++ b/oauth.c
-@@ -60,7 +60,11 @@ static int oauth_parse_str(char *params, zval *dest_array) /* {{{ */
- }
-
- res = params;
-+#if PHP_VERSION_ID < 80500
- separator = (char *) estrdup(PG(arg_separator).input);
-+#else
-+ separator = (char *) estrdup(ZSTR_VAL(PG(arg_separator).input));
-+#endif
- var = php_strtok_r(res, separator, &strtok_buf);
- while (var) {
- val = strchr(var, '=');
-
-From aab3ebf39558954b5e84f3fc7f3cc5fb19e963a2 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Thu, 17 Jul 2025 11:30:54 +0200
-Subject: [PATCH 2/3] use zend_ce_exception instead of
- zend_exception_get_default() for 8.5
-
----
- oauth.c | 4 ++--
- provider.c | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/oauth.c b/oauth.c
-index a7fd6cc..a424097 100644
---- a/oauth.c
-+++ b/oauth.c
-@@ -179,7 +179,7 @@ static void so_object_free_storage(zend_object *obj) /* {{{ */
- void soo_handle_error(php_so_object *soo, long errorCode, char *msg, char *response, char *additional_info) /* {{{ */
- {
- zval ex;
-- zend_class_entry *dex = zend_exception_get_default(), *soox = soo_exception_ce;
-+ zend_class_entry *dex = zend_ce_exception, *soox = soo_exception_ce;
-
- object_init_ex(&ex, soox);
-
-@@ -2790,7 +2790,7 @@ PHP_MINIT_FUNCTION(oauth)
-
- INIT_CLASS_ENTRY(soo_ex_ce, "OAuthException", NULL);
-
-- soo_exception_ce = zend_register_internal_class_ex(&soo_ex_ce, zend_exception_get_default());
-+ soo_exception_ce = zend_register_internal_class_ex(&soo_ex_ce, zend_ce_exception);
- #if PHP_VERSION_ID >= 80200
- soo_exception_ce->ce_flags |= ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES;
- zend_string *attribute_name_AllowDynamicProperties_class_OAuthException = zend_string_init_interned("AllowDynamicProperties", sizeof("AllowDynamicProperties") - 1, 1);
-diff --git a/provider.c b/provider.c
-index f1f8e2a..02025fc 100644
---- a/provider.c
-+++ b/provider.c
-@@ -981,7 +981,7 @@ SOP_METHOD(reportProblem)
- sapi_header_line ctr = {0};
- zend_bool send_headers = 1;
-
-- ex_ce = zend_exception_get_default();
-+ ex_ce = zend_ce_exception;
-
- if(zend_parse_parameters(ZEND_NUM_ARGS(), "O|b", &exception, ex_ce, &send_headers)==FAILURE) {
- return;
-
-From 7e79b4146d55891d1fa40dcc3c4893e4f72b3c1b Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Wed, 30 Jul 2025 13:14:45 +0200
-Subject: [PATCH 3/3] use Zend/zend_smart_string.h
-
----
- php_oauth.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/php_oauth.h b/php_oauth.h
-index 1b7c987..ccea410 100644
---- a/php_oauth.h
-+++ b/php_oauth.h
-@@ -35,7 +35,11 @@
- #else
- #include "ext/random/php_random.h"
- #endif
-+#if PHP_VERSION_ID < 70200
- #include "ext/standard/php_smart_string.h"
-+#else
-+#include "Zend/zend_smart_string.h"
-+#endif
- #include "ext/standard/info.h"
- #include "ext/standard/php_string.h"
- #if PHP_VERSION_ID > 80200
diff --git a/PHPINFO b/PHPINFO
index 9bd2472..86b24b1 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -6,4 +6,4 @@ PLAINTEXT support => enabled
RSA-SHA1 support => enabled
HMAC-SHA1 support => enabled
Request engine support => php_streams, curl
-version => 2.0.9
+version => 2.0.10
diff --git a/REFLECTION b/REFLECTION
index 466198f..40f8e85 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #88 OAuth version 2.0.9 ] {
+Extension [ <persistent> extension #103 OAuth version 2.0.10 ] {
- Constants [32] {
Constant [ string OAUTH_SIG_METHOD_HMACSHA1 ] { HMAC-SHA1 }
diff --git a/php-pecl-oauth.spec b/php-pecl-oauth.spec
index f493332..8c545aa 100644
--- a/php-pecl-oauth.spec
+++ b/php-pecl-oauth.spec
@@ -20,18 +20,15 @@
%global _configure ../%{sources}/configure
Name: %{?scl_prefix}php-pecl-oauth
-Version: 2.0.9
-Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Version: 2.0.10
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Summary: PHP OAuth consumer extension
License: BSD-3-Clause
URL: https://pecl.php.net/package/oauth
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-Patch0: 35.patch
-
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-# see https://github.com/php/pecl-web_services-oauth/pull/31
BuildRequires: %{?scl_prefix}php-devel >= 7.1
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-posix
@@ -40,8 +37,10 @@ BuildRequires: libcurl-devel
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
+# Extension
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
+# PECL
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
@@ -65,8 +64,6 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd %{sources}
-%patch -P0 -p1 -b .pr35
-
#sed -e '/PHP_OAUTH_VERSION/s/2.0.3-dev/2.0.3/' -i php_oauth.h
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_OAUTH_VERSION/{s/.* //;s/".*$//;p}' php_oauth.h)
@@ -169,6 +166,10 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Fri Oct 10 2025 Remi Collet <remi@remirepo.net> - 2.0.10-1
+- update to 2.0.10
+- drop patch merged upstream
+
* Wed Jul 30 2025 Remi Collet <remi@remirepo.net> - 2.0.9-5
- add patch for PHP 8.5.0alpha3 from
https://github.com/php/pecl-web_services-oauth/pull/35