summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-12-16 08:36:11 +0100
committerRemi Collet <remi@php.net>2021-12-16 08:36:11 +0100
commit41861f0f7642c3173fbde486384503f9e061389a (patch)
tree0a71049ed0da4da35ea4027129a5ade1d834f99b
parentcd1dd050d4e079fd3afbadefe5859965b50c59ee (diff)
update to 1.1.1
drop patches merged upstream
-rw-r--r--63.patch34
-rw-r--r--66.patch72
-rw-r--r--PHPINFO4
-rw-r--r--REFLECTION13
-rw-r--r--php-pecl-yaconf.spec14
5 files changed, 16 insertions, 121 deletions
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 <remi@remirepo.net>
-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
- <?php if (!extension_loaded("yaconf")) print "skip"; ?>
- --INI--
- yaconf.directory={PWD}/inis/005
-+log_errors=1
- --FILE--
- <?php
- var_dump(Yaconf::has("a"));
-diff --git a/tests/006.phpt b/tests/006.phpt
-index 5fba611..a1ca7df 100644
---- a/tests/006.phpt
-+++ b/tests/006.phpt
-@@ -4,6 +4,7 @@ Check for Yaconf with section
- <?php if (!extension_loaded("yaconf")) print "skip"; ?>
- --INI--
- yaconf.directory={PWD}/inis/006
-+log_errors=1
- --FILE--
- <?php
- var_dump(Yaconf::has("a"));
diff --git a/66.patch b/66.patch
deleted file mode 100644
index beaf8be..0000000
--- a/66.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 9ecaca42f0d168340e9f064c6756cd2404a090c6 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-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 [ <persistent> extension #119 yaconf version 1.1.0 ] {
+Extension [ <persistent> extension #120 yaconf version 1.1.1 ] {
- INI {
Entry [ yaconf.directory <SYSTEM> ]
@@ -22,23 +22,26 @@ Extension [ <persistent> extension #119 yaconf version 1.1.0 ] {
Method [ <internal:yaconf> static public method get ] {
- Parameters [2] {
- Parameter #0 [ <required> $name ]
- Parameter #1 [ <optional> $default = <default> ]
+ Parameter #0 [ <required> string $name ]
+ Parameter #1 [ <optional> mixed $default = NULL ]
}
+ - Return [ mixed ]
}
Method [ <internal:yaconf> static public method has ] {
- Parameters [1] {
- Parameter #0 [ <required> $name ]
+ Parameter #0 [ <required> string $name ]
}
+ - Return [ bool ]
}
Method [ <internal:yaconf> static public method __debug_info ] {
- Parameters [1] {
- Parameter #0 [ <required> $name ]
+ Parameter #0 [ <required> 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 <remi@remirepo.net> - 1.1.1-1
+- update to 1.1.1
+- drop patches merged upstream
+
* Tue Nov 30 2021 Remi Collet <remi@remirepo.net> - 1.1.0-4
- add patch for PHP 8.1 from https://github.com/laruence/yaconf/pull/66