From 41861f0f7642c3173fbde486384503f9e061389a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 16 Dec 2021 08:36:11 +0100 Subject: update to 1.1.1 drop patches merged upstream --- 63.patch | 34 ------------------------- 66.patch | 72 ---------------------------------------------------- PHPINFO | 4 +-- REFLECTION | 13 ++++++---- php-pecl-yaconf.spec | 14 +++++----- 5 files changed, 16 insertions(+), 121 deletions(-) delete mode 100644 63.patch delete mode 100644 66.patch diff --git a/63.patch b/63.patch deleted file mode 100644 index 510fe50..0000000 --- a/63.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 63850cfaeff7329de5e11222a63575fe5aecb382 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Wed, 23 Sep 2020 08:11:44 +0200 -Subject: [PATCH] force log_errors=1 for PHP 8 - ---- - tests/005.phpt | 1 + - tests/006.phpt | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/tests/005.phpt b/tests/005.phpt -index 0336074..d7a8e08 100644 ---- a/tests/005.phpt -+++ b/tests/005.phpt -@@ -4,6 +4,7 @@ Check for Yaconf with long key name - - --INI-- - yaconf.directory={PWD}/inis/005 -+log_errors=1 - --FILE-- - - --INI-- - yaconf.directory={PWD}/inis/006 -+log_errors=1 - --FILE-- - -Date: Tue, 30 Nov 2021 10:01:15 +0100 -Subject: [PATCH] zend_string instead of char * on PHP 8.1 - ---- - yaconf.c | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -diff --git a/yaconf.c b/yaconf.c -index a4869c7..9431aa7 100644 ---- a/yaconf.c -+++ b/yaconf.c -@@ -613,7 +613,11 @@ PHP_MINIT_FUNCTION(yaconf) - if (S_ISREG(sb.st_mode)) { - yaconf_filenode node; - if ((fh.handle.fp = VCWD_FOPEN(ini_file, "r"))) { -+#if PHP_VERSION_ID >= 80100 -+ fh.filename = zend_string_init(ini_file, strlen(ini_file), 0); -+#else - fh.filename = ini_file; -+#endif - fh.type = ZEND_HANDLE_FP; - ZVAL_UNDEF(&active_ini_file_section); - YACONF_G(parse_err) = 0; -@@ -623,8 +627,14 @@ PHP_MINIT_FUNCTION(yaconf) - YACONF_G(parse_err) = 0; - php_yaconf_hash_destroy(Z_ARRVAL(result)); - free(namelist[i]); -+#if PHP_VERSION_ID >= 80100 -+ zend_string_release(fh.filename); -+#endif - continue; - } -+#if PHP_VERSION_ID >= 80100 -+ zend_string_release(fh.filename); -+#endif - } - - php_yaconf_symtable_update(ini_containers, namelist[i]->d_name, p - namelist[i]->d_name, &result); -@@ -703,7 +713,11 @@ PHP_RINIT_FUNCTION(yaconf) - } - - if ((fh.handle.fp = VCWD_FOPEN(ini_file, "r"))) { -+#if PHP_VERSION_ID >= 80100 -+ fh.filename = zend_string_init(ini_file, strlen(ini_file), 0); -+#else - fh.filename = ini_file; -+#endif - fh.type = ZEND_HANDLE_FP; - ZVAL_UNDEF(&active_ini_file_section); - YACONF_G(parse_err) = 0; -@@ -713,6 +727,9 @@ PHP_RINIT_FUNCTION(yaconf) - YACONF_G(parse_err) = 0; - php_yaconf_hash_destroy(Z_ARRVAL(result)); - free(namelist[i]); -+#if PHP_VERSION_ID >= 80100 -+ zend_string_release(fh.filename); -+#endif - continue; - } - } -@@ -734,6 +751,9 @@ PHP_RINIT_FUNCTION(yaconf) - zend_hash_update_mem(parsed_ini_files, n.filename, &n, sizeof(yaconf_filenode)); - } - free(namelist[i]); -+#if PHP_VERSION_ID >= 80100 -+ zend_string_release(fh.filename); -+#endif - } - free(namelist); - } diff --git a/PHPINFO b/PHPINFO index 90aba40..69190d1 100644 --- a/PHPINFO +++ b/PHPINFO @@ -2,8 +2,8 @@ yaconf yaconf support => enabled -version => 1.1.0 -yaconf config last check time => Tue Nov 30 10:06:06 2021 +version => 1.1.1 +yaconf config last check time => Thu Dec 16 08:21:26 2021 parsed filename => mtime diff --git a/REFLECTION b/REFLECTION index 9b4aa52..953e909 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #119 yaconf version 1.1.0 ] { +Extension [ extension #120 yaconf version 1.1.1 ] { - INI { Entry [ yaconf.directory ] @@ -22,23 +22,26 @@ Extension [ extension #119 yaconf version 1.1.0 ] { Method [ static public method get ] { - Parameters [2] { - Parameter #0 [ $name ] - Parameter #1 [ $default = ] + Parameter #0 [ string $name ] + Parameter #1 [ mixed $default = NULL ] } + - Return [ mixed ] } Method [ static public method has ] { - Parameters [1] { - Parameter #0 [ $name ] + Parameter #0 [ string $name ] } + - Return [ bool ] } Method [ static public method __debug_info ] { - Parameters [1] { - Parameter #0 [ $name ] + Parameter #0 [ string $name ] } + - Return [ ?array ] } } diff --git a/php-pecl-yaconf.spec b/php-pecl-yaconf.spec index 753347e..aa5cb59 100644 --- a/php-pecl-yaconf.spec +++ b/php-pecl-yaconf.spec @@ -19,20 +19,17 @@ Summary: Yet Another Configurations Container Name: %{?scl_prefix}php-pecl-yaconf -Version: 1.1.0 +Version: 1.1.1 License: PHP URL: https://github.com/%{gh_owner}/%{gh_project} %if 0%{?gh_date:1} Release: 0.5.%{gh_date}.%{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}/%{gh_project}-%{version}-%{gh_short}.tar.gz %else -Release: 4%{?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}-%{version}.tgz %endif -Patch0: https://patch-diff.githubusercontent.com/raw/laruence/yaconf/pull/63.patch -Patch1: https://patch-diff.githubusercontent.com/raw/laruence/yaconf/pull/66.patch - BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.0 @@ -90,9 +87,6 @@ mv %{pecl_name}-%{version} NTS %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} cd NTS -%patch0 -p1 -b .pr63 -%patch1 -p1 -b .pr66 - # Sanity check, really often broken extver=$(sed -n '/#define PHP_YACONF_VERSION/{s/.* "//;s/".*$//;p}' php_yaconf.h) if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then @@ -233,6 +227,10 @@ fi %changelog +* Thu Dec 16 2021 Remi Collet - 1.1.1-1 +- update to 1.1.1 +- drop patches merged upstream + * Tue Nov 30 2021 Remi Collet - 1.1.0-4 - add patch for PHP 8.1 from https://github.com/laruence/yaconf/pull/66 -- cgit