summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-08-31 07:57:34 +0200
committerRemi Collet <remi@remirepo.net>2021-08-31 07:57:34 +0200
commitdb557facc8049fb70d71b42c26a7b2ccbd69bc0f (patch)
tree70b5f9e26122b6b947e79631629b6f1867d35908
parentfc8f6b2ff58745f4df7c088f0598afc5c42da1bb (diff)
update to 2.2.0
-rw-r--r--PHPINFO4
-rw-r--r--REFLECTION10
-rw-r--r--php-pecl-pq.spec14
-rw-r--r--pq-php81.patch331
4 files changed, 17 insertions, 342 deletions
diff --git a/PHPINFO b/PHPINFO
index 99996d6..0dc7e58 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,7 +2,7 @@
pq
PQ Support => enabled
-Extension Version => 2.1.8
+Extension Version => 2.2.0
Used Library => Compiled => Linked
-libpq => 12.3 => 12.0.3
+libpq => 12.7 => 12.0.7
diff --git a/REFLECTION b/REFLECTION
index e04749a..5cfd870 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #117 pq version 2.1.8 ] {
+Extension [ <persistent> extension #124 pq version 2.2.0 ] {
- Dependencies {
Dependency [ raphf (Required) ]
@@ -541,7 +541,7 @@ Extension [ <persistent> extension #117 pq version 2.1.8 ] {
Class [ <internal:pq> class pq\Connection ] {
- - Constants [22] {
+ - Constants [25] {
Constant [ public int OK ] { 0 }
Constant [ public int BAD ] { 1 }
Constant [ public int STARTED ] { 2 }
@@ -550,6 +550,9 @@ Extension [ <persistent> extension #117 pq version 2.1.8 ] {
Constant [ public int AUTH_OK ] { 5 }
Constant [ public int SSL_STARTUP ] { 7 }
Constant [ public int SETENV ] { 6 }
+ Constant [ public int CHECK_WRITABLE ] { 9 }
+ Constant [ public int CONSUME ] { 10 }
+ Constant [ public int GSS_STARTUP ] { 11 }
Constant [ public int TRANS_IDLE ] { 0 }
Constant [ public int TRANS_ACTIVE ] { 1 }
Constant [ public int TRANS_INTRANS ] { 2 }
@@ -1064,7 +1067,7 @@ Extension [ <persistent> extension #117 pq version 2.1.8 ] {
Class [ <internal:pq> <iterateable> class pq\Result implements Traversable, Countable ] {
- - Constants [21] {
+ - Constants [22] {
Constant [ public int EMPTY_QUERY ] { 0 }
Constant [ public int COMMAND_OK ] { 1 }
Constant [ public int TUPLES_OK ] { 2 }
@@ -1085,6 +1088,7 @@ Extension [ <persistent> extension #117 pq version 2.1.8 ] {
Constant [ public int CONV_ARRAY ] { 16 }
Constant [ public int CONV_DATETIME ] { 32 }
Constant [ public int CONV_JSON ] { 256 }
+ Constant [ public int CONV_BYTEA ] { 8 }
Constant [ public int CONV_ALL ] { 65535 }
}
diff --git a/php-pecl-pq.spec b/php-pecl-pq.spec
index 2519e75..8fde52c 100644
--- a/php-pecl-pq.spec
+++ b/php-pecl-pq.spec
@@ -27,7 +27,7 @@
Summary: PostgreSQL client library (libpq) binding
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 2.1.8
+Version: 2.2.0
%if 0%{?gh_date:1}
Release: 0.11.%{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
@@ -38,9 +38,6 @@ Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
License: BSD
URL: https://pecl.php.net/package/%{pecl_name}
-# Upstream patches
-Patch0: %{pecl_name}-php81.patch
-
%if 0%{?fedora} >= 29 && 0%{?rhel} >= 8
BuildRequires: libpq-devel > 9
%else
@@ -118,8 +115,6 @@ sed -e '/role="test"/d' \
-i package.xml
cd NTS
-%patch0 -p1
-
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_PQ_VERSION/{s/.* "//;s/".*$//;p}' php_pq.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
@@ -207,6 +202,10 @@ fi
: ignore tests with erratic results
rm ?TS/tests/cancel001.phpt
rm ?TS/tests/flush001.phpt
+%if 0%{?rhel} == 7
+: https://github.com/m6w6/ext-pq/issues/42
+rm ?TS/tests/async010.phpt
+%endif
OPT="-n"
[ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so"
@@ -287,6 +286,9 @@ exit $RET
%changelog
+* Tue Aug 31 2021 Remi Collet <remi@remirepo.net> - 2.2.0-1
+- update to 2.2.0
+
* Wed Aug 4 2021 Remi Collet <remi@remirepo.net> - 2.1.8-6
- add patch for 8.1.0beta2 from
https://github.com/m6w6/ext-pq/pull/41
diff --git a/pq-php81.patch b/pq-php81.patch
deleted file mode 100644
index 556904a..0000000
--- a/pq-php81.patch
+++ /dev/null
@@ -1,331 +0,0 @@
-From c9082b82cd9275d2ff9027b108ea01ab88e70294 Mon Sep 17 00:00:00 2001
-From: Michael Wallner <mike@php.net>
-Date: Fri, 15 Jan 2021 13:38:41 +0100
-Subject: [PATCH] fix PHP-master
-
----
- src/php_pq_params.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/php_pq_params.c b/src/php_pq_params.c
-index a3ee6b8..259fbb9 100644
---- a/src/php_pq_params.c
-+++ b/src/php_pq_params.c
-@@ -307,7 +307,8 @@ static int apply_to_params(zval *zp, void *arg_ptr)
- {
- struct apply_to_params_arg *arg = arg_ptr;
-
-- SEPARATE_ZVAL_IF_NOT_REF(zp);
-+ ZVAL_DEREF(zp);
-+ SEPARATE_ZVAL(zp);
- php_pq_params_set_param(arg->params, arg->index++, zp);
- return ZEND_HASH_APPLY_KEEP;
- }
-
-From 320bae0144fab755d678317f7ec14f9cb3ae1869 Mon Sep 17 00:00:00 2001
-From: Michael Wallner <mike@php.net>
-Date: Wed, 10 Mar 2021 11:22:50 +0100
-Subject: [PATCH] compatibility with master
-
----
- src/php_pq_misc.h | 14 +++++-----
- src/php_pqres.c | 4 +--
- tests/res001.phpt | 67 ++++++++++++++++++++++++++---------------------
- 3 files changed, 46 insertions(+), 39 deletions(-)
-
-diff --git a/src/php_pq_misc.h b/src/php_pq_misc.h
-index 07bd596..7ccda3e 100644
---- a/src/php_pq_misc.h
-+++ b/src/php_pq_misc.h
-@@ -40,13 +40,6 @@ extern char *php_pq_rtrim(char *e);
- /* R, W, RW */
- extern const char *php_pq_strmode(long mode);
-
--/* compare array index */
--#if PHP_VERSION_ID >= 80000
--extern int php_pq_compare_index(Bucket *lptr, Bucket *rptr);
--#else
--extern int php_pq_compare_index(const void *lptr, const void *rptr);
--#endif
--
- /* free zval ptr values (as hash dtor) */
- extern void php_pq_hash_ptr_dtor(zval *p);
-
-@@ -63,6 +56,8 @@ extern HashTable *php_pq_parse_array(php_pqres_t *res, const char *val_str, size
-
- /* ZE compat */
- #if PHP_VERSION_ID >= 80000
-+extern int php_pq_compare_index(Bucket *lptr, Bucket *rptr);
-+
- # define php_pq_call_method(objval_ptr, method_name, num_args, ...) \
- zend_call_method_with_ ## num_args ## _params( \
- Z_OBJ_P(objval_ptr), Z_OBJCE_P(objval_ptr), NULL, \
-@@ -77,6 +72,11 @@ extern HashTable *php_pq_parse_array(php_pqres_t *res, const char *val_str, size
- (Z_OBJ_HT_P(objval_ptr)->cast_object && \
- SUCCESS == Z_OBJ_HT_P(objval_ptr)->cast_object(Z_OBJ_P(objval_ptr), (retval_ptr), (cast_type)))
- #else
-+
-+extern int php_pq_compare_index(const void *lptr, const void *rptr);
-+
-+# define zend_ze_countable spl_ce_Countable
-+
- # define php_pq_call_method(objval_ptr, method_name, num_args, ...) \
- zend_call_method_with_ ## num_args ## _params( \
- (objval_ptr), NULL, NULL, \
-diff --git a/src/php_pqres.c b/src/php_pqres.c
-index 7e51271..be3d039 100644
---- a/src/php_pqres.c
-+++ b/src/php_pqres.c
-@@ -1249,9 +1249,9 @@ PHP_MINIT_FUNCTION(pqres)
- php_pqres_class_entry->create_object = php_pqres_create_object;
- php_pqres_class_entry->get_iterator = php_pqres_iterator_init;
- #if PHP_VERSION_ID >= 80000
-- zend_class_implements(php_pqres_class_entry, 2, zend_ce_aggregate, spl_ce_Countable);
-+ zend_class_implements(php_pqres_class_entry, 2, zend_ce_aggregate, zend_ce_countable);
- #else
-- zend_class_implements(php_pqres_class_entry, 2, zend_ce_traversable, spl_ce_Countable);
-+ zend_class_implements(php_pqres_class_entry, 2, zend_ce_traversable, zend_ce_countable);
- #endif
-
- memcpy(&php_pqres_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
-diff --git a/tests/res001.phpt b/tests/res001.phpt
-index b2a3667..a325247 100644
---- a/tests/res001.phpt
-+++ b/tests/res001.phpt
-@@ -19,7 +19,13 @@ class r extends pq\Result {
- public $dummy = 2;
- }
-
--var_dump(new pq\Result, get_object_vars(new r));
-+var_dump(new pq\Result);
-+
-+echo "Test\n";
-+$v = get_object_vars(new r);
-+ksort($v);
-+var_dump($v);
-+
- ?>
- Done
- --EXPECTF--
-@@ -42,6 +48,27 @@ Warning: pq\Result not initialized in %s on line %d
- Warning: pq\Result not initialized in %s on line %d
-
- Warning: pq\Result not initialized in %s on line %d
-+object(pq\Result)#%d (9) {
-+ ["status"]=>
-+ NULL
-+ ["statusMessage"]=>
-+ NULL
-+ ["errorMessage"]=>
-+ NULL
-+ ["diag"]=>
-+ NULL
-+ ["numRows"]=>
-+ int(0)
-+ ["numCols"]=>
-+ int(0)
-+ ["affectedRows"]=>
-+ int(0)
-+ ["fetchType"]=>
-+ int(0)
-+ ["autoConvert"]=>
-+ int(65535)
-+}
-+Test
-
- Warning: pq\Result not initialized in %s on line %d
-
-@@ -62,46 +89,26 @@ Warning: pq\Result not initialized in %s on line %d
- Warning: pq\Result not initialized in %s on line %d
-
- Warning: pq\Result not initialized in %s on line %d
--object(pq\Result)#%d (9) {
-- ["status"]=>
-- NULL
-- ["statusMessage"]=>
-- NULL
-- ["errorMessage"]=>
-- NULL
-- ["diag"]=>
-- NULL
-- ["numRows"]=>
-- int(0)
-- ["numCols"]=>
-- int(0)
-+array(10) {
- ["affectedRows"]=>
- int(0)
-- ["fetchType"]=>
-- int(0)
- ["autoConvert"]=>
- int(65535)
--}
--array(10) {
-+ ["diag"]=>
-+ NULL
- ["dummy"]=>
- int(2)
-- ["status"]=>
-- NULL
-- ["statusMessage"]=>
-- NULL
- ["errorMessage"]=>
- NULL
-- ["diag"]=>
-- NULL
-- ["numRows"]=>
-+ ["fetchType"]=>
- int(0)
- ["numCols"]=>
- int(0)
-- ["affectedRows"]=>
-- int(0)
-- ["fetchType"]=>
-+ ["numRows"]=>
- int(0)
-- ["autoConvert"]=>
-- int(65535)
-+ ["status"]=>
-+ NULL
-+ ["statusMessage"]=>
-+ NULL
- }
- Done
-
-From 7109996c98ad7df145d88693167023b7b9be9f8c Mon Sep 17 00:00:00 2001
-From: Michael Wallner <mike@php.net>
-Date: Wed, 10 Mar 2021 13:33:17 +0100
-Subject: [PATCH] typo
-
----
- src/php_pq_misc.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/php_pq_misc.h b/src/php_pq_misc.h
-index 7ccda3e..1285d8e 100644
---- a/src/php_pq_misc.h
-+++ b/src/php_pq_misc.h
-@@ -75,7 +75,7 @@ extern int php_pq_compare_index(Bucket *lptr, Bucket *rptr);
-
- extern int php_pq_compare_index(const void *lptr, const void *rptr);
-
--# define zend_ze_countable spl_ce_Countable
-+# define zend_ce_countable spl_ce_Countable
-
- # define php_pq_call_method(objval_ptr, method_name, num_args, ...) \
- zend_call_method_with_ ## num_args ## _params( \
-
-From 54542ca3e96ba72090f188692995047ae70d5d28 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Fri, 11 Jun 2021 10:01:07 +0200
-Subject: [PATCH] fix prototype for 8.1
-
----
- src/php_pq_misc.c | 13 ++++++++++++-
- 1 file changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/src/php_pq_misc.c b/src/php_pq_misc.c
-index 3e334c6..9e622b4 100644
---- a/src/php_pq_misc.c
-+++ b/src/php_pq_misc.c
-@@ -131,6 +131,13 @@ void php_pq_hash_ptr_dtor(zval *p)
-
- zend_class_entry *php_pqdt_class_entry;
-
-+#if PHP_VERSION_ID >= 80100
-+ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(ai_pqdt_jsonserialize, 0, 0, IS_MIXED, 0)
-+#else
-+#define ai_pqdt_jsonserialize ai_pqdt_to_string
-+#endif
-+ZEND_END_ARG_INFO()
-+
- ZEND_BEGIN_ARG_INFO_EX(ai_pqdt_to_string, 0, 0, 0)
- ZEND_END_ARG_INFO();
- static PHP_METHOD(pqdt, __toString)
-@@ -142,7 +149,11 @@ static PHP_METHOD(pqdt, __toString)
- RETVAL_ZVAL(&rv, 1, 1);
- }
-
-+#if PHP_VERSION_ID >= 80100
-+ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_TYPE_MASK_EX(ai_pqdt_create_from_format, 0, 2, DateTime, MAY_BE_FALSE)
-+#else
- ZEND_BEGIN_ARG_INFO_EX(ai_pqdt_create_from_format, 0, 0, 2)
-+#endif
- ZEND_ARG_INFO(0, format)
- ZEND_ARG_INFO(0, datetime)
- #if PHP_VERSION_ID >= 70200
-@@ -171,7 +182,7 @@ static PHP_METHOD(pqdt, createFromFormat)
- static zend_function_entry php_pqdt_methods[] = {
- PHP_ME(pqdt, createFromFormat, ai_pqdt_create_from_format, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
- PHP_ME(pqdt, __toString, ai_pqdt_to_string, ZEND_ACC_PUBLIC)
-- PHP_MALIAS(pqdt, jsonSerialize, __toString, ai_pqdt_to_string, ZEND_ACC_PUBLIC)
-+ PHP_MALIAS(pqdt, jsonSerialize, __toString, ai_pqdt_jsonserialize, ZEND_ACC_PUBLIC)
- {0}
- };
-
-
-From aaf7e8976c03dd38dcab4fbde35c5b0e6253c9d4 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Fri, 11 Jun 2021 10:15:56 +0200
-Subject: [PATCH 2/2] fix previous
-
----
- src/php_pq_misc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/php_pq_misc.c b/src/php_pq_misc.c
-index 9e622b4..70f32da 100644
---- a/src/php_pq_misc.c
-+++ b/src/php_pq_misc.c
-@@ -133,10 +133,10 @@ zend_class_entry *php_pqdt_class_entry;
-
- #if PHP_VERSION_ID >= 80100
- ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(ai_pqdt_jsonserialize, 0, 0, IS_MIXED, 0)
-+ZEND_END_ARG_INFO()
- #else
- #define ai_pqdt_jsonserialize ai_pqdt_to_string
- #endif
--ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_INFO_EX(ai_pqdt_to_string, 0, 0, 0)
- ZEND_END_ARG_INFO();
-From 94c127a7e5fe56ed53a4f5fad0a7abad101a1fe9 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Wed, 4 Aug 2021 10:23:43 +0200
-Subject: [PATCH] fix prototype for 8.1.0beta2
-
----
- src/php_pqres.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/src/php_pqres.c b/src/php_pqres.c
-index be3d039..56c7444 100644
---- a/src/php_pqres.c
-+++ b/src/php_pqres.c
-@@ -1146,7 +1146,11 @@ static PHP_METHOD(pqres, fetchAll) {
- }
- }
-
-+#if PHP_VERSION_ID >= 80100
-+ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(ai_pqres_count, 0, 0, IS_LONG, 0)
-+#else
- ZEND_BEGIN_ARG_INFO_EX(ai_pqres_count, 0, 0, 0)
-+#endif
- ZEND_END_ARG_INFO();
- static PHP_METHOD(pqres, count) {
- zend_error_handling zeh;
-@@ -1194,7 +1198,11 @@ static PHP_METHOD(pqres, desc) {
- }
-
- #if PHP_VERSION_ID >= 80000
-+#if PHP_VERSION_ID >= 80100
-+ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(ai_pqres_getIterator, 0, 0, Iterator, 0)
-+#else
- ZEND_BEGIN_ARG_INFO_EX(ai_pqres_getIterator, 0, 0, 0)
-+#endif
- ZEND_END_ARG_INFO();
- static PHP_METHOD(pqres, getIterator)
- {
---
-2.31.1
-