summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--22.patch255
-rw-r--r--PHPINFO18
-rw-r--r--REFLECTION27
-rw-r--r--php-pecl-couchbase2.spec14
4 files changed, 50 insertions, 264 deletions
diff --git a/22.patch b/22.patch
deleted file mode 100644
index 26b7574..0000000
--- a/22.patch
+++ /dev/null
@@ -1,255 +0,0 @@
-From 0c4210361cbc3fa1e36f24943a98d1c92a58874c Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Fri, 22 Jun 2018 14:42:58 +0200
-Subject: [PATCH 1/2] fix for 7.3
-
----
- src/couchbase/pool.c | 32 ++++++++++++++++++++++++++++++++
- 1 file changed, 32 insertions(+)
-
-diff --git a/src/couchbase/pool.c b/src/couchbase/pool.c
-index 825b81e..157731a 100644
---- a/src/couchbase/pool.c
-+++ b/src/couchbase/pool.c
-@@ -161,11 +161,19 @@ static lcb_error_t pcbc_normalize_connstr(lcb_type_t type, char *connstr, const
- // rebuild connection string with username as the bucket
- smart_str buf = {0};
- if (url->scheme) {
-+#if PHP_VERSION_ID < 70300
- smart_str_appends(&buf, url->scheme);
-+#else
-+ smart_str_appendl(&buf, ZSTR_VAL(url->scheme), ZSTR_LEN(url->scheme));
-+#endif
- smart_str_appendl(&buf, "://", 3);
- }
- if (url->host) {
-+#if PHP_VERSION_ID < 70300
- smart_str_appends(&buf, url->host);
-+#else
-+ smart_str_appendl(&buf, ZSTR_VAL(url->host), ZSTR_LEN(url->host));
-+#endif
- }
- if (url->port) {
- smart_str_appendc(&buf, ':');
-@@ -175,7 +183,11 @@ static lcb_error_t pcbc_normalize_connstr(lcb_type_t type, char *connstr, const
- smart_str_appends(&buf, bucketname);
- if (url->query) {
- smart_str_appendc(&buf, '?');
-+#if PHP_VERSION_ID < 70300
- smart_str_appends(&buf, url->query);
-+#else
-+ smart_str_appendl(&buf, ZSTR_VAL(url->query), ZSTR_LEN(url->query));
-+#endif
- }
- smart_str_0(&buf);
- PCBC_SMARTSTR_DUP(buf, *normalized);
-@@ -186,15 +198,27 @@ static lcb_error_t pcbc_normalize_connstr(lcb_type_t type, char *connstr, const
- }
- break;
- case LCB_TYPE_CLUSTER:
-+#if PHP_VERSION_ID < 70300
- if (url->path != NULL && url->path[0] != '\0') {
-+#else
-+ if (url->path != NULL && ZSTR_VAL(url->path)[0] != '\0') {
-+#endif
- // strip bucket from the connection string
- smart_str buf = {0};
- if (url->scheme) {
-+#if PHP_VERSION_ID < 70300
- smart_str_appends(&buf, url->scheme);
-+#else
-+ smart_str_appendl(&buf, ZSTR_VAL(url->scheme), ZSTR_LEN(url->scheme));
-+#endif
- smart_str_appendl(&buf, "://", 3);
- }
- if (url->host) {
-+#if PHP_VERSION_ID < 70300
- smart_str_appends(&buf, url->host);
-+#else
-+ smart_str_appendl(&buf, ZSTR_VAL(url->host), ZSTR_LEN(url->host));
-+#endif
- }
- if (url->port) {
- smart_str_appendc(&buf, ':');
-@@ -202,7 +226,11 @@ static lcb_error_t pcbc_normalize_connstr(lcb_type_t type, char *connstr, const
- }
- if (url->query) {
- smart_str_appendc(&buf, '?');
-+#if PHP_VERSION_ID < 70300
- smart_str_appends(&buf, url->query);
-+#else
-+ smart_str_appendl(&buf, ZSTR_VAL(url->query), ZSTR_LEN(url->query));
-+#endif
- }
- smart_str_0(&buf);
- PCBC_SMARTSTR_DUP(buf, *normalized);
-@@ -257,7 +285,11 @@ static lcb_error_t pcbc_connection_cache(smart_str *plist_key, pcbc_connection_t
- zend_resource res;
- res.type = pcbc_res_couchbase;
- res.ptr = conn;
-+#if PHP_VERSION_ID < 70300
- GC_REFCOUNT(&res) = 1;
-+#else
-+ GC_SET_REFCOUNT(&res, 1);
-+#endif
-
- if (zend_hash_str_update_mem(&EG(persistent_list), PCBC_SMARTSTR_VAL(*plist_key), PCBC_SMARTSTR_LEN(*plist_key),
- &res, sizeof(res)) == NULL) {
-
-From a46f448465b93fc8585f4bdc2ebc17dc9f4f33fd Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Fri, 22 Jun 2018 14:50:55 +0200
-Subject: [PATCH 2/2] fix -Wformat issue raised with 7.3
-
----
- src/couchbase/bucket_manager.c | 8 ++++----
- src/couchbase/cluster_manager.c | 14 +++++++-------
- src/couchbase/mutation_state.c | 2 +-
- src/couchbase/n1ql_query.c | 8 ++++----
- 4 files changed, 16 insertions(+), 16 deletions(-)
-
-diff --git a/src/couchbase/bucket_manager.c b/src/couchbase/bucket_manager.c
-index 165b410..4c17f0c 100644
---- a/src/couchbase/bucket_manager.c
-+++ b/src/couchbase/bucket_manager.c
-@@ -117,7 +117,7 @@ PHP_METHOD(BucketManager, insertDesignDocument)
- return;
- }
-
-- path_len = spprintf(&path, 0, "/_design/%*s", name_len, name);
-+ path_len = spprintf(&path, 0, "/_design/%*s", (int)name_len, name);
-
- cmd.type = LCB_HTTP_TYPE_VIEW;
- cmd.method = LCB_HTTP_METHOD_GET;
-@@ -187,7 +187,7 @@ PHP_METHOD(BucketManager, upsertDesignDocument)
-
- cmd.type = LCB_HTTP_TYPE_VIEW;
- cmd.method = LCB_HTTP_METHOD_PUT;
-- path_len = spprintf(&path, 0, "/_design/%*s", name_len, name);
-+ path_len = spprintf(&path, 0, "/_design/%*s", (int)name_len, name);
- LCB_CMD_SET_KEY(&cmd, path, path_len);
- cmd.content_type = PCBC_CONTENT_TYPE_JSON;
-
-@@ -239,7 +239,7 @@ PHP_METHOD(BucketManager, removeDesignDocument)
-
- cmd.type = LCB_HTTP_TYPE_VIEW;
- cmd.method = LCB_HTTP_METHOD_DELETE;
-- path_len = spprintf(&path, 0, "/_design/%*s", name_len, name);
-+ path_len = spprintf(&path, 0, "/_design/%*s", (int)name_len, name);
- LCB_CMD_SET_KEY(&cmd, path, path_len);
- cmd.content_type = PCBC_CONTENT_TYPE_FORM;
- pcbc_http_request(return_value, obj->conn->lcb, &cmd, 1 TSRMLS_CC);
-@@ -264,7 +264,7 @@ PHP_METHOD(BucketManager, getDesignDocument)
-
- cmd.type = LCB_HTTP_TYPE_VIEW;
- cmd.method = LCB_HTTP_METHOD_GET;
-- path_len = spprintf(&path, 0, "/_design/%*s", name_len, name);
-+ path_len = spprintf(&path, 0, "/_design/%*s", (int)name_len, name);
- LCB_CMD_SET_KEY(&cmd, path, path_len);
- cmd.content_type = PCBC_CONTENT_TYPE_FORM;
- pcbc_http_request(return_value, obj->conn->lcb, &cmd, 1 TSRMLS_CC);
-diff --git a/src/couchbase/cluster_manager.c b/src/couchbase/cluster_manager.c
-index f782358..ffb0ff8 100644
---- a/src/couchbase/cluster_manager.c
-+++ b/src/couchbase/cluster_manager.c
-@@ -124,7 +124,7 @@ PHP_METHOD(ClusterManager, removeBucket)
- if (rv == FAILURE) {
- return;
- }
-- path_len = spprintf(&path, 0, "/pools/default/buckets/%*s", name_len, name);
-+ path_len = spprintf(&path, 0, "/pools/default/buckets/%*s", (int)name_len, name);
- cmd.type = LCB_HTTP_TYPE_MANAGEMENT;
- cmd.method = LCB_HTTP_METHOD_DELETE;
- LCB_CMD_SET_KEY(&cmd, path, path_len);
-@@ -208,10 +208,10 @@ PHP_METHOD(ClusterManager, getUser)
- }
- switch (domain) {
- case PCBC_CLUSTER_MANAGER_RBAC_DOMAIN_LOCAL:
-- path_len = spprintf(&path, 0, "/settings/rbac/users/local/%*s", name_len, name);
-+ path_len = spprintf(&path, 0, "/settings/rbac/users/local/%*s", (int)name_len, name);
- break;
- case PCBC_CLUSTER_MANAGER_RBAC_DOMAIN_EXTERNAL:
-- path_len = spprintf(&path, 0, "/settings/rbac/users/external/%*s", name_len, name);
-+ path_len = spprintf(&path, 0, "/settings/rbac/users/external/%*s", (int)name_len, name);
- break;
- default:
- throw_pcbc_exception("Invalid arguments.", LCB_EINVAL);
-@@ -244,10 +244,10 @@ PHP_METHOD(ClusterManager, removeUser)
- }
- switch (domain) {
- case PCBC_CLUSTER_MANAGER_RBAC_DOMAIN_LOCAL:
-- path_len = spprintf(&path, 0, "/settings/rbac/users/local/%*s", name_len, name);
-+ path_len = spprintf(&path, 0, "/settings/rbac/users/local/%*s", (int)name_len, name);
- break;
- case PCBC_CLUSTER_MANAGER_RBAC_DOMAIN_EXTERNAL:
-- path_len = spprintf(&path, 0, "/settings/rbac/users/external/%*s", name_len, name);
-+ path_len = spprintf(&path, 0, "/settings/rbac/users/external/%*s", (int)name_len, name);
- break;
- default:
- throw_pcbc_exception("Invalid arguments.", LCB_EINVAL);
-@@ -293,10 +293,10 @@ PHP_METHOD(ClusterManager, upsertUser)
- user = Z_USER_SETTINGS_OBJ_P(settings);
- switch (domain) {
- case PCBC_CLUSTER_MANAGER_RBAC_DOMAIN_LOCAL:
-- path_len = spprintf(&path, 0, "/settings/rbac/users/local/%*s", name_len, name);
-+ path_len = spprintf(&path, 0, "/settings/rbac/users/local/%*s", (int)name_len, name);
- break;
- case PCBC_CLUSTER_MANAGER_RBAC_DOMAIN_EXTERNAL:
-- path_len = spprintf(&path, 0, "/settings/rbac/users/external/%*s", name_len, name);
-+ path_len = spprintf(&path, 0, "/settings/rbac/users/external/%*s", (int)name_len, name);
- break;
- default:
- throw_pcbc_exception("Invalid arguments.", LCB_EINVAL);
-diff --git a/src/couchbase/mutation_state.c b/src/couchbase/mutation_state.c
-index 5f0921e..b397149 100644
---- a/src/couchbase/mutation_state.c
-+++ b/src/couchbase/mutation_state.c
-@@ -205,7 +205,7 @@ void pcbc_mutation_state_export_for_n1ql(pcbc_mutation_state_t *obj, zval *scan_
- add_next_index_long(PCBC_P(pair), PCBC_MUTATION_TOKEN_SEQ(token));
- snprintf(buf, 21, "%llu", (unsigned long long)PCBC_MUTATION_TOKEN_ID(token));
- ADD_NEXT_INDEX_STRING(PCBC_P(pair), buf);
-- snprintf(buf, 21, "%d\0", (int)PCBC_MUTATION_TOKEN_VB(token));
-+ snprintf(buf, 21, "%d", (int)PCBC_MUTATION_TOKEN_VB(token));
- #if PHP_VERSION_ID >= 70000
- zend_hash_str_update(Z_ARRVAL_P(bucket_group), buf, strlen(buf), PCBC_P(pair) TSRMLS_CC);
- #else
-diff --git a/src/couchbase/n1ql_query.c b/src/couchbase/n1ql_query.c
-index 0dcf906..de9cf41 100644
---- a/src/couchbase/n1ql_query.c
-+++ b/src/couchbase/n1ql_query.c
-@@ -174,7 +174,7 @@ PHP_METHOD(N1qlQuery, scanCap)
- }
-
- PCBC_READ_PROPERTY(options, pcbc_n1ql_query_ce, getThis(), "options", 0);
-- spprintf(&val, 0, "%d", scan_cap);
-+ spprintf(&val, 0, "%ld", scan_cap);
- ADD_ASSOC_STRING(options, "scan_cap", val);
- efree(val);
-
-@@ -195,7 +195,7 @@ PHP_METHOD(N1qlQuery, pipelineBatch)
- }
-
- PCBC_READ_PROPERTY(options, pcbc_n1ql_query_ce, getThis(), "options", 0);
-- spprintf(&val, 0, "%d", pipeline_batch);
-+ spprintf(&val, 0, "%ld", pipeline_batch);
- ADD_ASSOC_STRING(options, "pipeline_batch", val);
- efree(val);
-
-@@ -216,7 +216,7 @@ PHP_METHOD(N1qlQuery, pipelineCap)
- }
-
- PCBC_READ_PROPERTY(options, pcbc_n1ql_query_ce, getThis(), "options", 0);
-- spprintf(&val, 0, "%d", pipeline_cap);
-+ spprintf(&val, 0, "%ld", pipeline_cap);
- ADD_ASSOC_STRING(options, "pipeline_cap", val);
- efree(val);
-
-@@ -237,7 +237,7 @@ PHP_METHOD(N1qlQuery, maxParallelism)
- }
-
- PCBC_READ_PROPERTY(options, pcbc_n1ql_query_ce, getThis(), "options", 0);
-- spprintf(&val, 0, "%d", max_parallelism);
-+ spprintf(&val, 0, "%ld", max_parallelism);
- ADD_ASSOC_STRING(options, "max_parallelism", val);
- efree(val);
-
diff --git a/PHPINFO b/PHPINFO
new file mode 100644
index 0000000..7dc0511
--- /dev/null
+++ b/PHPINFO
@@ -0,0 +1,18 @@
+
+couchbase
+
+couchbase support => enabled
+extension version => 2.5.0
+libcouchbase runtime version => 2.9.2 (git: 0f7cb6fe8b81c66273bfdab304d0f63bb4490377)
+libcouchbase headers version => 2.9.2 (git: 0f7cb6fe8b81c66273bfdab304d0f63bb4490377)
+igbinary transcoder => enabled
+zlib compressor => enabled
+
+Directive => Local Value => Master Value
+couchbase.log_level => WARN => WARN
+couchbase.encoder.format => json => json
+couchbase.encoder.compression => off => off
+couchbase.encoder.compression_threshold => 0 => 0
+couchbase.encoder.compression_factor => 0.0 => 0.0
+couchbase.decoder.json_arrays => 0 => 0
+couchbase.pool.max_idle_time_sec => 60 => 60
diff --git a/REFLECTION b/REFLECTION
index bb4f678..496e2d8 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #183 couchbase version 2.4.7 ] {
+Extension [ <persistent> extension #183 couchbase version 2.5.0 ] {
- Dependencies {
Dependency [ json (Required) ]
@@ -332,7 +332,7 @@ Extension [ <persistent> extension #183 couchbase version 2.4.7 ] {
}
}
- - Classes [53] {
+ - Classes [54] {
Class [ <internal:couchbase> class Couchbase\Exception extends Exception implements Throwable ] {
- Constants [0] {
@@ -1178,6 +1178,29 @@ Extension [ <persistent> extension #183 couchbase version 2.4.7 ] {
}
}
+ Class [ <internal:couchbase> class Couchbase\CertAuthenticator implements Couchbase\Authenticator ] {
+
+ - Constants [0] {
+ }
+
+ - Static properties [0] {
+ }
+
+ - Static methods [0] {
+ }
+
+ - Properties [0] {
+ }
+
+ - Methods [1] {
+ Method [ <internal:couchbase, ctor> public method __construct ] {
+
+ - Parameters [0] {
+ }
+ }
+ }
+ }
+
Class [ <internal:couchbase> class Couchbase\ClassicAuthenticator implements Couchbase\Authenticator ] {
- Constants [0] {
diff --git a/php-pecl-couchbase2.spec b/php-pecl-couchbase2.spec
index f961906..5dd8bec 100644
--- a/php-pecl-couchbase2.spec
+++ b/php-pecl-couchbase2.spec
@@ -25,21 +25,19 @@
Summary: Couchbase Server PHP extension
Name: %{?sub_prefix}php-pecl-couchbase2
-Version: 2.4.7
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Version: 2.5.0
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
URL: http://pecl.php.net/package/couchbase
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
-Patch0: https://patch-diff.githubusercontent.com/raw/couchbase/php-couchbase/pull/22.patch
-
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 5.6
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-pecl-igbinary-devel
BuildRequires: %{?scl_prefix}php-json
BuildRequires: %{?scl_prefix}php-tokenizer
-BuildRequires: pkgconfig(libcouchbase) >= 2.9.0
+BuildRequires: pkgconfig(libcouchbase) >= 2.9.2
BuildRequires: fastlz-devel
BuildRequires: zlib-devel
@@ -110,8 +108,6 @@ mv %{pecl_name}-%{version}%{?prever} NTS
%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
cd NTS
-%patch0 -p1 -b .pr22
-
# Drop bundled library
sed -e '/fastlz/d' -i ../package.xml
rm -r fastlz
@@ -246,6 +242,10 @@ fi
%changelog
+* Thu Jul 5 2018 Remi Collet <remi@remirepo.net> - 2.5.0-1
+- update to 2.5.0
+- raise dependency on libcouchbase 2.9.2
+
* Fri Jun 22 2018 Remi Collet <remi@remirepo.net> - 2.4.7-2
- add patch for PHP 7.3 from
https://github.com/couchbase/php-couchbase/pull/22