-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge in upstream changes from master branch of php-memcached GitHub …
…project (3.0.1 release)
- Loading branch information
Showing
12 changed files
with
171 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,9 +21,9 @@ http://pear.php.net/dtd/package-2.0.xsd"> | |
<email>[email protected]</email> | ||
<active>yes</active> | ||
</lead> | ||
<date>2017-01-27</date> | ||
<date>2017-02-07</date> | ||
<version> | ||
<release>3.0.0</release> | ||
<release>3.0.1</release> | ||
<api>3.0.0</api> | ||
</version> | ||
<stability> | ||
|
@@ -36,26 +36,12 @@ PHP7 release of memcached extension. Note that support for libmemcached 0.x seri | |
and the oldest actively tested version is 1.0.2. It is highly recommended to use version 1.0.18 of | ||
libmemcached. | ||
|
||
API | ||
* The method signature of get, getByKey, getMulti, and getMultiByKey changed. | ||
* get* and getMulti* commands no longer take cas or user flags parameters. | ||
* get* and getMulti* commands now take the Memcached::GET_EXTENDED flag to retrieve user flags and cas tokens. | ||
* Fixes getStats command to return all stats from all servers | ||
* Fixes allKeys command behaviour | ||
* Fixes error where cache callback for get command was not setting expiration time properly | ||
* Added server type to server list | ||
* Remove use_sasl ini-variable and initialise sasl as needed | ||
* CAS tokens are returned as integers and they overflow to strings as needed | ||
|
||
Session handler | ||
* The session memcached protocol config name was changed, and the default protocol was changed from text to binary protocol. If your memcached setup does not support the binary protocol(e.g. if using twemproxy), then set memcached.sess_binary_protocol = Off. (Previously called memcached.sess_binary) | ||
* Session lock algorithm updated (new ini-values memcached.sess_lock_wait_min, memcached.sess_lock_wait_max and memcached.sess_lock_retries) | ||
* Session extension uses PHP allocators (still some work to do on the rest of the extension) | ||
* Ini-values take effect during session_start or session_regenerate_id | ||
* Fixes crash with session_regenerate_id (work-around for PHP bug) | ||
|
||
Tests | ||
* Fix several problematic tests | ||
Fixes | ||
* Add API entries for flushBuffers() and getAllKeys() (#316) | ||
* Ignore specific errors from memcached_dump for getAllKeys() with newer memcached servers (#315) | ||
* Fix compiling with memcached binary protocol enabled (#312) | ||
* Restore php_libmemcached_compat with workaround for missing memcached_exists (#314) | ||
* Travis CI purge old versions of memcached and libmemcached (#309) | ||
</notes> | ||
<contents> | ||
<dir name="/"> | ||
|
@@ -73,6 +59,8 @@ Tests | |
<file role='src' name='php_memcached_private.h'/> | ||
<file role='src' name='php_memcached_session.c'/> | ||
<file role='src' name='php_memcached_session.h'/> | ||
<file role='src' name='php_libmemcached_compat.h'/> | ||
<file role='src' name='php_libmemcached_compat.c'/> | ||
<file role='src' name='php_memcached_server.h'/> | ||
<file role='src' name='php_memcached_server.c'/> | ||
<file role='src' name='g_fmt.c'/> | ||
|
@@ -194,6 +182,43 @@ Tests | |
<configureoption name="with-libmemcached-dir" default="no" prompt="libmemcached directory"/> | ||
</extsrcrelease> | ||
<changelog> | ||
<release> | ||
<stability> | ||
<release>stable</release> | ||
<api>stable</api> | ||
</stability> | ||
<version> | ||
<release>3.0.0</release> | ||
<api>3.0.0</api> | ||
</version> | ||
<date>2016-01-27</date> | ||
<notes> | ||
PHP7 release of memcached extension. Note that support for libmemcached 0.x series has been discontinued | ||
and the oldest actively tested version is 1.0.2. It is highly recommended to use version 1.0.18 of | ||
libmemcached. | ||
|
||
API | ||
* The method signature of get, getByKey, getMulti, and getMultiByKey changed. | ||
* get* and getMulti* commands no longer take cas or user flags parameters. | ||
* get* and getMulti* commands now take the Memcached::GET_EXTENDED flag to retrieve user flags and cas tokens. | ||
* Fixes getStats command to return all stats from all servers | ||
* Fixes allKeys command behaviour | ||
* Fixes error where cache callback for get command was not setting expiration time properly | ||
* Added server type to server list | ||
* Remove use_sasl ini-variable and initialise sasl as needed | ||
* CAS tokens are returned as integers and they overflow to strings as needed | ||
|
||
Session handler | ||
* The session memcached protocol config name was changed, and the default protocol was changed from text to binary protocol. If your memcached setup does not support the binary protocol(e.g. if using tw | ||
* Session lock algorithm updated (new ini-values memcached.sess_lock_wait_min, memcached.sess_lock_wait_max and memcached.sess_lock_retries) | ||
* Session extension uses PHP allocators (still some work to do on the rest of the extension) | ||
* Ini-values take effect during session_start or session_regenerate_id | ||
* Fixes crash with session_regenerate_id (work-around for PHP bug) | ||
|
||
Tests | ||
* Fix several problematic tests | ||
</notes> | ||
</release> | ||
<release> | ||
<stability> | ||
<release>alpha</release> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
+----------------------------------------------------------------------+ | ||
| Copyright (c) 2009 The PHP Group | | ||
+----------------------------------------------------------------------+ | ||
| This source file is subject to version 3.0 of the PHP license, | | ||
| that is bundled with this package in the file LICENSE, and is | | ||
| available through the world-wide-web at the following url: | | ||
| http://www.php.net/license/3_0.txt. | | ||
| If you did not receive a copy of the PHP license and are unable to | | ||
| obtain it through the world-wide-web, please send a note to | | ||
| [email protected] so we can mail you a copy immediately. | | ||
+----------------------------------------------------------------------+ | ||
| Authors: Andrei Zmievski <[email protected]> | | ||
+----------------------------------------------------------------------+ | ||
*/ | ||
|
||
#include "php_memcached.h" | ||
#include "php_memcached_private.h" | ||
#include "php_libmemcached_compat.h" | ||
|
||
memcached_return php_memcached_exist (memcached_st *memc, zend_string *key) | ||
{ | ||
#ifdef HAVE_MEMCACHED_EXIST | ||
return memcached_exist (memc, key->val, key->len); | ||
#else | ||
memcached_return rc = MEMCACHED_SUCCESS; | ||
uint32_t flags = 0; | ||
size_t value_length = 0; | ||
char *value = NULL; | ||
|
||
value = memcached_get (memc, key->val, key->len, &value_length, &flags, &rc); | ||
if (value) { | ||
free (value); | ||
} | ||
return rc; | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
+----------------------------------------------------------------------+ | ||
| Copyright (c) 2009 The PHP Group | | ||
+----------------------------------------------------------------------+ | ||
| This source file is subject to version 3.0 of the PHP license, | | ||
| that is bundled with this package in the file LICENSE, and is | | ||
| available through the world-wide-web at the following url: | | ||
| http://www.php.net/license/3_0.txt. | | ||
| If you did not receive a copy of the PHP license and are unable to | | ||
| obtain it through the world-wide-web, please send a note to | | ||
| [email protected] so we can mail you a copy immediately. | | ||
+----------------------------------------------------------------------+ | ||
| Authors: Andrei Zmievski <[email protected]> | | ||
+----------------------------------------------------------------------+ | ||
*/ | ||
|
||
#ifndef PHP_LIBMEMCACHED_COMPAT | ||
#define PHP_LIBMEMCACHED_COMPAT | ||
|
||
/* this is the version(s) we support */ | ||
#include <libmemcached/memcached.h> | ||
|
||
memcached_return php_memcached_exist (memcached_st *memc, zend_string *key); | ||
|
||
#if defined(LIBMEMCACHED_VERSION_HEX) && LIBMEMCACHED_VERSION_HEX >= 0x01000017 | ||
typedef const memcached_instance_st * php_memcached_instance_st; | ||
#else | ||
typedef memcached_server_instance_st php_memcached_instance_st; | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.