summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--931dc56c7a53c388c21d679ae10dfe0b245aed32.patch47
-rw-r--r--PHPINFO18
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-yaf.spec8
4 files changed, 73 insertions, 2 deletions
diff --git a/931dc56c7a53c388c21d679ae10dfe0b245aed32.patch b/931dc56c7a53c388c21d679ae10dfe0b245aed32.patch
new file mode 100644
index 0000000..a0e125a
--- /dev/null
+++ b/931dc56c7a53c388c21d679ae10dfe0b245aed32.patch
@@ -0,0 +1,47 @@
+From 931dc56c7a53c388c21d679ae10dfe0b245aed32 Mon Sep 17 00:00:00 2001
+From: Xinchen Hui <laruence@gmail.com>
+Date: Fri, 22 Jun 2018 18:21:44 +0800
+Subject: [PATCH] Fixed build with PHP-7.3
+
+---
+ requests/yaf_request_http.c | 5 +++++
+ yaf_session.c | 7 ++++++-
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/requests/yaf_request_http.c b/requests/yaf_request_http.c
+index 23b215e..8658611 100644
+--- a/requests/yaf_request_http.c
++++ b/requests/yaf_request_http.c
+@@ -96,9 +96,14 @@ yaf_request_t *yaf_request_http_instance(yaf_request_t *this_ptr, zend_string *r
+ * only use url path */
+ if (strncasecmp(Z_STRVAL_P(uri), "http", sizeof("http") - 1) == 0) {
+ php_url *url_info = php_url_parse(Z_STRVAL_P(uri));
++#if PHP_VERSION_ID < 70300
+ if (url_info && url_info->path) {
+ settled_uri = zend_string_init(url_info->path, strlen(url_info->path), 0);
+ }
++#else
++ settled_uri = url_info->path;
++ url_info->path = NULL;
++#endif
+ php_url_free(url_info);
+ } else {
+ char *pos = NULL;
+diff --git a/yaf_session.c b/yaf_session.c
+index ff48291..65d6184 100644
+--- a/yaf_session.c
++++ b/yaf_session.c
+@@ -94,7 +94,12 @@ static yaf_session_t *yaf_session_instance(yaf_session_t *this_ptr) /* {{{ */ {
+
+ zval_ptr_dtor(&member);
+
+- if (property_info->offset != ZEND_WRONG_PROPERTY_OFFSET) {
++#if PHP_VERSION_ID < 70300
++ if (property_info->offset != ZEND_WRONG_PROPERTY_OFFSET)
++#else
++ if (IS_VALID_PROPERTY_OFFSET(property_info->offset))
++#endif
++ {
+ zval *prop = OBJ_PROP(obj, property_info->offset);
+ ZVAL_COPY(prop, sess);
+ }
diff --git a/PHPINFO b/PHPINFO
new file mode 100644
index 0000000..9fb2a21
--- /dev/null
+++ b/PHPINFO
@@ -0,0 +1,18 @@
+
+yaf
+
+yaf support => enabled
+Version => 3.0.7
+Supports => http://pecl.php.net/package/yaf
+
+Directive => Local Value => Master Value
+yaf.library => no value => no value
+yaf.action_prefer => Off => Off
+yaf.lowcase_path => Off => Off
+yaf.use_spl_autoload => Off => Off
+yaf.forward_limit => 5 => 5
+yaf.name_suffix => On => On
+yaf.name_separator => no value => no value
+yaf.st_compatible => Off => Off
+yaf.environ => product => product
+yaf.use_namespace => Off => Off
diff --git a/REFLECTION b/REFLECTION
index 23b228d..d5ff8d8 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #170 yaf version 3.0.7 ] {
+Extension [ <persistent> extension #174 yaf version 3.0.7 ] {
- Dependencies {
Dependency [ spl (Required) ]
diff --git a/php-pecl-yaf.spec b/php-pecl-yaf.spec
index f1045f8..2701814 100644
--- a/php-pecl-yaf.spec
+++ b/php-pecl-yaf.spec
@@ -31,13 +31,15 @@ Version: 3.0.7
Release: 0.10.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
%else
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
%endif
License: PHP
URL: http://pecl.php.net/package/yaf
Source1: %{pecl_name}.ini
+Patch0: https://github.com/laruence/yaf/commit/931dc56c7a53c388c21d679ae10dfe0b245aed32.patch
+
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7
BuildRequires: %{?scl_prefix}php-pear
@@ -107,6 +109,7 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1 -b .up
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_YAF_VERSION/{s/.*\t"//;s/".*$//;p}' php_yaf.h )
@@ -228,6 +231,9 @@ fi
%changelog
+* Thu Jun 28 2018 Remi Collet <remi@remirepo.net> - 3.0.7-2
+- add upstream patch for PHP 7.3
+
* Thu Mar 22 2018 Remi Collet <remi@remirepo.net> - 3.0.7-1
- update to 3.0.7