Skip to content

Commit

Permalink
Merge in upstream changes from php7 branch of php-memcached GitHub pr…
Browse files Browse the repository at this point in the history
…oject (e65be32; latest unstable, aka 3.0.0-devel)
  • Loading branch information
malyeyev-AMZN committed Dec 23, 2016
2 parents 617a540 + e65be32 commit 7937c7f
Show file tree
Hide file tree
Showing 137 changed files with 774 additions and 718 deletions.
31 changes: 15 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
sudo: required
dist: trusty

language: php
php:
- 7.0
- 7.1

matrix:
fast_finish: true
allow_failures:
- php: 7.1

env:
- LIBMEMCACHED_VERSION=1.0.18
- LIBMEMCACHED_VERSION=1.0.17
- LIBMEMCACHED_VERSION=1.0.16
- LIBMEMCACHED_VERSION=1.0.15
- LIBMEMCACHED_VERSION=1.0.14
- LIBMEMCACHED_VERSION=1.0.10
- LIBMEMCACHED_VERSION=1.0.8
- LIBMEMCACHED_VERSION=1.0.7
- LIBMEMCACHED_VERSION=1.0.6
- LIBMEMCACHED_VERSION=1.0.2
#- LIBMEMCACHED_VERSION=0.53
#- LIBMEMCACHED_VERSION=0.49
#- LIBMEMCACHED_VERSION=0.44
- LIBMEMCACHED_VERSION=1.0.18 # Debian Jessie / Ubuntu Xenial
- LIBMEMCACHED_VERSION=1.0.16 # RHEL / CentOS 7
- LIBMEMCACHED_VERSION=1.0.8 # Debian Wheezy / Ubuntu Trusty

addons:
apt:
packages:
- sasl2-bin
- libsasl2-dev
- libevent-dev

before_script:
- ./.travis/travis.sh before_script $LIBMEMCACHED_VERSION

script:
- ./.travis/travis.sh script $LIBMEMCACHED_VERSION

sudo: false

cache:
directories:
- $HOME/cache



7 changes: 3 additions & 4 deletions .travis/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ function install_libmemcached() {
}

function install_igbinary() {
git clone https://github.com/igbinary/igbinary7.git
pushd igbinary7
git clone https://github.com/igbinary/igbinary.git
pushd igbinary
phpize
./configure
make
Expand All @@ -79,7 +79,6 @@ function install_igbinary() {
function install_msgpack() {
git clone https://github.com/msgpack/msgpack-php.git
pushd msgpack-php
git checkout php7
phpize
./configure
make
Expand Down Expand Up @@ -238,7 +237,7 @@ case $ACTION in
# Install igbinary extension
install_igbinary

# install msgpack
# Install msgpack extension
install_msgpack

install_memcached
Expand Down
76 changes: 45 additions & 31 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
memcached extension changelog

Version 2.2.0b1
---------------
Version 2.2.0 (2014-04-01)
--------------------------
* Added the OPT_SERVER_TIMEOUT_LIMIT behaviour

Version 2.2.0RC1 (2014-03-12)
-----------------------------
* Added the OPT_SERVER_TIMEOUT_LIMIT behaviour
* Fixes incorrect size when compressing serialized objects
* Fixes endianess of compressed values

Version 2.2.0b1 (2013-10-28)
----------------------------
* Reinstate support for libememcached 0.x series
* Added SASL support to session handler
* Added Memcached::flushBuffers as per GH #78
Expand All @@ -20,28 +30,28 @@ Version 2.2.0b1
* Added Memcached::setBucket for virtual bucket support
* Added support for msgpack serialization
* Memcached::setSaslAuthData returns correct status on success
* Added support for user-defined flags in set and get operations
* Added support for user-defined flags in set and get operations

Version 2.1.0
-------------
Version 2.1.0 (2012-08-06)
--------------------------
* Drop support for libmemcached 0.x series, now 1.0.x is required
* Add support for virtual bucket distribution
* Fix compilation against PHP 5.2

Version 2.0.1
-------------
Version 2.0.1 (2012-03-03)
--------------------------
* Fix embedded version number to be not -dev

Version 2.0.0
-------------
Version 2.0.0 (2012-03-02)
--------------------------
* Add touch() and touchByKey() methods
* Add resetServerList() and quit() methods
* Support binary protocol in sessions
* Make it work with libmemcached up to 1.0.4
* Test against PHP 5.4.0

Version 2.0.0b2
---------------
Version 2.0.0b2 (2011-06-24)
----------------------------
* Add OPT_REMOVE_FAILED_SERVERS option.
* Make it work with libmemcached up to 0.49.
* Fix a case where invalid session ID could lock the script.
Expand All @@ -61,8 +71,8 @@ Version 2.0.0b2
* Make increment/decrement initialize value when it is not available (when
using binary protocol)

Version 2.0.0b1
---------------
Version 2.0.0b1 (2011-03-12)
----------------------------
* Add fastlz library that provides better/faster payload compression
* Add configure switch to enable/disable JSON serialization support
* Add getAllKeys() method
Expand All @@ -84,23 +94,27 @@ Version 2.0.0b1
* Add 'on_new' callback to constructor
* Add SASL support

Version 1.0.1
-------------
Version 1.0.2 (2010-05-03)
--------------------------
* Fix build for libmemcached-0.39 (memcached_server_list() issue)

Version 1.0.1 (2010-03-11)
--------------------------
* Fix JSON API handling to account for PHP 5.2/5.3 version differences.
* Add memcached.sess_locking, memcached.sess_lock_wait, and
memcached.sess_prefix INI entries.
* Add OPT_AUTO_EJECT_HOSTS option.

Version 1.0.0
-------------
Version 1.0.0 (2009-07-04)
--------------------------
* First stable release.
* Add getResultMessage() method.
* Fix OPT_RECV_TIMEOUT definition.
* Initialize Session lock wait to max execution time (if max execution
time is unlimited, default to 30 seconds).

Version 0.2.0
-------------
Version 0.2.0 (2009-06-04)
--------------------------
* Add JSON serializer support, requires PHP 5.2.10+.
* Add HAVE_JSON and HAVE_IGBINARY class constants that indicate
whether the respective serializers are available.
Expand All @@ -114,25 +128,25 @@ Version 0.2.0
the cache when upgrading to this version.
* Add several tests.

Version 0.1.5
-------------
Version 0.1.5 (2009-03-31)
--------------------------
* Implement getVersion().
* Add support for preserving boolean value types.
* Fix crash when child class does not call constructor.
* Fix bug #16084 (Crash when addServers is called with an associative array).
* ZTS compilation fixes.

Version 0.1.4
-------------
Version 0.1.4 (2009-02-13)
--------------------------
* Fix compilation against PHP 5.3.
* Add support for 'igbinary' serializer (Oleg Grenrus)

Version 0.1.3
-------------
Version 0.1.3 (2009-02-06)
--------------------------
* Bludgeon bug #15896 (Memcached setMulti error) into submission.

Version 0.1.2
-------------
Version 0.1.2 (2009-02-06)
--------------------------
* Fix bug #15896 (Memcached setMulti error).
* Check for empty key in getServerByKey().
* Allow passing 'null' for callbacks.
Expand All @@ -141,12 +155,12 @@ Version 0.1.2
* Allow only strings as the append/prepend value.
* Remove expiration parameter from append/prepend.

Version 0.1.1
-------------
Version 0.1.1 (2009-02-02)
--------------------------
* Add OPT_LIBKETAMA_COMPATIBLE option.
* Implement addServers() method.
* Swap internal compressed and serialized flags to be compatible with other clients.

Version 0.1.0
-------------
Version 0.1.0 (2009-01-29)
--------------------------
* Initial release
4 changes: 2 additions & 2 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ Note: you can statically link the libmemcached library into the PHP binary so it
* [Github link] (https://github.com/awslabs/aws-elasticache-cluster-client-memcached-for-php)
* [AmazonElastiCache Auto Discovery](http://docs.amazonwebservices.com/AmazonElastiCache/latest/UserGuide/AutoDiscovery.html)
* [php-memcached] (https://github.com/php-memcached-dev/php-memcached)
* [libmemcached](http://tangent.org/552/libmemcached.html)
* [memcached](http://www.danga.com/memcached/)
* [libmemcached](http://libmemcached.org/libMemcached.html)
* [memcached](http://memcached.org/)
* [igbinary](https://github.com/igbinary/igbinary7)
67 changes: 56 additions & 11 deletions memcached.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ memcached.sess_locking = On

; The minimum time, in milliseconds, to wait between session lock attempts.
; This value is double on each lock retry until memcached.sess_lock_wait_max
; is reached
memcached.sess_lock_wait_min = 0;
; is reached, after which any further retries will take sess_lock_wait_max seconds.
; Default is 1000.
memcached.sess_lock_wait_min = 1000;

; The maximum time, in milliseconds, to wait between session lock attempts.
memcached.sess_lock_wait_max = 0;
; Default is 2000.
memcached.sess_lock_wait_max = 2000;

; The number of times to retry locking the session lock, not including the first attempt.
; Default is 5.
memcached.sess_lock_retries = 5;

; The time, in seconds, before a lock should release itself.
; Setting to 0 results in the default behaviour, which is to
Expand All @@ -29,16 +35,24 @@ memcached.sess_lock_expire = 0;
; the default value is "memc.sess.key."
memcached.sess_prefix = "memc.sess.key."

; Whether or not to re-use the memcached connections corresponding to the value(s)
; of session.save_path after the execution of the script ends.
; Don't use this if certain settings (e.g. SASL settings, sess_binary_protocol) would
; be overridden between requests.
; Default is Off.
memcached.sess_persistent = Off

; memcached session consistent hash mode
; if set to On, consistent hashing (libketama) is used
; for session handling.
; When consistent hashing is used, one can add or remove cache
; node(s) without messing up too much with existing keys
; default is Off
memcached.sess_consistent_hash = Off
; default is On
memcached.sess_consistent_hash = On

; Allow failed memcached server to automatically be removed
memcached.sess_remove_failed = 1
; Allow failed memcached server to automatically be removed.
; Default is Off. (In previous versions, this setting was called memcached.sess_remove_failed)
memcached.sess_remove_failed_servers = Off

; Write data to a number of additional memcached servers
; This is "poor man's HA" as libmemcached calls it.
Expand All @@ -49,15 +63,17 @@ memcached.sess_remove_failed = 1
; which could have old data or no data at all
memcached.sess_number_of_replicas = 0

; memcached session binary mode
; libmemcached replicas only work if binary mode is enabled
memcached.sess_binary = Off
; Use the memcached binary protocol for memcached sessions (Instead of the text protocol)
; libmemcached replicas work only if binary mode is enabled.
; However, certain proxies (such as twemproxy) will work only if the binary protocol is disabled.
; Default is On. In older versions of php-memcached, this setting was Off and was called memcached.sess_binary.
memcached.sess_binary_protocol = On

; memcached session replica read randomize
memcached.sess_randomize_replica_read = Off

; memcached connect timeout value
; In non-blocking mode this changes the value of the timeout
; In non-blocking mode this changes the value of the timeout
; during socket connection in milliseconds. Specifying -1 means an infinite timeout.
memcached.sess_connect_timeout = 1000

Expand Down Expand Up @@ -111,3 +127,32 @@ memcached.serializer = "igbinary"
; environment.
; the default is 2
memcached.store_retry_count = 2

; Sets the default for consistent hashing for new connections.
; (To configure consistent hashing for session connections,
; use memcached.sess_consistent_hash instead)
;
; If set to On, consistent hashing (libketama) is used
; for session handling.
; When consistent hashing is used, one can add or remove cache
; node(s) without messing up too much with existing keys
; default is Off
memcached.default_consistent_hash = Off

; Sets the default memcached protocol for new connections.
; (To configure the memcached protocol for connections used by sessions,
; use memcached.sess_binary_protocol instead)
;
; If set to On, the memcached binary protocol is used by default.
; If set to Off, the memcached text protocol is used.
; Default is Off
memcached.default_binary_protocol = Off

; Sets the default memcached connection timeout for new connections.
; (To configure the memcached connection timeout for sessions,
; use memcached.sess_connect_timeout instead)
; In non-blocking mode this changes the value of the timeout.
; during socket connection in milliseconds. Specifying -1 means an infinite timeout.
; Specifying 0 means using the memcached library's default connection timeout.
; Default is 0.
memcached.default_connect_timeout = 0
Loading

0 comments on commit 7937c7f

Please sign in to comment.